diff options
author | joerg <joerg@FreeBSD.org> | 2004-11-22 16:08:19 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 2004-11-22 16:08:19 +0000 |
commit | 48004ebd9cda22dffee7dd8912422047c03d427a (patch) | |
tree | c965276fdd077e8bc1efd0f0a68806d5179bb69e /gnu | |
parent | 6bcf32277d46f984eecd55e0dfaee6dcb3ff0d09 (diff) | |
download | FreeBSD-src-48004ebd9cda22dffee7dd8912422047c03d427a.zip FreeBSD-src-48004ebd9cda22dffee7dd8912422047c03d427a.tar.gz |
[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.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/gdb/kgdb/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/usr.bin/gdb/kgdb/main.c b/gnu/usr.bin/gdb/kgdb/main.c index 30dd6a8..54f6a3e 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", |