Re: Kernel debugging - what's the procedure?

2002-04-08 Thread Josef Karthauser

On Sun, Apr 07, 2002 at 01:54:08PM -0700, Terry Lambert wrote:
 Josef Karthauser wrote:
   You use another machine, and connect the serial ports together.
   See the handbook for details.
  
  I'd love to ;) but no additional machine is available at the moment.
 
 Then you install vmware, and Julian's back-to-back serial
 driver, and then run the kernel to be debuged in the vmware
 session.  This lets you debug the kernel on a virtual
 machine (single CPU only).

Yes I do have vmware, but it's not going to help me debug the usb stack
is it?  (I know vmware3 does usb, but not if the underlying usb stack on
the host machine is also hosed).
 
   If this is against a dead kernel, etiher your dump image is
   bad, or it doesn't match the kernel that made the dump.
  
  That's what I'd guess too, but the kernel that crashed is the same as
  the kernel that I'm debugging it on - I'm pretty sure: compiled today.
 
 Well, since this is the -current list... have you updated
 recently?  There were some recent changes by PHK to the dump
 format that may have broken/fixed things, if your answer to
 that question is yes/no, respectively.

Yes, that's what I implied by the above paragraph.  I was up-to-date
with sources yesterday.

Joe



msg37087/pgp0.pgp
Description: PGP signature


Re: Kernel debugging - what's the procedure?

2002-04-08 Thread Terry Lambert

Josef Karthauser wrote:
 
 On Sun, Apr 07, 2002 at 01:54:08PM -0700, Terry Lambert wrote:
  Josef Karthauser wrote:
You use another machine, and connect the serial ports together.
See the handbook for details.
  
   I'd love to ;) but no additional machine is available at the moment.
 
  Then you install vmware, and Julian's back-to-back serial
  driver, and then run the kernel to be debuged in the vmware
  session.  This lets you debug the kernel on a virtual
  machine (single CPU only).
 
 Yes I do have vmware, but it's not going to help me debug the usb stack
 is it?  (I know vmware3 does usb, but not if the underlying usb stack on
 the host machine is also hosed).

It's my understanding that you can assign resources to the
vmware machine, which it can then permit to be accessed
natively.  Thus, if you gave your USB ports to the vmware
virtual machine entirely, this would resolve the problem.

The vmware3 support for usb appears (to me) to be a tunnel
driver, like the standard network driver interface (e.g. it
pretends to be hardware, and uses a host driver to contact
the real hardware, so that its use can be multiplexed and
thus the device accessed by etiher the real or the virtual
machine).

  Well, since this is the -current list... have you updated
  recently?  There were some recent changes by PHK to the dump
  format that may have broken/fixed things, if your answer to
  that question is yes/no, respectively.
 
 Yes, that's what I implied by the above paragraph.  I was up-to-date
 with sources yesterday.

This is probably your problem.

If you can back up to when the problem first appeared, or
back out the kernel dump fule generation modifications,
this would probably fix your problems.  If you look at
the -current list archives, you will see a number of posts
which identify the files which have changed, and are probably
what is breaking you [ comments on policy related to commits
of kernel changes without corresponding commits to user space
utilities elided ].

-- Terry

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



Re: Kernel debugging - what's the procedure?

2002-04-08 Thread Josef Karthauser

On Mon, Apr 08, 2002 at 04:25:59AM -0700, Terry Lambert wrote:
 
  Yes, that's what I implied by the above paragraph.  I was up-to-date
  with sources yesterday.
 
 This is probably your problem.
 
 If you can back up to when the problem first appeared, or
 back out the kernel dump fule generation modifications,
 this would probably fix your problems.  If you look at
 the -current list archives, you will see a number of posts
 which identify the files which have changed, and are probably
 what is breaking you [ comments on policy related to commits
 of kernel changes without corresponding commits to user space
 utilities elided ].

Looking at todays commits it looks like the gdb/kernel coredump problem
has been fixed, at bde's bequest.

Joe



msg37094/pgp0.pgp
Description: PGP signature


Kernel debugging - what's the procedure?

2002-04-07 Thread Josef Karthauser

What's the current method for debugging kernels?

genius# gdb -k /usr/obj/usr/src/sys/GENIUS/kernel.debug 
5d079ab35c111057dbbf8f242940bbad.core
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or 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.
This GDB was configured as i386-unknown-freebsd...
IdlePTD at phsyical address 0x004b1000

