Subject: lib/1135: libkvm update for crash dumps
To: None <gnats-admin@sun-lamp.pc.cs.cmu.edu>
From: James Jegers <jimj@enigma.cs.uwm.edu>
List: netbsd-bugs
Date: 06/19/1995 23:05:14
>Number: 1135
>Category: lib
>Synopsis: libkvm update for crash dumps
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Jun 19 23:05:12 1995
>Originator: James Jegers
>Organization:
>Release: 6/1/95<NetBSD-current source date>
>Environment:
System: NetBSD enigma.cs.uwm.edu 1.0A NetBSD 1.0A (ENIGMA) #0: Wed Apr 19 22:19:50 CDT 1995 jimj@enigma.cs.uwm.edu:/usr/src/sys/arch/i386/compile/ENIGMA i386
>Description:
I've been trying to debug kernel crash dumps and here is a
start at the changes which are needed to libkvm to make it
understand kernel crash files. hopefully someone who understands
this better can finish it up. With these patches the gdb can
find and print the panic string from the kernel dump.
>How-To-Repeat:
>Fix:
*** ../libkvm/kvm_i386.c Tue Jun 13 21:03:56 1995
--- kvm_i386.c Wed Jun 14 14:07:36 1995
***************
*** 99,104 ****
--- 99,105 ----
return (-1);
kd->vmst = vm;
+ #ifdef dunno
nlist[0].n_name = "_IdlePTD";
nlist[1].n_name = 0;
***************
*** 117,122 ****
--- 118,124 ----
_kvm_err(kd, kd->program, "cannot read PTD");
return (-1);
}
+ #endif
return (0);
}
***************
*** 137,143 ****
return(0);
}
vm = kd->vmst;
! offset = va & PGOFSET;
invalid:
_kvm_err(kd, 0, "invalid address (%x)", va);
--- 139,148 ----
return(0);
}
vm = kd->vmst;
! /* offset = va & PGOFSET; */
!
! *pa = va - KERNBASE;
! return(5000); /* XXX For now any big number works */
invalid:
_kvm_err(kd, 0, "invalid address (%x)", va);
>Audit-Trail:
>Unformatted: