From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 28 01:52:19 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E70A716A4CE for ; Tue, 28 Sep 2004 01:52:18 +0000 (GMT) Received: from blackwater.lemis.com (wantadilla.lemis.com [192.109.197.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8589543D1F for ; Tue, 28 Sep 2004 01:52:16 +0000 (GMT) (envelope-from grog@lemis.com) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 96B1885654; Tue, 28 Sep 2004 11:22:12 +0930 (CST) Date: Tue, 28 Sep 2004 11:22:12 +0930 From: Greg 'groggy' Lehey To: Jerry Toung Message-ID: <20040928015212.GN12394@wantadilla.lemis.com> References: <200409241628.43022.jtoung@earthlink.net> <200409241648.10308.jtoung@earthlink.net> <4154B97B.7050902@teel.ws> <200409271107.21241.jtoung@arc.nasa.gov> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qySB1iFW++5nzUxH" Content-Disposition: inline In-Reply-To: <200409271107.21241.jtoung@arc.nasa.gov> User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: Mark Teel cc: freebsd-hackers@freebsd.org Subject: Re: remote debugging question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2004 01:52:19 -0000 --qySB1iFW++5nzUxH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Monday, 27 September 2004 at 11:07:21 -0700, Jerry Toung wrote: > Good morning list, > I CAN connect to the target but the 'bt" command return #0 0x00000000 in ?? > () at the remote. That suggests that you're not connected. > So this is what I am doing, hopefully somebody can tell me what I am > missing. I have 2 laptops same brand and model, both running > 6.0current and same kernel config. > > laptop A panics because of kld I am writing and I want to debug A with laptop > B. > > I reboot A and login and enter CTRL-ATL-ESC to get db> prompt, then enter > 'gdb', then enter 's'. At this point I don't get the db> prompt anymore and A > seems to be in a loop, is that normal? Yes. It's not in a loop, it's waiting for remote gdb. > on laptop B, the only thing I did is get the copy of kernel.debug.A > in /usr/obj/usr/src/sys/MYKERNEL You'll need the sources as well, but that's the next problem, not the one you're experiencing. > I 'cd' to that location an run > kgdb > file kernel.debug.A > set remotebaud 1 That's obviously wrong. This is the bit rate of the serial connection. I don't know what gdb does with such a speed (0.1 bytes per second), but it looks like it ignores it. > set remotebreak 1 > set debug remote 1 > target remote /dev/cuaa0 > > it connects, on B screen (not using X) I see > > Warning: Unable to find dynamic linker breakpoint function. > GDB will be unable to debug shared library initializers > and track explicitly loaded dynamic code. > warning: shared library handler failed to enable breakpoint > Sending packet: $qSymbol ::#5...Ack > Packet Received: > Packet qSymbol (symbol-lookup) is NOT supported This looks like a communication problem. Typically the connection should run at 9600 bps (well, it should run as fast as it can, but we've had problems above that speed). gdb has been significantly changed in the last few months, and it's possible that I'm out of date with some details. It's also possible that this is a bug that crept in there, but I'd first check the bit rates. My personal favourite for remote debugging is firewire. If you have the hardware, you should use it. I'm working on documentation, but there's a fair amount in gdb(4). The format of the fwcontrol and dconschat EUI64s has changed, and the man page needs changing as a result (doc committers please note). It should be obvious, though. > when I type 'bt', that's where I get > #0 0x00000000 in ?? () Yes, that's what I thought. > Please somebody advise since I can't do anything with that. And > laptop A is still hanging/loop, and no prompt. If you can't get the connection to work with the correct bit rate, you'll have to reset and reboot it. Greg -- See complete headers for address and phone numbers. --qySB1iFW++5nzUxH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBWMPMIubykFB6QiMRAp7jAJ9EN8UpXC/b8fConKhCDH3jMRp9cwCfbp36 4C0+XcXrEUwkoxPgHlA5eMQ= =sELg -----END PGP SIGNATURE----- --qySB1iFW++5nzUxH--