Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jun 2001 10:48:56 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        obrien@FreeBSD.ORG
Cc:        Freebsd-alpha@FreeBSD.ORG
Subject:   Re: -current kernel still considered dangerous
Message-ID:  <15134.17112.301087.463407@grasshopper.cs.duke.edu>
In-Reply-To: <20010606072708.A96129@dragon.nuxi.com>
References:  <20010605170234.B95616@dragon.nuxi.com> <XFMail.010605171458.jhb@FreeBSD.org> <15133.30473.480681.753965@grasshopper.cs.duke.edu> <20010605174808.F95616@dragon.nuxi.com> <20010605183942.G95616@dragon.nuxi.com> <15134.14841.825808.882824@grasshopper.cs.duke.edu> <20010606072708.A96129@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help


David O'Brien writes:
 > On Wed, Jun 06, 2001 at 10:11:05AM -0400, Andrew Gallatin wrote:
 > > 
 > > I just built a kernel statically & found it.
 > 
 > I was hoping to learn how to debug modules.  Is there no way we would
 > have found this w/o building OSF1 support statically in the kernel?

I was in a hurry & I generally don't use modules on -current.

You can try http://www.cs.duke.edu/~gallatin/gdbmods.  It has some
historical goop for 'target kcore' (which used to be required rather
than 'gdb -k' on alpha) which needs to be ripped out.  I'm not so sure
of how well it works on -current.

A typical usage is (from an x86 4.3) is:

# gdbmods 0
please be patient while loaded modules are resolved
gdbmods using kernel: /var/crash/kernel.0
gdbmods using core:   /var/crash/vmcore.0
added symbols for module usb.ko
added symbols for module clan.ko
command line: gdb -k -x /tmp/mytmp.root  /var/crash/kernel.0 /var/crash/vmcore.0
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 4091904
initial pcb at 34b860
panicstr: free: multiple frees
panic messages:
---
<...>
0  dumpsys () at ../../kern/kern_shutdown.c:469

<...>

#10 0xc2f0d5bd in gni_map_and_lock (priv=0xc2f36400, rgn=0xc3163000, 
    op=MAPOP_REG, is_kaddr=0)
    at /usr/project/ari1/users/gallatin/clan/clan-1.3.0/freebsd/clanhw/clan1k.c:2549
#11 0xc2f0d799 in gni_register (priv=0xc2f36400, 
    addr=0x766cfff <Address 0x766cfff out of bounds>, len=10485760, 
    do_register=1, enable_rdma=1, handle=0xee8a9e70, is_kaddr=0, p=0xee8902a0)
    at /usr/project/ari1/users/gallatin/clan/clan-1.3.0/freebsd/clanhw/clan1k.c:2668
#12 0xc2f0b9f8 in gni_fileioctl (fp=0xc2fcdfc0, cmd=3222554370, 
    data=0xee8a9eac "ÿÏf\a", p=0xee8902a0)
    at /usr/project/ari1/users/gallatin/clan/clan-1.3.0/freebsd/clanhw/clan1k.c:232
<...>


Note that "gni_*" are functions in the module clan.ko

Drew

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15134.17112.301087.463407>