From owner-svn-src-head@FreeBSD.ORG Tue Feb 19 02:09:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E68BE910; Tue, 19 Feb 2013 02:09:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A89D3346; Tue, 19 Feb 2013 02:09:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1J29JZO009858; Tue, 19 Feb 2013 02:09:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1J29Ja8009856; Tue, 19 Feb 2013 02:09:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201302190209.r1J29Ja8009856@svn.freebsd.org> From: Adrian Chadd Date: Tue, 19 Feb 2013 02:09:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246958 - head/gnu/usr.bin/gdb/kgdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2013 02:09:20 -0000 Author: adrian Date: Tue Feb 19 02:09:18 2013 New Revision: 246958 URL: http://svnweb.freebsd.org/changeset/base/246958 Log: 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 Modified: head/gnu/usr.bin/gdb/kgdb/kgdb.1 head/gnu/usr.bin/gdb/kgdb/main.c Modified: head/gnu/usr.bin/gdb/kgdb/kgdb.1 ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/kgdb.1 Tue Feb 19 02:07:36 2013 (r246957) +++ head/gnu/usr.bin/gdb/kgdb/kgdb.1 Tue Feb 19 02:09:18 2013 (r246958) @@ -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 Modified: head/gnu/usr.bin/gdb/kgdb/main.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/main.c Tue Feb 19 02:07:36 2013 (r246957) +++ head/gnu/usr.bin/gdb/kgdb/main.c Tue Feb 19 02:09:18 2013 (r246958) @@ -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",