diff options
author | obrien <obrien@FreeBSD.org> | 2002-06-29 16:52:15 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-06-29 16:52:15 +0000 |
commit | 6dbff7f2c1f8150887038aed666e11675adf0b4e (patch) | |
tree | fabe4b4bde26625d7d64fd4a5715dc6ce801fc98 | |
parent | 43b95334189f896d0242057b59041dc7ddbf5a9d (diff) | |
download | FreeBSD-src-6dbff7f2c1f8150887038aed666e11675adf0b4e.zip FreeBSD-src-6dbff7f2c1f8150887038aed666e11675adf0b4e.tar.gz |
Bmake bits for GDB 5.2.
-rw-r--r-- | gnu/usr.bin/binutils/gdb/fbsd-kgdb.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/gdb/fbsd-kgdb.h b/gnu/usr.bin/binutils/gdb/fbsd-kgdb.h new file mode 100644 index 0000000..fc2fd99 --- /dev/null +++ b/gnu/usr.bin/binutils/gdb/fbsd-kgdb.h @@ -0,0 +1,35 @@ +/* Native-kernel debugging definitions for FreeBSD. + * $FreeBSD$ + */ + +#ifndef FBSD_KGDB_H +#define FBSD_KGDB_H + +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 /* FBSD_KGDB_H */ |