From owner-freebsd-hackers Mon Oct 7 01:52:13 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA26416 for hackers-outgoing; Mon, 7 Oct 1996 01:52:13 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id BAA26410 for ; Mon, 7 Oct 1996 01:52:05 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.7.6/8.6.9) id SAA23202; Mon, 7 Oct 1996 18:47:50 +1000 Date: Mon, 7 Oct 1996 18:47:50 +1000 From: Bruce Evans Message-Id: <199610070847.SAA23202@godzilla.zeta.org.au> To: freebsd-hackers@FreeBSD.org, j@uriah.heep.sax.de Subject: Re: Another question: kernel crash dumps 8) Cc: hasty@rah.star-gate.com Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >As Amancio Hasty wrote: > >> #17 0xf01d36f7 in trap (frame={tf_es = 196624, tf_ds = 262160, >> tf_edi = -1073741824, tf_esi = 24499, tf_ebp = -266207472, >> tf_isp = -266207556, tf_ebx = 3, tf_edx = 6553500, tf_ecx = 4, >> tf_eax = -219578368, tf_trapno = 12, tf_err = 0, tf_eip = -266385786, >> tf_cs = 8, tf_eflags = 66070, tf_esp = 3, tf_ss = 21}) >> at ../../i386/i386/trap.c:311 >> #18 0xf01cb6c1 in calltrap () > >> So it seems that the current running routine's context is not being saved. Trap, interrupt and syscall handlers handlers don't have a normal frame. This results in the context of the routine that was running when the trap occurred being invisible in gdb. The problem is most critical for traps in kernel mode. For traps in user mode and syscalls, you usually don't care what was running when the trap occurred. >Get the latest gdb with Garett's modifications, or read the section >about kernel debugging in the handbook. I've described the procedure >how to do this at least a dozen times -- do you read these lists? > >(Hint: ``frame frame->tf_ebp frame->tf_eip'') Or recover my work-around from rev.1.10 of i386/exception.s. It is only for traps. Syscalls are interrupts are too hard/expensive to fix in the same way. The debugger needs to understand the frame. Bruce