ports/devel/gdb6/files/patch-main.c
David E. O'Brien b6267d7a4b Update to the 2004-05-11 snapshot.
Also enable kgdb and thread support!
This is missing IA64 support, and the AMD64 kgdb support is hokey and needs
a few more bits filled in.
2004-05-13 04:28:38 +00:00

53 lines
1.5 KiB
C

--- gdb/main.c.orig Thu Apr 15 22:40:39 2004
+++ gdb/main.c Thu Apr 15 22:47:51 2004
@@ -66,6 +66,12 @@
/* Whether dbx commands will be handled */
int dbx_commands = 0;
+#ifdef KGDB
+/* Kernel debugging support. */
+int kernel_debugging;
+int kernel_writablecore;
+#endif
+
/* System root path, used to find libraries etc. */
char *gdb_sysroot = 0;
@@ -311,6 +317,12 @@
{"statistics", no_argument, 0, OPT_STATISTICS},
{"write", no_argument, &write_files, 1},
{"args", no_argument, &set_args, 1},
+#ifdef KGDB
+ {"kernel", no_argument, &kernel_debugging, 1},
+ {"k", no_argument, &kernel_debugging, 1},
+ {"wcore", no_argument, &kernel_writablecore, 1},
+ {"w", no_argument, &kernel_writablecore, 1},
+#endif
{0, no_argument, 0, 0}
};
@@ -857,6 +869,11 @@
--interpreter=INTERP\n\
Select a specific interpreter / user interface\n\
"), stream);
+#ifdef KGDB
+ fputs_unfiltered (_("\
+ --kernel Enable kernel debugging.\n\
+"), stream);
+#endif
fputs_unfiltered (_("\
--mapped Use mapped symbol files if supported on this system.\n\
--nw Do not use a window interface.\n\
@@ -874,6 +891,12 @@
#if defined(TUI)
fputs_unfiltered (_("\
--tui Use a terminal user interface.\n\
+"), stream);
+#endif
+#ifdef KGDB
+ fputs_unfiltered (_("\
+ --wcore Make core file writable (only works for /dev/mem).\n\
+ This option only works while debugging a kernel !!\n\
"), stream);
#endif
fputs_unfiltered (_("\