Re: remote debugging question

2004-09-29 Thread Marco Molteni
On Tue, 28 Sep 2004 16:22:29 -0700
Jerry Toung [EMAIL PROTECTED] wrote:

 Hi Greg,
 thank you for all the feedback. The set remotebaud 1 thing in my
 previous email was a typo, I usually enter 9600. 
 So you're saying that I may have a communication problem. I would like
 to point out that I can use cu -l cuaa0 -s 9600 on both side and all
 is well. What do you think could cause this communication issue? I
 will run another cvsup soon. May be a bug in 6.0current for kgdb.

[..]

Note also that you need a -current after 15 sept 2004 to
be able to properly set breakpoints and obtain a backtrace without
crashing the kernel.

(See the commit log for src/sys/i386/i386/gdb_machdep.c for details).

marco
-- 
panic(The moon has moved again.);
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: remote debugging question

2004-09-28 Thread Jerry Toung
Hi Greg,
thank you for all the feedback. The set remotebaud 1 thing in my previous 
email was a typo, I usually enter 9600. 
So you're saying that I may have a communication problem. I would like to 
point out that I can use cu -l cuaa0 -s 9600 on both side and all is well. 
What do you think could cause this communication issue? I will run another 
cvsup soon. May be a bug in 6.0current for kgdb.

On Monday 27 September 2004 06:52 pm, Greg 'groggy' Lehey wrote:

 You'll need the sources as well, but that's the next problem, not the
 one you're experiencing.


as for the sources that I am supposed to transfer to B (the remote), are you 
talking about /usr/src of A or /usr/obj of A or both? then mount_nfs?

My next option will be  firewire.
thank you,
Jerry



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: remote debugging question

2004-09-27 Thread Greg 'groggy' Lehey
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  0x 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  0x 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.


pgpDVsAswY2PA.pgp
Description: PGP signature