aboutsummaryrefslogtreecommitdiff
path: root/gdb/record-btrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/record-btrace.c')
-rw-r--r--gdb/record-btrace.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index 6bd9d01..5eb5cf4 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.c
@@ -1155,14 +1155,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 +1186,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 +1704,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 +1718,9 @@ record_btrace_start_replaying (struct thread_info *tp)
}
END_CATCH
+ /* Restore the previous execution state. */
+ set_executing (tp->ptid, executing);
+
return replay;
}