CORE_ADDR addr = ptid_get_tid (ptid);
struct target_ops *beneath = find_target_beneath (ops);
CORE_ADDR active_addr;
- struct cleanup *cleanup = save_inferior_ptid ();
+ scoped_restore save_inferior_ptid = make_scoped_restore (&inferior_ptid);
/* We are doing operations (e.g. reading memory) that rely on
inferior_ptid. */
uthread_ops->supply_uthread (regcache, regnum,
addr + bsd_uthread_thread_ctx_offset);
}
-
- do_cleanups (cleanup);
}
static void
ptid_t ptid = regcache_get_ptid (regcache);
CORE_ADDR addr = ptid_get_tid (ptid);
CORE_ADDR active_addr;
- struct cleanup *cleanup = save_inferior_ptid ();
+ scoped_restore save_inferior_ptid = make_scoped_restore (&inferior_ptid);
/* We are doing operations (e.g. reading memory) that rely on
inferior_ptid. */
request to the layer beneath. */
beneath->to_store_registers (beneath, regcache, regnum);
}
-
- do_cleanups (cleanup);
}
static ptid_t