NetBSD Problem Report #1135

From gnats  Mon Jun 19 23:00:51 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id XAA18974 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 19 Jun 1995 23:00:44 -0400
Message-Id: <199506151601.LAA07334@enigma.cs.uwm.edu>
Date: Thu, 15 Jun 1995 11:01:21 -0500
From: James Jegers <jimj@enigma.cs.uwm.edu>
Reply-To: jimj@enigma.cs.uwm.edu
To: gnats-bugs@NetBSD.ORG
Subject: libkvm update for crash dumps
X-Send-Pr-Version: 3.2

>Number:         1135
>Category:       lib
>Synopsis:       libkvm update for crash dumps
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 19 23:05:12 +0000 1995
>Closed-Date:    Mon Jun 26 13:32:52 +0000 1995
>Last-Modified:  
>Originator:     James Jegers
>Release:        6/1/95<NetBSD-current source date>
>Organization:

>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);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cgd 
State-Changed-When: Mon Jun 26 09:32:52 EDT 1995 
State-Changed-Why:  
fixed, completely differently.  The patch supplied was ... rather lacking, 
and, indeed, i386 libkvm couldn't easily be made to work w/o adding something 
similar to "IdlePTD" back into the kernel.  Now it's called PTDpaddr. 

i386 libkvm now works properly on i386 kernel core dumps, e.g. i can 
run 'ps' on a core dump and get the correct output. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.