Skip site navigation (1)Skip section navigation (2)
Date:      19 Apr 1998 23:55:48 +0200
From:      dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= )
To:        current@FreeBSD.ORG
Subject:   Kernel debugging problems
Message-ID:  <xzp3ef9mq6z.fsf@hrotti.ifi.uio.no>

next in thread | raw e-mail | index | archive | help
I'm trying my hand at a little kernel debugging (lkm debugging
actually) as explained in the handbook, but get "no stack" when I try
to move up through the stack to examine the culprit function. What am
I doing wrong? It's not really important since I know what is causing
the trap, but I'd like some experience with kgdb.

root@helen ~# cd /sys/compile/helen/
root@helen /sys/compile/helen# gdb -k
GDB is free software and you are welcome to 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.
GDB 4.16 (i386-unknown-freebsd), Copyright 1996 Free Software Foundation, Inc.
(kgdb) symbol-file kernel.debug
Reading symbols from kernel.debug...done.
(kgdb) exec-file /var/crash/kernel.1
(kgdb) core-file /var/crash/vmcore.1
IdlePTD 1dc000
initial pcb at 1b4b88
panicstr: page fault
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0xf2efd030
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xf2efd030
stack pointer           = 0x10:0xf01a7f94
frame pointer           = 0x10:0xf01a7fb4
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = Idle
interrupt mask          =
trap number             = 12
panic: page fault

syncing disks... 10 10 6 done

dumping to dev 20001, offset 491520
dump 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
---
#0  0xf010f937 in boot ()
(kgdb) add-symbol-file /usr/src/lkm/syscons/stars/stars_saver_mod.o 0xf2efd020
add symbol table from file "/usr/src/lkm/syscons/stars/stars_saver_mod.o" at text_addr = 0xf2efd020?
(y or n) y
(kgdb) where
#0  0xf010f937 in boot ()
#1  0xf010fc06 in panic ()
#2  0xf01823f1 in trap_fatal (frame=0xf01a7f58) at ../../i386/i386/trap.c:875
#3  0xf0181e84 in trap_pfault (frame=0xf01a7f58, usermode=0)
    at ../../i386/i386/trap.c:768
#4  0xf0181aef in trap (frame={tf_es = 16, tf_ds = 16, tf_edi = -1073741824,
      tf_esi = -219164624, tf_ebp = -266698828, tf_isp = -266698880,
      tf_ebx = 0, tf_edx = 0, tf_ecx = -248537636, tf_eax = 1073741823,
      tf_trapno = 12, tf_err = 0, tf_eip = -219164624, tf_cs = 8,
      tf_eflags = 66118, tf_esp = -267305485, tf_ss = 0})
    at ../../i386/i386/trap.c:396
#5  0xf2efd030 in stars_update (arg=0x80000000) at stars_saver.c:60
(kgdb) up 5
No stack.
(kgdb) quit

-- 
Nobody else has a .sig like this one.

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



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