From owner-freebsd-questions Mon Dec 21 18:12:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA02539 for freebsd-questions-outgoing; Mon, 21 Dec 1998 18:12:22 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA02527 for ; Mon, 21 Dec 1998 18:12:10 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id MAA01251; Tue, 22 Dec 1998 12:41:23 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id MAA08467; Tue, 22 Dec 1998 12:41:22 +1030 (CST) Message-ID: <19981222124122.Q85005@freebie.lemis.com> Date: Tue, 22 Dec 1998 12:41:22 +1030 From: Greg Lehey To: Sheldon Hearn , freebsd-questions@FreeBSD.ORG Subject: Re: Remote kernel debugging over serial References: <4684.914270675@axl.noc.iafrica.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <4684.914270675@axl.noc.iafrica.com>; from Sheldon Hearn on Mon, Dec 21, 1998 at 10:04:35PM +0200 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 21 December 1998 at 22:04:35 +0200, Sheldon Hearn wrote: > > Hi folks, > > I'm trying to use the instructions in Chapter 22.4 of the handbook to > debug a problem I have using teh ATAPI CD-ROM driver in 2.2-STABLE. > > I think I've followed the instructions in the handbook to the letter, > but am having a bit of a problem trying to get gdb to talk to the > debugging kernel on the target host. I'm using a null modem cable on > serial0 of each box (/dev/cuaa0). The cable itself has been tested by a > friend using Wintendo games that called for "a null modem cable". I > assume there's only one workable wiring standard for such a thing. This is a bad assumption. There are all sorts of cables that could possibly be called ``null modem''. > This is the error I get: > >> [root@axl] /usr/src/sys/compile/GDB # gdb -k kernel >> GDB is free software and you are welcome to distribute copies of it >> under certain conditions; type "show copying" to see the conditions. >> There is absolutely no warranty for GDB; type "show warranty" for >> details. >> GDB 4.16 (i386-unknown-freebsd), >> Copyright 1996 Free Software Foundation, Inc... >> (kgdb) target remote /dev/cuaa0 >> Remote debugging using /dev/cuaa0 >> Ignoring packet error, continuing... >> Ignoring packet error, continuing... >> Couldn't establish connection to remote target >> Malformed response to offset query, timeout >> (kgdb) This is a pretty general message saying ``no connection''. You don't say what you were doing at the other end. Initially you need to get the other machine to go into ddb, for example by pressing ctrl-alt-esc, entering the command ``gdb'', and then single-stepping. If you don't do this, you will always get the messages you describe, whether or not you have a cable connected. If you're doing all this, it might be worth having a breakout box connected to see what's really going on. Looking at the cable I have connected on my setup, the debugged machine asserts RTS and DTR, the gdb machine asserts DCD and DSR and echos CTS for RTS. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message