kgdb enhancements!

* document the kgdb -b flag
* better verify what's valid with -b
* add more comprehensive command line help

PR:		kern/175743
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de>
This commit is contained in:
Adrian Chadd 2013-02-19 02:09:18 +00:00
parent bf4e1ed0bc
commit bab63de286
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246958
2 changed files with 13 additions and 10 deletions

View File

@ -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

View File

@ -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);
}
@ -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",