[RFC PATCH 5/7] gdb/infcall: enter replay diversion before call
George Barrett
bob@bob131.so
Tue Jun 1 19:11:03 GMT 2021
Ensures a replay diversion is set up before making an inferior call.
gdb/ChangeLog:
2021-06-01 George Barrett <bob@bob131.so>
* infcall.c (call_function_by_hand_dummy): Ensure a replay is
set up before making an inferior call.
---
gdb/infcall.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gdb/infcall.c b/gdb/infcall.c
index ca3347fbb9d..f8660f2ecd2 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -840,6 +840,12 @@ call_function_by_hand_dummy (struct value *function,
is released once the regcache has been pushed). */
infcall_suspend_state_up caller_state (save_infcall_suspend_state ());
+ /* If the target supports replay diversions, make sure the inferior
+ is in one before proceeding. This is mandatory for such targets
+ and a no-op for others. */
+ scoped_want_replay_diversion save_want_diversion
+ = call_thread->inf->want_replay_diversion ();
+
/* Ensure that the initial SP is correctly aligned. */
{
CORE_ADDR old_sp = get_frame_sp (frame);
--
2.31.1
More information about the Gdb-patches
mailing list