summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c2
-rw-r--r--gnu/usr.bin/binutils/gdb/kvm-fbsd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
index 8a91d97..45d90a0 100644
--- a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
@@ -206,7 +206,7 @@ curProc ()
if (kvread (addr, &td))
error ("cannot read thread pointer at %x\n", addr);
- addr = (CORE_ADDR)td->td_proc;
+ addr = (CORE_ADDR)td + offsetof(struct thread, td_proc);
if (kvread (addr, &p))
error ("cannot read proc pointer at %x\n", addr);
return p;
diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
index 8a91d97..45d90a0 100644
--- a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
@@ -206,7 +206,7 @@ curProc ()
if (kvread (addr, &td))
error ("cannot read thread pointer at %x\n", addr);
- addr = (CORE_ADDR)td->td_proc;
+ addr = (CORE_ADDR)td + offsetof(struct thread, td_proc);
if (kvread (addr, &p))
error ("cannot read proc pointer at %x\n", addr);
return p;
OpenPOWER on IntegriCloud