Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Dec 1998 12:41:22 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Sheldon Hearn <axl@iafrica.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Remote kernel debugging over serial
Message-ID:  <19981222124122.Q85005@freebie.lemis.com>
In-Reply-To: <4684.914270675@axl.noc.iafrica.com>; from Sheldon Hearn on Mon, Dec 21, 1998 at 10:04:35PM %2B0200
References:  <4684.914270675@axl.noc.iafrica.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981222124122.Q85005>