diff options
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 71cf208..2f6bc41 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3680,7 +3680,7 @@ get_inferior_stop_soon (ptid_t ptid) once). */ static void -handle_inferior_event (struct execution_control_state *ecs) +handle_inferior_event_1 (struct execution_control_state *ecs) { enum stop_kind stop_soon; @@ -4202,6 +4202,22 @@ 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); +} + /* Come here when the program has stopped with a signal. */ static void |