diff options
-rw-r--r-- | gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/kvm-fbsd.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/gdb/gdb/kvm-fbsd.c | 4 |
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 1f75dbe..eca0f70 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 1f75dbe..eca0f70 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 1f75dbe..eca0f70 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) ; |