gdb/gdb-6.8-tui-singlebinary.patch
2008-06-20 08:37:16 +00:00

25 lines
524 B
Diff

Provide `gdb --tui' functionality for the hardlink `gdbtui'.
--- ./gdb/gdb.c 1 Jan 2008 22:53:09 -0000 1.6
+++ ./gdb/gdb.c 20 Jun 2008 08:02:57 -0000
@@ -30,5 +30,19 @@ main (int argc, char **argv)
args.argv = argv;
args.use_windows = 0;
args.interpreter_p = INTERP_CONSOLE;
+
+ if (argv[0])
+ {
+ char *s;
+
+ s = strrchr (argv[0], '/');
+ if (s)
+ s++;
+ else
+ s = argv[0];
+ if (strcmp (s, "gdbtui") == 0)
+ args.interpreter_p = INTERP_TUI;
+ }
+
return gdb_main (&args);
}