Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2013 09:25:42 -0700
From:      Julian Elischer <julian@freebsd.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r245705 - head/gnu/usr.bin/gdb/kgdb
Message-ID:  <50FD6C06.6030103@freebsd.org>
In-Reply-To: <201301210146.r0L1kaVW002083@svn.freebsd.org>
References:  <201301210146.r0L1kaVW002083@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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",
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50FD6C06.6030103>