Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Feb 2009 15:40:56 -0800
From:      "David Christensen" <davidch@broadcom.com>
To:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Hopefully Simple Question on Debugging Kernel Modules
Message-ID:  <5D267A3F22FD854F8F48B3D2B5238193394588D54D@IRVEXCHCCR01.corp.ad.broadcom.com>

next in thread | raw e-mail | index | archive | help
I'm sure this is a simple question but the answer is alluding my Google
search capabilities.  My driver is being loaded as a kernel module and
is failing with the following error:

Fatal trap 12: page fault while in kernel mode
cpuid =3D 0; apic id =3D 00
fault virtual address   =3D 0xfffffffe40abe9dc
fault code              =3D supervisor write data, page not present
instruction pointer     =3D 0x8:0xffffffff920b638f
stack pointer           =3D 0x10:0xffffffff9212bb10
frame pointer           =3D 0x10:0xffffffff9212bbb0
code segment            =3D base 0x0, limit 0xfffff, type 0x1b
                        =3D DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        =3D interrupt enabled, resume, IOPL =3D 0
current process         =3D 12 (irq268: bce0)
[thread pid 12 tid 100166 ]
Stopped at      bce_intr+0x8df: addl    $0x1,0x2c854(%r12,%rax,4)
db>

I simply need to find the offending source line in my driver.  Not sure=20
how I've managed to get the driver running at all without this but it's=20
time to do things the right way.  I have KDB/DDB/GDB built into my=20
-CURRENT kernel already.  It'd be great to find the source line while in
the kernel debugger but I'm also fine with rebooting the system to=20
identify the line number.

Dave





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