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


Re: debugging question

2001-10-31 Thread Julian Elischer

Mark Santcroos wrote:
 
 Thats what I already said in my email :)
 
 I was hoping that there is some way to dump the codepath of the kernel.
 
 Or is it maybe possible from ddb to move the context of a certain process
 and trace from there?

tr PID
gives you teh stack of that PID

then set a breakpoint in a location that you know it will go through
(e.g. one of the return addresses given in the trace) and then 
continue.

 
 Mark
 
 ps. I have narrowed it down already a bit more and hope to come with a bug
 report on -current in the coming days.
 
 On Tue, Oct 30, 2001 at 03:38:45PM -0800, Julian Elischer wrote:
  when the system is looping, hit CTLALTESC
  to drop into the debugger.
 
  On Tue, 30 Oct 2001, Andrew R. Reiter wrote:
 
   On Tue, 30 Oct 2001, Mark Santcroos wrote:
  
   :How can I see in what piece of the kernel it is looping?
   :(I know about where it is, but not exactly)
   :
  
   Use ddb to set a break -- you may need to do this upon boot (boot -d)
  
   *-.
   | Andrew R. Reiter
   | [EMAIL PROTECTED]
   | "It requires a very unusual mind
   |   to undertake the analysis of the obvious" -- A.N. Whitehead
  
  
   To Unsubscribe: send mail to [EMAIL PROTECTED]
   with "unsubscribe freebsd-hackers" in the body of the message
  
 
 
  To Unsubscribe: send mail to [EMAIL PROTECTED]
  with "unsubscribe freebsd-hackers" in the body of the message
 
 --
 Mark Santcroos  RIPE Network Coordination Centre
 http://www.ripe.net/home/mark/  New Projects Group/TTM
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with "unsubscribe freebsd-hackers" in the body of the message

-- 
++   __ _  __
|   __--_|\  Julian Elischer |   \ U \/ / hard at work in 
|  /   \ [EMAIL PROTECTED] +--x   USA\ a very strange
| (   OZ)\___   ___ | country !
+- X_.---._/presently in San Francisco   \_/   \\
  v

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: debugging question

2001-10-31 Thread Mark Santcroos

Ah great. Thanks alot!

Mark

On Wed, Oct 31, 2001 at 01:11:07AM -0800, Julian Elischer wrote:
 Mark Santcroos wrote:
  
  Thats what I already said in my email :)
  
  I was hoping that there is some way to dump the codepath of the kernel.
  
  Or is it maybe possible from ddb to move the context of a certain process
  and trace from there?
 
 tr PID
 gives you teh stack of that PID
 
 then set a breakpoint in a location that you know it will go through
 (e.g. one of the return addresses given in the trace) and then 
 continue.
 
  
  Mark
  
  ps. I have narrowed it down already a bit more and hope to come with a bug
  report on -current in the coming days.
  
  On Tue, Oct 30, 2001 at 03:38:45PM -0800, Julian Elischer wrote:
   when the system is looping, hit CTLALTESC
   to drop into the debugger.
  
   On Tue, 30 Oct 2001, Andrew R. Reiter wrote:
  
On Tue, 30 Oct 2001, Mark Santcroos wrote:
   
:How can I see in what piece of the kernel it is looping?
:(I know about where it is, but not exactly)
:
   
Use ddb to set a break -- you may need to do this upon boot (boot -d)
   
*-.
| Andrew R. Reiter
| [EMAIL PROTECTED]
| It requires a very unusual mind
|   to undertake the analysis of the obvious -- A.N. Whitehead
   
   
To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message
   
  
  
   To Unsubscribe: send mail to [EMAIL PROTECTED]
   with unsubscribe freebsd-hackers in the body of the message
  
  --
  Mark Santcroos  RIPE Network Coordination Centre
  http://www.ripe.net/home/mark/  New Projects Group/TTM
  
  To Unsubscribe: send mail to [EMAIL PROTECTED]
  with unsubscribe freebsd-hackers in the body of the message
 
 -- 
 ++   __ _  __
 |   __--_|\  Julian Elischer |   \ U \/ / hard at work in 
 |  /   \ [EMAIL PROTECTED] +--x   USA\ a very strange
 | (   OZ)\___   ___ | country !
 +- X_.---._/presently in San Francisco   \_/   \\
   v
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-hackers in the body of the message

