aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/gdb
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-01-19 14:27:41 +0000
committerBruce Evans <bde@FreeBSD.org>1998-01-19 14:27:41 +0000
commit04822660a1a37a9c653025cfb3e04a76c41341a5 (patch)
treeb48922f4d85e54e822c798af20f7909e6f7d410b /gnu/usr.bin/binutils/gdb
parentffbb164e192f411593761b5091980176076dec63 (diff)
Notes
Diffstat (limited to 'gnu/usr.bin/binutils/gdb')
-rw-r--r--gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c19
-rw-r--r--gnu/usr.bin/binutils/gdb/kvm-fbsd.c19
2 files changed, 2 insertions, 36 deletions
diff --git a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
index 5cb031134c68f..970d3a8483376 100644
--- a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
@@ -453,7 +453,6 @@ set_proc_cmd (arg, from_tty)
static CORE_ADDR sbr;
static CORE_ADDR curpcb;
-static CORE_ADDR kstack;
static int found_pcb;
static int devmem;
static int kfd;
@@ -473,9 +472,7 @@ kvm_open (efile, cfile, sfile, perm, errout)
char *errout; /* makes this kvm_open more compatible to the one in libkvm */
{
struct stat stb;
- CORE_ADDR addr;
int cfd;
- struct i386tss cts;
if ((cfd = open (cfile, perm, 0)) < 0)
return (cfd);
@@ -492,14 +489,12 @@ kvm_open (efile, cfile, sfile, perm, errout)
printf ("IdlePTD %x\n", sbr);
curpcb = ksym_lookup ("curpcb") - KERNOFF;
physrd (cfd, curpcb, (char*)&curpcb, sizeof curpcb);
- physrd (cfd, ksym_lookup ("common_tss") - KERNOFF, (char*)&cts, sizeof cts);
- kstack = cts.tss_ksp;
found_pcb = 1; /* for vtophys */
if (!devmem)
read_pcb (cfd, ksym_lookup ("dumppcb") - KERNOFF);
else
- read_pcb (cfd, kvtophys (cfd, kstack));
+ read_pcb (cfd, kvtophys (cfd, curpcb));
return (cfd);
}
@@ -722,18 +717,6 @@ kvtophys (fd, addr)
CORE_ADDR current_ptd;
/*
- * If we're looking at the kernel stack,
- * munge the address to refer to the user space mapping instead;
- * that way we get the requested process's kstack, not the running one.
- */
- /*
- * this breaks xlating user addresses from a crash dump so only
- * do it for a "live" kernel.
- */
- if (devmem && addr >= kstack && addr < kstack + ctob (UPAGES))
- addr = (addr - kstack) + curpcb;
-
- /*
* We may no longer have a linear system page table...
*
* Here's the scoop. IdlePTD contains the physical address
diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
index 5cb031134c68f..970d3a8483376 100644
--- a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
@@ -453,7 +453,6 @@ set_proc_cmd (arg, from_tty)
static CORE_ADDR sbr;
static CORE_ADDR curpcb;
-static CORE_ADDR kstack;
static int found_pcb;
static int devmem;
static int kfd;
@@ -473,9 +472,7 @@ kvm_open (efile, cfile, sfile, perm, errout)
char *errout; /* makes this kvm_open more compatible to the one in libkvm */
{
struct stat stb;
- CORE_ADDR addr;
int cfd;
- struct i386tss cts;
if ((cfd = open (cfile, perm, 0)) < 0)
return (cfd);
@@ -492,14 +489,12 @@ kvm_open (efile, cfile, sfile, perm, errout)
printf ("IdlePTD %x\n", sbr);
curpcb = ksym_lookup ("curpcb") - KERNOFF;
physrd (cfd, curpcb, (char*)&curpcb, sizeof curpcb);
- physrd (cfd, ksym_lookup ("common_tss") - KERNOFF, (char*)&cts, sizeof cts);
- kstack = cts.tss_ksp;
found_pcb = 1; /* for vtophys */
if (!devmem)
read_pcb (cfd, ksym_lookup ("dumppcb") - KERNOFF);
else
- read_pcb (cfd, kvtophys (cfd, kstack));
+ read_pcb (cfd, kvtophys (cfd, curpcb));
return (cfd);
}
@@ -722,18 +717,6 @@ kvtophys (fd, addr)
CORE_ADDR current_ptd;
/*
- * If we're looking at the kernel stack,
- * munge the address to refer to the user space mapping instead;
- * that way we get the requested process's kstack, not the running one.
- */
- /*
- * this breaks xlating user addresses from a crash dump so only
- * do it for a "live" kernel.
- */
- if (devmem && addr >= kstack && addr < kstack + ctob (UPAGES))
- addr = (addr - kstack) + curpcb;
-
- /*
* We may no longer have a linear system page table...
*
* Here's the scoop. IdlePTD contains the physical address