svn commit: r245705 - head/gnu/usr.bin/gdb/kgdb
Julian Elischer
julian at freebsd.org
Mon Jan 21 16:26:04 UTC 2013
On 1/20/13 6:46 PM, Adrian Chadd wrote:
> Author: adrian
> Date: Mon Jan 21 01:46:36 2013
> New Revision: 245705
> URL: http://svnweb.freebsd.org/changeset/base/245705
>
> Log:
> 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'.
--baud is the standard I think (from google) and kgdb seems to already
accept
set remotebaud 9600.
>
> TODO: add to the kgdb manpage.
>
> MFC after: 2 weeks
>
> Modified:
> head/gnu/usr.bin/gdb/kgdb/main.c
>
> Modified: head/gnu/usr.bin/gdb/kgdb/main.c
> ==============================================================================
> --- head/gnu/usr.bin/gdb/kgdb/main.c Mon Jan 21 01:33:10 2013 (r245704)
> +++ head/gnu/usr.bin/gdb/kgdb/main.c Mon Jan 21 01:46:36 2013 (r245705)
> @@ -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",
>
More information about the svn-src-head
mailing list