sparc_fetch_wcookie (struct gdbarch *gdbarch)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- struct target_ops *ops = current_top_target ();
+ struct target_ops *ops = current_inferior ()->top_target ();
gdb_byte buf[8];
int len;
gdb_byte buf[8];
int i;
+ /* This function calls functions that depend on the global current thread. */
+ gdb_assert (regcache->ptid () == inferior_ptid);
+
if (sp & 1)
{
/* Registers are 64-bit. */
gdb_byte buf[8];
int i;
+ /* This function calls functions that depend on the global current thread. */
+ gdb_assert (regcache->ptid () == inferior_ptid);
+
if (sp & 1)
{
/* Registers are 64-bit. */