summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-02 19:08:23 -0300
committerWerner Almesberger <werner@almesberger.net>2016-09-02 19:08:23 -0300
commit63c47828b196e6740d98cc150992ecc7aba0dc79 (patch)
treebffa5692315d3ecf3d94fa34fe31b3a246a59ace /main.c
parente7c21fc83758b9431bce474c5ba12eec2e20ac10 (diff)
downloadeeshow-63c47828b196e6740d98cc150992ecc7aba0dc79.tar.gz
eeshow-63c47828b196e6740d98cc150992ecc7aba0dc79.tar.bz2
eeshow-63c47828b196e6740d98cc150992ecc7aba0dc79.zip
main/common.c: split gdb launcher off main.c (beginning of big main.c split)
Diffstat (limited to 'main.c')
-rw-r--r--main.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/main.c b/main.c
index 1248802..35ab15f 100644
--- a/main.c
+++ b/main.c
@@ -38,6 +38,7 @@
#include "file/git-hist.h"
#include "gui/gui.h"
#include "version.h"
+#include "main/common.h"
#include "main.h"
@@ -149,18 +150,7 @@ int main(int argc, char **argv)
struct gfx *gfx;
int retval;
- if (argc > 1 && !strcmp(argv[1], "gdb")) {
- char **args;
-
- args = alloc_type_n(char *, argc + 2);
- args[0] = "gdb";
- args[1] = "--args";
- args[2] = *argv;
- memcpy(args + 3, argv + 2, sizeof(char *) * (argc - 1));
- execvp("gdb", args);
- perror(*argv);
- return 1;
- }
+ run_under_gdb(argc, argv);
for (dashdash = 1; dashdash != argc; dashdash++)
if (!strcmp(argv[dashdash], "--")) {