Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Apr 2000 10:46:01 +0930
From:      Greg Lehey <grog@lemis.com>
To:        "Nandakumar.p.k" <nanda@procsys.com>
Cc:        FreeBSD Questions <questions@FreeBSD.ORG>
Subject:   Re: Debugging kernel using remote gdb
Message-ID:  <20000423104601.A4675@freebie.lemis.com>
In-Reply-To: <20000418090327.B514@freebie.lemis.com>
References:  <38FAEE09.4BB366B9@procsys.com> <20000418090327.B514@freebie.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, 18 April 2000 at  9:03:28 +0930, Greg Lehey wrote:
> On Monday, 17 April 2000 at 16:27:13 +0530, Nandakumar.p.k wrote:
>> Hi,
>>
>> I am not able to directly send the questions to freebsd - questions
>> hence i am sending this to you.
>
> We need to understand why you can't send to -questions.  Do you have
> DNS problems?

You still need to look at this.  What was the reply you got at your
last attempt?

>> We were trying to debug the kernel using remote gdb. We have followed
>> the instructions given in the Freebsd handbook.
>>
>> The host and the target machine were connected using a null modem
>> cable which was tested using Pcplus utility in DOS. In both the
>> machines the cable is connected to the COM1 port.  The cable has 3
>> pins connected. Tx to Rx. Rx to Tx and common ground. With this we
>> are able to send characters from one machine to other using the
>> terminal emulation pacage Pcplus in DOS.

That's not enough.  You need signal lines, at least crossed over DTR,
DSR, DCD, CTS and RTS.

>> The steps which we followed were as follows.
>> In the host machine
>> 1. Made a copy of the GENERIC kernel called MYKERNEL.
>> 2. The follwing additions were made to MYKERNEL
>>   options DDB
>>   device sio0 at isa? port "IO_COM1" flags 0x080
>> 3. Compiled using config -g and installed MYKERNEL .
>> 4. Made a copy of the kernel , kernel.debug
>> 5. Copied the kernel.debug to the target machine.
>>
>> In the target machine
>> 1. Strip -x kernel.debug & then reboot.
>> 2. At the boot prompt ,loaded kernel.debug
>> 3. Opened the debugger using boot -d
>>
>> In the host machine
>> 1. cd /usr/src/sys/compile/MYKERNEL
>> 2. gdb -k kernel
>> 3. (kgdb) target remote /dev/cuaa0
>>
>> In the target
>> 1.db>gdb
>> 2. s
>>
>> Now the following error message was displayed in the host
>>  Ignoring packet error,continuing..
>>  Ignoring packet error,continuing..
>>  Ignoring packet error,continuing..
>>  Could'nt establish connection to remote target
>>  Malformed response to offset query,timeout
>>
>> Any idea what is happening here ?

Yes, that's the cable.  You can solve the problem on the host machine
by setting the clocal attribute with stty, but I don't think the
target machine will react without DCD and DSR.

Greg
--
When replying to this message, please copy the original recipients.
For more information, see http://www.lemis.com/questions.html
Finger grog@lemis.com for PGP public key
See complete headers for address and phone numbers


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?20000423104601.A4675>