aboutsummaryrefslogtreecommitdiff
path: root/gdb/btrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/btrace.c')
-rw-r--r--gdb/btrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/btrace.c b/gdb/btrace.c
index 10224c5..2a83e1b 100644
--- a/gdb/btrace.c
+++ b/gdb/btrace.c
@@ -1908,14 +1908,14 @@ btrace_fetch (struct thread_info *tp)
/* With CLI usage, TP->PTID always equals INFERIOR_PTID here. Now that we
can store a gdb.Record object in Python referring to a different thread
than the current one, temporarily set INFERIOR_PTID. */
- cleanup = save_inferior_ptid ();
+ scoped_restore save_inferior_ptid = make_scoped_restore (&inferior_ptid);
inferior_ptid = tp->ptid;
/* We should not be called on running or exited threads. */
gdb_assert (can_access_registers_ptid (tp->ptid));
btrace_data_init (&btrace);
- make_cleanup_btrace_data (&btrace);
+ cleanup = make_cleanup_btrace_data (&btrace);
/* Let's first try to extend the trace we already have. */
if (!btinfo->functions.empty ())