diff options
author | marcel <marcel@FreeBSD.org> | 2005-09-10 18:25:53 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2005-09-10 18:25:53 +0000 |
commit | d05b9c6e820e8e68064f651bc7e040ff8149f153 (patch) | |
tree | 10ba140bc7d6ec0218cfa8290fa788fcbf181065 /gnu/usr.bin/gdb/kgdb/main.c | |
parent | 756320bcbb3c0521b16b43833d829c8125b3f056 (diff) | |
download | FreeBSD-src-d05b9c6e820e8e68064f651bc7e040ff8149f153.zip FreeBSD-src-d05b9c6e820e8e68064f651bc7e040ff8149f153.tar.gz |
Add a kluge to allow kgdb(1) to inject its own frame sniffer in the
list of frame sniffers so that trapframes can be detected. The kluge
is needed because this version of gdb only supports appending a
sniffer to the list of sniffers and the moment kgdb gets a chance to
add its own frame sniffer, the target's default frame sniffer is
already in the list. Since the default frame sniffer claims any
frame thrown at it, kgdb's frame sniffer never gets to smell (a
process much akin to tasting, but with lesser chance of hurling :-)
This commit adds dummy frame sniffers that never claim a frame and
as such don't fix anything yet. However, we now have frame sniffers
and they are being called, so it's just a matter of adding meat to
the bones and we'll be able to properly unwind across trapframes.
MFC after: 1 week
Diffstat (limited to 'gnu/usr.bin/gdb/kgdb/main.c')
-rw-r--r-- | gnu/usr.bin/gdb/kgdb/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/usr.bin/gdb/kgdb/main.c b/gnu/usr.bin/gdb/kgdb/main.c index 856cb93..b07328c 100644 --- a/gnu/usr.bin/gdb/kgdb/main.c +++ b/gnu/usr.bin/gdb/kgdb/main.c @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); /* libgdb stuff. */ #include <defs.h> #include <frame.h> +#include <frame-unwind.h> #include <inferior.h> #include <interps.h> #include <cli-out.h> @@ -61,6 +62,8 @@ __FBSDID("$FreeBSD$"); extern void (*init_ui_hook)(char *); +extern frame_unwind_sniffer_ftype *kgdb_sniffer_kluge; + extern void symbol_file_add_main (char *args, int from_tty); #include "kgdb.h" @@ -478,5 +481,7 @@ main(int argc, char *argv[]) init_ui_hook = kgdb_init; + kgdb_sniffer_kluge = kgdb_trgt_trapframe_sniffer; + return (gdb_main(&args)); } |