From 466bc517d125d8302780403ee85dc7cbf7fec2e7 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Mon, 22 Nov 2004 16:08:19 +0000 Subject: [PATCH] [Sorry, forgot to commit my source changes in my previous commit.] Document all options and general usage. Implement the -a option to bump the annotation_level. This improves the Emacs gud behaviour. You can now supply the following function (defun gud-gdb-massage-args (file args) (cons "-a" args)) (e.g. by evaluating it from the *scratch* buffer) and get the normal jump to the source window when browsing the stack. We should probably eventually supply our own kgdb submode to gud.el. --- gnu/usr.bin/gdb/kgdb/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnu/usr.bin/gdb/kgdb/main.c b/gnu/usr.bin/gdb/kgdb/main.c index 30dd6a8e007..54f6a3ee5c6 100644 --- a/gnu/usr.bin/gdb/kgdb/main.c +++ b/gnu/usr.bin/gdb/kgdb/main.c @@ -80,7 +80,7 @@ usage(void) { fprintf(stderr, - "usage: %s [-v] [-d crashdir] [-c core | -n dumpnr | -r device]\n" + "usage: %s [-a] [-v] [-d crashdir] [-c core | -n dumpnr | -r device]\n" "\t[kernel [core]]\n", getprogname()); exit(1); } @@ -218,8 +218,11 @@ main(int argc, char *argv[]) if (s != NULL) strlcpy(crashdir, s, sizeof(crashdir)); - while ((ch = getopt(argc, argv, "c:d:n:r:v")) != -1) { + while ((ch = getopt(argc, argv, "ac:d:n:r:v")) != -1) { switch (ch) { + case 'a': + annotation_level++; + break; case 'c': /* use given core file. */ if (vmcore != NULL) { warnx("option %c: can only be specified once",