-- 
Mark Santcroos  RIPE Network Coordination Centre
http://www.ripe.net/home/mark/  New Projects Group/TTM

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



debugging question

2001-10-30 Thread Mark Santcroos

Hi

I suspect that there is some endless loop somewhere in my kernel
(-CURRENT).

I can escape to ddb but a trace ofcourse only goes back to spot where the
ddb gets called from the keyboard.

How can I see in what piece of the kernel it is looping?
(I know about where it is, but not exactly)

I hope that there is another way then to place printf's everywhere.


Thanks

Mark

-- 
Mark Santcroos  RIPE Network Coordination Centre
http://www.ripe.net/home/mark/  New Projects Group/TTM

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: debugging question

2001-10-30 Thread Andrew R. Reiter

On Tue, 30 Oct 2001, Mark Santcroos wrote:

:How can I see in what piece of the kernel it is looping?
:(I know about where it is, but not exactly)
:

Use ddb to set a break -- you may need to do this upon boot (boot -d)

*-.
| Andrew R. Reiter 
| [EMAIL PROTECTED]
| It requires a very unusual mind
|   to undertake the analysis of the obvious -- A.N. Whitehead


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: debugging question

2001-10-30 Thread Julian Elischer

when the system is looping, hit CTLALTESC
to drop into the debugger.

On Tue, 30 Oct 2001, Andrew R. Reiter wrote:

 On Tue, 30 Oct 2001, Mark Santcroos wrote:
 
 :How can I see in what piece of the kernel it is looping?
 :(I know about where it is, but not exactly)
 :
 
 Use ddb to set a break -- you may need to do this upon boot (boot -d)
 
 *-.
 | Andrew R. Reiter 
 | [EMAIL PROTECTED]
 | It requires a very unusual mind
 |   to undertake the analysis of the obvious -- A.N. Whitehead
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-hackers in the body of the message
 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: debugging question

2001-10-30 Thread Mark Santcroos

Thats what I already said in my email :)


I was hoping that there is some way to dump the codepath of the kernel.

Or is it maybe possible from ddb to move the context of a certain process
and trace from there?

Mark

ps. I have narrowed it down already a bit more and hope to come with a bug
report on -current in the coming days.

On Tue, Oct 30, 2001 at 03:38:45PM -0800, Julian Elischer wrote:
 when the system is looping, hit CTLALTESC
 to drop into the debugger.
 
 On Tue, 30 Oct 2001, Andrew R. Reiter wrote:
 
  On Tue, 30 Oct 2001, Mark Santcroos wrote:
  
  :How can I see in what piece of the kernel it is looping?
  :(I know about where it is, but not exactly)
  :
  
  Use ddb to set a break -- you may need to do this upon boot (boot -d)
  
  *-.
  | Andrew R. Reiter 
  | [EMAIL PROTECTED]
  | It requires a very unusual mind
  |   to undertake the analysis of the obvious -- A.N. Whitehead
  
  
  To Unsubscribe: send mail to [EMAIL PROTECTED]
  with unsubscribe freebsd-hackers in the body of the message
  
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-hackers in the body of the message

-- 
Mark Santcroos  RIPE Network Coordination Centre
http://www.ripe.net/home/mark/  New Projects Group/TTM

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



debugging question

2001-10-15 Thread David E. Cross

I received the following from gdb today:

#0  0x0 in ?? ()
#1  0x280a8d22 in svc_getreqset2 () from /usr/lib/libc.so.4
#2  0x280a8c5b in svc_getreqset () from /usr/lib/libc.so.4
#3  0x804c85f in yp_svc_run ()
#4  0x804cd94 in main ()
#5  0x8049a09 in _start ()

Uhm... I didn't think that was possible.  I thought the kernel stored the
last stack frame iteslf, from the SIG handler in kernel-space.

-- 
David Cross   | email: [EMAIL PROTECTED] 
Lab Director  | Rm: 308 Lally Hall
Rensselaer Polytechnic Institute, | Ph: 518.276.2860
Department of Computer Science| Fax: 518.276.4033
I speak only for myself.  | WinNT:Linux::Linux:FreeBSD

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message