summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1995-07-08 01:55:54 +0000
committercgd <cgd@NetBSD.org>1995-07-08 01:55:54 +0000
commit9b7ebcf785a877e846d8dc7ce01dabb5327c5ea7 (patch)
tree9d1cbb1fadbdc42ebf367124ae445160582a3124 /gnu
parentfd0f5592158dbbdcd8bed052d382e755864319e6 (diff)
on i386, use VM_MAXUSER_ADDRESS for kernel_start, since the real
kernel start is much different that the start of KVM. (VM_MAXUSER_ADDRESS isn't correct, but seems to mostly work...) (XXX -- there should be a better way.) if curproc == null, use address of proc0; code doesn't know how to deal with null curproc. (XXX: (1) should make it deal, or (2) should use address of last proc run, but there's no real way to do that.)
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/gdb/gdb/kcorelow.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gnu/usr.bin/gdb/gdb/kcorelow.c b/gnu/usr.bin/gdb/gdb/kcorelow.c
index 00c1a547896..7fa1c4d3906 100644
--- a/gnu/usr.bin/gdb/gdb/kcorelow.c
+++ b/gnu/usr.bin/gdb/gdb/kcorelow.c
@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: kcorelow.c,v 1.3 1995/01/12 10:17:52 pk Exp $
+ $Id: kcorelow.c,v 1.4 1995/07/08 01:55:54 cgd Exp $
*/
#ifdef KERNEL_DEBUG
@@ -89,6 +89,10 @@ curProc()
if (kvread(addr, &p))
error("cannot read proc pointer at %x\n", addr);
+
+ if (p == NULL)
+ p = (struct proc *)ksym_lookup("proc0");
+
return p;
}
@@ -154,7 +158,11 @@ kcore_open (filename, from_tty)
if (exec_bfd == NULL)
error("No kernel image specified");
- kernel_start = bfd_get_start_address (exec_bfd); /* XXX */
+#ifndef __i386__ /* XXX */
+ kernel_start = bfd_get_start_address (exec_bfd);
+#else /* XXX */
+ kernel_start = VM_MAXUSER_ADDRESS; /* XXX */
+#endif /* XXX */
target_preopen (from_tty);
if (!filename) {