remote debugging question

Greg 'groggy' Lehey grog at FreeBSD.org
Mon Sep 27 18:52:19 PDT 2004


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20040928/e1afb442/attachment.bin


More information about the freebsd-hackers mailing list