summaryrefslogtreecommitdiff
path: root/devel/gdb52/files/patch-gdb_config_i386_nm-fbsd.h
diff options
context:
space:
mode:
authorMark Peek <mp@FreeBSD.org>2002-06-06 03:56:34 +0000
committerMark Peek <mp@FreeBSD.org>2002-06-06 03:56:34 +0000
commit1d9dc859cd6bfa6e8dc46bc0590c62422234d1fd (patch)
tree13ebe8be581fc3f158aebac9a91bdec7dfe3b08e /devel/gdb52/files/patch-gdb_config_i386_nm-fbsd.h
parentReflect reality...this is gdb-5.2, not gdb-5.1. (diff)
- Add support for specifying expressions in add-symbol-file (Nick Hibma)
- Add patches from src/ bits for: - kernel core debugging for i386 - thread debugging for i386 and alpha (Doug Rabson) This patch allows debugging -current kernels compiled with gcc-3.1. Reviewed by: dfr Approved by: obrien
Diffstat (limited to 'devel/gdb52/files/patch-gdb_config_i386_nm-fbsd.h')
-rw-r--r--devel/gdb52/files/patch-gdb_config_i386_nm-fbsd.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/devel/gdb52/files/patch-gdb_config_i386_nm-fbsd.h b/devel/gdb52/files/patch-gdb_config_i386_nm-fbsd.h
new file mode 100644
index 000000000000..89f12b9728a1
--- /dev/null
+++ b/devel/gdb52/files/patch-gdb_config_i386_nm-fbsd.h
@@ -0,0 +1,46 @@
+--- gdb/config/i386/nm-fbsd.h Sat Jul 21 13:16:44 2001
++++ gdb/config/i386/nm-fbsd.h Mon Jun 3 10:04:54 2002
+@@ -28,6 +28,10 @@
+
+ #include "i386/nm-i386.h"
+
++#ifndef _SYS_PARAM_H_
++#include <sys/param.h>
++#endif
++
+ /* Provide access to the i386 hardware debugging registers. */
+
+ #define I386_DR_LOW_SET_CONTROL(control) \
+@@ -148,5 +152,32 @@
+ #define ld_2 d_sdt
+
+ #endif /* !SVR4_SHARED_LIBS */
++
++extern int kernel_debugging;
++extern int kernel_writablecore;
++
++#if __FreeBSD_version >= 500032
++#define ADDITIONAL_OPTIONS \
++ {"kernel", no_argument, &kernel_debugging, 1}, \
++ {"k", no_argument, &kernel_debugging, 1}, \
++ {"wcore", no_argument, &kernel_writablecore, 1}, \
++ {"w", no_argument, &kernel_writablecore, 1},
++
++#define ADDITIONAL_OPTION_HELP \
++ "\
++ --kernel Enable kernel debugging.\n\
++ --wcore Make core file writable (only works for /dev/mem).\n\
++ This option only works while debugging a kernel !!\n\
++"
++
++#define DEFAULT_PROMPT kernel_debugging?"(kgdb) ":"(gdb) "
++
++/* misuse START_PROGRESS to test whether we're running as kgdb */
++/* START_PROGRESS is called at the top of main */
++#undef START_PROGRESS
++#define START_PROGRESS(STR,N) \
++ if (!strcmp(STR, "kgdb")) \
++ kernel_debugging = 1;
++#endif
+
+ #endif /* NM_FBSD_H */