diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b12ce2a99cf..dccb479a1e5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2019-03-20 Tom Tromey + + PR gdb/24391 + * infrun.c (handle_inferior_event): Rename from + handle_inferior_event_1. Create a scoped_value_mark. + (handle_inferior_event): Remove. + 2019-03-25 Simon Marchi * source-cache.c (source_cache::get_source_lines): Re-read diff --git a/gdb/infrun.c b/gdb/infrun.c index b32635fc422..1efb8d5dc7a 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -4598,8 +4598,13 @@ handle_no_resumed (struct execution_control_state *ecs) once). */ static void -handle_inferior_event_1 (struct execution_control_state *ecs) +handle_inferior_event (struct execution_control_state *ecs) { + /* Make sure that all temporary struct value objects that were + created during the handling of the event get deleted at the + end. */ + scoped_value_mark free_values; + enum stop_kind stop_soon; if (ecs->ws.kind == TARGET_WAITKIND_IGNORE) @@ -5196,22 +5201,6 @@ Cannot fill $_exitsignal with the correct signal number.\n")); } } -/* A wrapper around handle_inferior_event_1, which also makes sure - that all temporary struct value objects that were created during - the handling of the event get deleted at the end. */ - -static void -handle_inferior_event (struct execution_control_state *ecs) -{ - struct value *mark = value_mark (); - - handle_inferior_event_1 (ecs); - /* Purge all temporary values created during the event handling, - as it could be a long time before we return to the command level - where such values would otherwise be purged. */ - value_free_to_mark (mark); -} - /* Restart threads back to what they were trying to do back when we paused them for an in-line step-over. The EVENT_THREAD thread is ignored. */