1 |
--- gdb/main.c.orig Thu Apr 15 22:40:39 2004 |
2 |
+++ gdb/main.c Thu Apr 15 22:47:51 2004 |
3 |
@@ -66,6 +66,12 @@ |
4 |
/* Whether dbx commands will be handled */ |
5 |
int dbx_commands = 0; |
6 |
|
7 |
+#ifdef KGDB |
8 |
+/* Kernel debugging support. */ |
9 |
+int kernel_debugging; |
10 |
+int kernel_writablecore; |
11 |
+#endif |
12 |
+ |
13 |
/* System root path, used to find libraries etc. */ |
14 |
char *gdb_sysroot = 0; |
15 |
|
16 |
@@ -311,6 +317,12 @@ |
17 |
{"statistics", no_argument, 0, OPT_STATISTICS}, |
18 |
{"write", no_argument, &write_files, 1}, |
19 |
{"args", no_argument, &set_args, 1}, |
20 |
+#ifdef KGDB |
21 |
+ {"kernel", no_argument, &kernel_debugging, 1}, |
22 |
+ {"k", no_argument, &kernel_debugging, 1}, |
23 |
+ {"wcore", no_argument, &kernel_writablecore, 1}, |
24 |
+ {"w", no_argument, &kernel_writablecore, 1}, |
25 |
+#endif |
26 |
{0, no_argument, 0, 0} |
27 |
}; |
28 |
|
29 |
@@ -857,6 +869,11 @@ |
30 |
--interpreter=INTERP\n\ |
31 |
Select a specific interpreter / user interface\n\ |
32 |
"), stream); |
33 |
+#ifdef KGDB |
34 |
+ fputs_unfiltered (_("\ |
35 |
+ --kernel Enable kernel debugging.\n\ |
36 |
+"), stream); |
37 |
+#endif |
38 |
fputs_unfiltered (_("\ |
39 |
--mapped Use mapped symbol files if supported on this system.\n\ |
40 |
--nw Do not use a window interface.\n\ |
41 |
@@ -874,6 +891,12 @@ |
42 |
#if defined(TUI) |
43 |
fputs_unfiltered (_("\ |
44 |
--tui Use a terminal user interface.\n\ |
45 |
+"), stream); |
46 |
+#endif |
47 |
+#ifdef KGDB |
48 |
+ fputs_unfiltered (_("\ |
49 |
+ --wcore Make core file writable (only works for /dev/mem).\n\ |
50 |
+ This option only works while debugging a kernel !!\n\ |
51 |
"), stream); |
52 |
#endif |
53 |
fputs_unfiltered (_("\ |