diff options
Diffstat (limited to 'gdb/sparc64-obsd-tdep.c')
-rw-r--r-- | gdb/sparc64-obsd-tdep.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/sparc64-obsd-tdep.c b/gdb/sparc64-obsd-tdep.c index 9e678d2..cf3138a 100644 --- a/gdb/sparc64-obsd-tdep.c +++ b/gdb/sparc64-obsd-tdep.c @@ -27,6 +27,7 @@ #include "symtab.h" #include "objfiles.h" #include "trad-frame.h" +#include "inferior.h" #include "obsd-tdep.h" #include "sparc64-tdep.h" @@ -328,6 +329,9 @@ sparc64obsd_supply_uthread (struct regcache *regcache, CORE_ADDR fp, fp_addr = addr + SPARC64OBSD_UTHREAD_FP_OFFSET; gdb_byte buf[8]; + /* This function calls functions that depend on the global current thread. */ + gdb_assert (regcache->ptid () == inferior_ptid); + gdb_assert (regnum >= -1); fp = read_memory_unsigned_integer (fp_addr, 8, byte_order); @@ -373,6 +377,9 @@ sparc64obsd_collect_uthread(const struct regcache *regcache, CORE_ADDR sp; gdb_byte buf[8]; + /* This function calls functions that depend on the global current thread. */ + gdb_assert (regcache->ptid () == inferior_ptid); + gdb_assert (regnum >= -1); if (regnum == SPARC_SP_REGNUM || regnum == -1) |