Add set/show debug dwarf-line.
[deliverable/binutils-gdb.git] / gdb / record-btrace.c
index 6bd9d0118914e40e867b969109dac70d03180331..240a8dc8555f59f6b371f4a6e32729816043b9ae 100644 (file)
@@ -278,17 +278,14 @@ record_btrace_close (struct target_ops *self)
 /* The to_async method of target record-btrace.  */
 
 static void
-record_btrace_async (struct target_ops *ops,
-                    void (*callback) (enum inferior_event_type event_type,
-                                      void *context),
-                    void *context)
+record_btrace_async (struct target_ops *ops, int enable)
 {
-  if (callback != NULL)
+  if (enable)
     mark_async_event_handler (record_btrace_async_inferior_event_handler);
   else
     clear_async_event_handler (record_btrace_async_inferior_event_handler);
 
-  ops->beneath->to_async (ops->beneath, callback, context);
+  ops->beneath->to_async (ops->beneath, enable);
 }
 
 /* Adjusts the size and returns a human readable size suffix.  */
@@ -1155,14 +1152,13 @@ record_btrace_insert_breakpoint (struct target_ops *ops,
     {
       ret = ops->beneath->to_insert_breakpoint (ops->beneath, gdbarch, bp_tgt);
     }
-
-  replay_memory_access = old;
-
   CATCH (except, RETURN_MASK_ALL)
     {
+      replay_memory_access = old;
       throw_exception (except);
     }
   END_CATCH
+  replay_memory_access = old;
 
   return ret;
 }
@@ -1187,14 +1183,13 @@ record_btrace_remove_breakpoint (struct target_ops *ops,
     {
       ret = ops->beneath->to_remove_breakpoint (ops->beneath, gdbarch, bp_tgt);
     }
-
-  replay_memory_access = old;
-
   CATCH (except, RETURN_MASK_ALL)
     {
+      replay_memory_access = old;
       throw_exception (except);
     }
   END_CATCH
+  replay_memory_access = old;
 
   return ret;
 }
@@ -1706,12 +1701,11 @@ record_btrace_start_replaying (struct thread_info *tp)
       if (upd_step_stack_frame_id)
        tp->control.step_stack_frame_id = frame_id;
     }
-
-  /* Restore the previous execution state.  */
-  set_executing (tp->ptid, executing);
-
   CATCH (except, RETURN_MASK_ALL)
     {
+      /* Restore the previous execution state.  */
+      set_executing (tp->ptid, executing);
+
       xfree (btinfo->replay);
       btinfo->replay = NULL;
 
@@ -1721,6 +1715,9 @@ record_btrace_start_replaying (struct thread_info *tp)
     }
   END_CATCH
 
+  /* Restore the previous execution state.  */
+  set_executing (tp->ptid, executing);
+
   return replay;
 }
 
@@ -1789,7 +1786,7 @@ record_btrace_resume (struct target_ops *ops, ptid_t ptid, int step,
   /* Async support.  */
   if (target_can_async_p ())
     {
-      target_async (inferior_event_handler, 0);
+      target_async (1);
       mark_async_event_handler (record_btrace_async_inferior_event_handler);
     }
 }
This page took 0.025593 seconds and 4 git commands to generate.