From owner-freebsd-current@FreeBSD.ORG Wed Jan 16 15:36:01 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AF6C74B6 for ; Wed, 16 Jan 2013 15:36:01 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) by mx1.freebsd.org (Postfix) with ESMTP id 7F0769F for ; Wed, 16 Jan 2013 15:36:01 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id c13so2752372ieb.31 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=cgMbCbgWjv3XKSwM/DuvzRMmgNw5iIzZMYaTpdmD+rw90kq2+kuySDphvA19kYSPPr DaDW1OCIbGRTuhE+GSgeoPsYAmorAU3axvWRvrm7wUzgDw2qyGLMteVzYMEPxOXYIHwr WsFGhR8vBDMD9Ztv8UO10TBsAyvqn5kOoFoH5iobKeahuzpf8WWuTk+pb616ZGQiaiiY EhF1WSBh+SbuezMA+TGgV3LI+QMAomvftZP44lfs9QmIWJ9/BTZY8QMWHLhkuOx/Abk6 cVi2thr4uoI0WxmHh7fS17oPNY15S+1x8LRv7Lnunm2J2avwSlNk/foRXbKU8eMoX+OO TO5Q== 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: ALoCoQnavaLw/J5TE69n2OZ9oysjA7u8ZpNzj/0ZnH2tkF2A+ZgJdlJeaAxGqChKswch0lrv63MK Cc: freebsd-hackers@freebsd.org, freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2013 15:36:01 -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"