Add command-line support to kgdb to allow the baudrate to be set.
This allows a remote session to be specified with '-r' as well as a non-default baudrate setting using '-b'. TODO: add to the kgdb manpage. MFC after: 2 weeks
This commit is contained in:
parent
e3f0800bd1
commit
23dbd4334a
@ -333,11 +333,24 @@ main(int argc, char *argv[])
|
||||
args.argv = malloc(sizeof(char *));
|
||||
args.argv[0] = argv[0];
|
||||
|
||||
while ((ch = getopt(argc, argv, "ac:d:fn:qr:vw")) != -1) {
|
||||
while ((ch = getopt(argc, argv, "ab:c:d:fn:qr:vw")) != -1) {
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
annotation_level++;
|
||||
break;
|
||||
case 'b':
|
||||
{
|
||||
int i;
|
||||
char *p;
|
||||
|
||||
i = strtol (optarg, &p, 0);
|
||||
if (i == 0 && p == optarg)
|
||||
warnx("warning: could not set baud rate to `%s'.\n",
|
||||
optarg);
|
||||
else
|
||||
baud_rate = i;
|
||||
}
|
||||
break;
|
||||
case 'c': /* use given core file. */
|
||||
if (vmcore != NULL) {
|
||||
warnx("option %c: can only be specified once",
|
||||
|
Loading…
x
Reference in New Issue
Block a user