FreeBSD Bugzilla – Attachment 131623 Details for
Bug 175743
[patch] Patches for kgdb(1) - improve test of arguments; update manpage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.txt
file.txt (text/plain), 2.43 KB, created by
Christoph Mallon
on 2013-01-31 20:50:06 UTC
(
hide
)
Description:
file.txt
Filename:
MIME Type:
Creator:
Christoph Mallon
Created:
2013-01-31 20:50:06 UTC
Size:
2.43 KB
patch
obsolete
>From 9d268c225e431bd8e548cfd88df5a9837a3aeb87 Mon Sep 17 00:00:00 2001 >From: Christoph Mallon <christoph.mallon@gmx.de> >Date: Mon, 21 Jan 2013 07:27:42 +0100 >Subject: [PATCH 1/2] kgdb: Improve test whether the argument of -b is valid. > >Now non-digits (e.g. "4k") are detected. >--- > gnu/usr.bin/gdb/kgdb/main.c | 17 ++++++++--------- > 1 file changed, 8 insertions(+), 9 deletions(-) > >diff --git a/gnu/usr.bin/gdb/kgdb/main.c b/gnu/usr.bin/gdb/kgdb/main.c >index 45a3dc0..930cdee 100644 >--- a/gnu/usr.bin/gdb/kgdb/main.c >+++ b/gnu/usr.bin/gdb/kgdb/main.c >@@ -338,19 +338,18 @@ main(int argc, char *argv[]) > case 'a': > annotation_level++; > break; >- case 'b': >- { >- int i; >- char *p; >+ case 'b': { >+ int i; >+ char *p; > >- i = strtol (optarg, &p, 0); >- if (i == 0 && p == optarg) >+ i = strtol(optarg, &p, 0); >+ if (*p != '\0' || p == optarg) > warnx("warning: could not set baud rate to `%s'.\n", > optarg); >- else >- baud_rate = i; >- } >+ else >+ baud_rate = i; > break; >+ } > case 'c': /* use given core file. */ > if (vmcore != NULL) { > warnx("option %c: can only be specified once", >-- >1.8.1.2 > >From 3846bfff5ad1450d4d047c3d3912dd28a5235751 Mon Sep 17 00:00:00 2001 >From: Christoph Mallon <christoph.mallon@gmx.de> >Date: Fri, 25 Jan 2013 20:58:37 +0100 >Subject: [PATCH 2/2] kgdb: Document -b in the manpage and usage. > >--- > gnu/usr.bin/gdb/kgdb/kgdb.1 | 4 ++++ > gnu/usr.bin/gdb/kgdb/main.c | 2 +- > 2 files changed, 5 insertions(+), 1 deletion(-) > >diff --git a/gnu/usr.bin/gdb/kgdb/kgdb.1 b/gnu/usr.bin/gdb/kgdb/kgdb.1 >index 4073d70..58d0786 100644 >--- a/gnu/usr.bin/gdb/kgdb/kgdb.1 >+++ b/gnu/usr.bin/gdb/kgdb/kgdb.1 >@@ -33,6 +33,7 @@ > .Sh SYNOPSIS > .Nm > .Op Fl a | Fl f | Fl fullname >+.Op Fl b Ar rate > .Op Fl q | Fl quiet > .Op Fl v > .Op Fl w >@@ -62,6 +63,9 @@ The > or > .Fl fullname > options are supported for backward compatibility as well. >+.It Fl b Ar rate >+Set the baudrate to >+.Ar rate . > .It Fl q > Suppress printing of the banner when the debugger starts. > The >diff --git a/gnu/usr.bin/gdb/kgdb/main.c b/gnu/usr.bin/gdb/kgdb/main.c >index 930cdee..aa062a2 100644 >--- a/gnu/usr.bin/gdb/kgdb/main.c >+++ b/gnu/usr.bin/gdb/kgdb/main.c >@@ -83,7 +83,7 @@ usage(void) > { > > fprintf(stderr, >- "usage: %s [-afqvw] [-d crashdir] [-c core | -n dumpnr | -r device]\n" >+ "usage: %s [-afqvw] [-b rate] [-d crashdir] [-c core | -n dumpnr | -r device]\n" > "\t[kernel [core]]\n", getprogname()); > exit(1); > } >-- >1.8.1.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 175743
: 131623