kernel symbol `dumppcb' not found.
Attaching to program: /usr/obj/usr/src/sys/GENIUS/kernel.debug, process 5

ptrace: Invalid argument.
(kgdb) quit

Is this something I'm doing wrong, or it is a bug somewhere?   What's
'dumppcb'?

Joe



msg37044/pgp0.pgp
Description: PGP signature


Re: Kernel debugging - what's the procedure?

2002-04-07 Thread Terry Lambert

Josef Karthauser wrote:
 What's the current method for debugging kernels?
 
 genius# gdb -k /usr/obj/usr/src/sys/GENIUS/kernel.debug 
Running kernels?

You use another machine, and connect the serial ports together.
See the handbook for details.

If this is against a dead kernel, etiher your dump image is
bad, or it doesn't match the kernel that made the dump.

-- Terry

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



Re: Kernel debugging - what's the procedure?

2002-04-07 Thread Josef Karthauser

On Sun, Apr 07, 2002 at 03:29:41AM -0700, Terry Lambert wrote:
 Josef Karthauser wrote:
  What's the current method for debugging kernels?
  
  genius# gdb -k /usr/obj/usr/src/sys/GENIUS/kernel.debug 
 Running kernels?
 
 You use another machine, and connect the serial ports together.
 See the handbook for details.

I'd love to ;) but no additional machine is available at the moment.
 
 If this is against a dead kernel, etiher your dump image is
 bad, or it doesn't match the kernel that made the dump.

That's what I'd guess too, but the kernel that crashed is the same as
the kernel that I'm debugging it on - I'm pretty sure: compiled today.

Joe



msg37052/pgp0.pgp
Description: PGP signature


Re: Kernel debugging - what's the procedure?

2002-04-07 Thread David O'Brien

On Sun, Apr 07, 2002 at 10:13:35AM +0100, Josef Karthauser wrote:
 What's the current method for debugging kernels?
 
 genius# gdb -k /usr/obj/usr/src/sys/GENIUS/kernel.debug 
5d079ab35c111057dbbf8f242940bbad.core
...
 
 kernel symbol `dumppcb' not found.
 Attaching to program: /usr/obj/usr/src/sys/GENIUS/kernel.debug, process 5
 
 ptrace: Invalid argument.
 (kgdb) quit

You also did not read in the core file.

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



Re: Kernel debugging - what's the procedure?

2002-04-07 Thread Terry Lambert

Josef Karthauser wrote:
  You use another machine, and connect the serial ports together.
  See the handbook for details.
 
 I'd love to ;) but no additional machine is available at the moment.

Then you install vmware, and Julian's back-to-back serial
driver, and then run the kernel to be debuged in the vmware
session.  This lets you debug the kernel on a virtual
machine (single CPU only).


  If this is against a dead kernel, etiher your dump image is
  bad, or it doesn't match the kernel that made the dump.
 
 That's what I'd guess too, but the kernel that crashed is the same as
 the kernel that I'm debugging it on - I'm pretty sure: compiled today.

Well, since this is the -current list... have you updated
recently?  There were some recent changes by PHK to the dump
format that may have broken/fixed things, if your answer to
that question is yes/no, respectively.

-- Terry

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



Re: Kernel debugging - what's the procedure?

2002-04-07 Thread Julian Elischer



On Sun, 7 Apr 2002, Josef Karthauser wrote:

 On Sun, Apr 07, 2002 at 03:29:41AM -0700, Terry Lambert wrote:
  
  You use another machine, and connect the serial ports together.
  See the handbook for details.
 
 I'd love to ;) but no additional machine is available at the moment.

run it in vmware and connect it to the NMDM(4) drivers

  
  If this is against a dead kernel, etiher your dump image is
  bad, or it doesn't match the kernel that made the dump.
 
 That's what I'd guess too, but the kernel that crashed is the same as
 the kernel that I'm debugging it on - I'm pretty sure: compiled today.

I'm not sure it all works right now as people have been doing things with
the dump code.

 
 Joe
 


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



Re: Kernel debugging - what's the procedure?

2002-04-07 Thread Bruce Evans

On Sun, 7 Apr 2002, Josef Karthauser wrote:

 What's the current method for debugging kernels?

 genius# gdb -k /usr/obj/usr/src/sys/GENIUS/kernel.debug 
5d079ab35c111057dbbf8f242940bbad.core
 ...
 kernel symbol `dumppcb' not found.
 Attaching to program: /usr/obj/usr/src/sys/GENIUS/kernel.debug, process 5

 ptrace: Invalid argument.
 (kgdb) quit

Review all commits and note the unreviewed one that blew away dumppcb?

Bruce


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