From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 16 15:35:56 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 053284B3 for ; Wed, 16 Jan 2013 15:35:56 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id B3FFC9C for ; Wed, 16 Jan 2013 15:35:55 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id s9so2698398iec.41 for ; Wed, 16 Jan 2013 07:35:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer:x-gm-message-state; bh=tAms8dfU28PihyxzJF7t7q0DLQGJ50AMDAga/Tqxtak=; b=UfHEsvIyuve42ypqt5CV4vU5+7R5GEDFiGnCznivo5qSxz4xC1fpIIInWK/dAZm7t4 wud3TZmjMQ/TaGxhjlNVtHEGEb48FHAV7+7jP9mJOUWM2KA395qNHmWYboSOlNaW79b1 SjsVDWTgWEqlCL0CL3zkIs5XCWDlFR1lnh68zXpOWlFtTeMEuwl1zMwgMGnlxuERt4S7 arzRSSHmKgVaREG3Kvz0eG5lgPGSAXoPKwGvcgp3Xwo3T2sUs4lGxL47hNoQ/BPCNZZI gUhuIcDtIc38ncPXNigTPKM68qmjiowA3F8aH9PAhMPWcsotPOgUd2UVTR/XAXGpPDyZ DGDw== X-Received: by 10.50.190.162 with SMTP id gr2mr5105579igc.65.1358350555145; Wed, 16 Jan 2013 07:35:55 -0800 (PST) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id uj6sm5010562igb.4.2013.01.16.07.35.52 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Jan 2013 07:35:54 -0800 (PST) Sender: Warner Losh Subject: Re: [RFC] support -b when starting gdb Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Wed, 16 Jan 2013 08:35:51 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <89207049-41FF-479D-90EE-89652937AB29@bsdimp.com> References: To: Adrian Chadd X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQlUu5Y/Bc5Y2kgUNb1oUevgFZ2qVELU1nXgk0+dH6z1F3g2xXXy8XcQ6NvCB4W58iPUVIYC Cc: freebsd-hackers@freebsd.org, freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2013 15:35:56 -0000 How does 'set remotebaud' not do what you want? Warner On Jan 15, 2013, at 10:15 PM, Adrian Chadd wrote: > Hi, >=20 > There doesn't seem to be a blessed way to set the baudrate from inside > gdb/kgdb. It seems to be set from '-b' on the command line. >=20 > However kgdb doesn't have this support. >=20 > This patch adds -b support so kgdb so I can override the default speed > (9600 it seems) to speak kgdb over serial to a 115200 console MIPS > device. >=20 > The MIPS stuff has other issues; I'll talk about those later. >=20 > Thanks, >=20 >=20 >=20 > Adrian >=20 >=20 > Index: gnu/usr.bin/gdb/kgdb/main.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- gnu/usr.bin/gdb/kgdb/main.c (revision 245281) > +++ gnu/usr.bin/gdb/kgdb/main.c (working copy) > @@ -333,11 +333,24 @@ > args.argv =3D malloc(sizeof(char *)); > args.argv[0] =3D argv[0]; >=20 > - while ((ch =3D getopt(argc, argv, "ac:d:fn:qr:vw")) !=3D -1) { > + while ((ch =3D getopt(argc, argv, "ab:c:d:fn:qr:vw")) !=3D -1) = { > switch (ch) { > case 'a': > annotation_level++; > break; > + case 'b': > + { > + int i; > + char *p; > + > + i =3D strtol (optarg, &p, 0); > + if (i =3D=3D 0 && p =3D=3D optarg) > + warnx("warning: could not set baud > rate to `%s'.\n", > + optarg); > + else > + baud_rate =3D i; > + } > + break; > case 'c': /* use given core file. */ > if (vmcore !=3D NULL) { > warnx("option %c: can only be specified = once", > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org"