forked from Imagelibrary/binutils-gdb
Consolidate save_inferior_ptid/restore_inferior_ptid implementation to
one source file.
This commit is contained in:
@@ -60,24 +60,6 @@ typedef size_t gdb_ps_size_t;
|
||||
|
||||
/* Helper functions. */
|
||||
|
||||
static void
|
||||
restore_inferior_ptid (void *arg)
|
||||
{
|
||||
ptid_t *saved_pid_ptr = arg;
|
||||
inferior_ptid = *saved_pid_ptr;
|
||||
xfree (arg);
|
||||
}
|
||||
|
||||
static struct cleanup *
|
||||
save_inferior_ptid (void)
|
||||
{
|
||||
ptid_t *saved_ptid_ptr;
|
||||
|
||||
saved_ptid_ptr = xmalloc (sizeof (ptid_t));
|
||||
*saved_ptid_ptr = inferior_ptid;
|
||||
return make_cleanup (restore_inferior_ptid, saved_ptid_ptr);
|
||||
}
|
||||
|
||||
/* Transfer LEN bytes of memory between BUF and address ADDR in the
|
||||
process specified by PH. If WRITE, transfer them to the process,
|
||||
else transfer them from the process. Returns PS_OK for success,
|
||||
|
||||
Reference in New Issue
Block a user