aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-05-12 16:49:13 +0000
committerBruce Evans <bde@FreeBSD.org>1998-05-12 16:49:13 +0000
commite7c80443b4fee4e0010138c3d0f11cf9e0f9293a (patch)
tree900eb81e78460de6a648f4dcbf2dfd9aaf14362e /gnu
parent12e553e05902a763a615d307de17308ba4e32e06 (diff)
Notes
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c4
-rw-r--r--gnu/usr.bin/binutils/gdb/kvm-fbsd.c4
-rw-r--r--gnu/usr.bin/gdb/gdb/kvm-fbsd.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
index 1f75dbe8a014..eca0f706a1b1 100644
--- a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
@@ -361,7 +361,7 @@ get_kcore_registers (regno)
struct user *uaddr;
/* find the pcb for the current process */
- if (kvread (&cur_proc->p_addr, &uaddr))
+ if (cur_proc == NULL || kvread (&cur_proc->p_addr, &uaddr))
error ("cannot read u area ptr for proc at %#x", cur_proc);
if (read_pcb (core_kd, (CORE_ADDR)&uaddr->u_pcb) < 0)
error ("cannot read pcb at %#x", &uaddr->u_pcb);
@@ -418,7 +418,7 @@ xfer_umem (memaddr, myaddr, len, write)
int n;
struct proc proc;
- if (kvread (cur_proc, &proc))
+ if (cur_proc == NULL || kvread (cur_proc, &proc))
error ("cannot read proc at %#x", cur_proc);
n = kvm_uread (core_kd, &proc, memaddr, myaddr, len) ;
diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
index 1f75dbe8a014..eca0f706a1b1 100644
--- a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
@@ -361,7 +361,7 @@ get_kcore_registers (regno)
struct user *uaddr;
/* find the pcb for the current process */
- if (kvread (&cur_proc->p_addr, &uaddr))
+ if (cur_proc == NULL || kvread (&cur_proc->p_addr, &uaddr))
error ("cannot read u area ptr for proc at %#x", cur_proc);
if (read_pcb (core_kd, (CORE_ADDR)&uaddr->u_pcb) < 0)
error ("cannot read pcb at %#x", &uaddr->u_pcb);
@@ -418,7 +418,7 @@ xfer_umem (memaddr, myaddr, len, write)
int n;
struct proc proc;
- if (kvread (cur_proc, &proc))
+ if (cur_proc == NULL || kvread (cur_proc, &proc))
error ("cannot read proc at %#x", cur_proc);
n = kvm_uread (core_kd, &proc, memaddr, myaddr, len) ;
diff --git a/gnu/usr.bin/gdb/gdb/kvm-fbsd.c b/gnu/usr.bin/gdb/gdb/kvm-fbsd.c
index 1f75dbe8a014..eca0f706a1b1 100644
--- a/gnu/usr.bin/gdb/gdb/kvm-fbsd.c
+++ b/gnu/usr.bin/gdb/gdb/kvm-fbsd.c
@@ -361,7 +361,7 @@ get_kcore_registers (regno)
struct user *uaddr;
/* find the pcb for the current process */
- if (kvread (&cur_proc->p_addr, &uaddr))
+ if (cur_proc == NULL || kvread (&cur_proc->p_addr, &uaddr))
error ("cannot read u area ptr for proc at %#x", cur_proc);
if (read_pcb (core_kd, (CORE_ADDR)&uaddr->u_pcb) < 0)
error ("cannot read pcb at %#x", &uaddr->u_pcb);
@@ -418,7 +418,7 @@ xfer_umem (memaddr, myaddr, len, write)
int n;
struct proc proc;
- if (kvread (cur_proc, &proc))
+ if (cur_proc == NULL || kvread (cur_proc, &proc))
error ("cannot read proc at %#x", cur_proc);
n = kvm_uread (core_kd, &proc, memaddr, myaddr, len) ;