From owner-freebsd-current Sun Apr 19 14:56:02 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA21529 for freebsd-current-outgoing; Sun, 19 Apr 1998 14:56:02 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA21491 for ; Sun, 19 Apr 1998 21:55:59 GMT (envelope-from dag-erli@ifi.uio.no) Received: from hrotti.ifi.uio.no (2602@hrotti.ifi.uio.no [129.240.64.15]) by ifi.uio.no (8.8.8/8.8.7/ifi0.2) with ESMTP id XAA11310 for ; Sun, 19 Apr 1998 23:55:49 +0200 (MET DST) Received: (from dag-erli@localhost) by hrotti.ifi.uio.no ; Sun, 19 Apr 1998 23:55:49 +0200 (MET DST) Mime-Version: 1.0 To: current@FreeBSD.ORG Subject: Kernel debugging problems Organization: Gutteklubben Terrasse / KRST / PUMS / YASMW X-url: http://www.stud.ifi.uio.no/~dag-erli/ X-Stop-Spam: http://www.cauce.org From: dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= ) Date: 19 Apr 1998 23:55:48 +0200 Message-ID: Lines: 63 X-Mailer: Gnus v5.5/Emacs 19.34 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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