Remove save_inferior_ptid
[deliverable/binutils-gdb.git] / gdb / btrace.c
index 10224c51654bece4c73e7b8f2ec5fbcba54f8914..2a83e1b26f0f8622d308fd143fc87794cb6568b6 100644 (file)
@@ -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 ())
This page took 0.024116 seconds and 4 git commands to generate.