diff options
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 9ec2363..6d0bfd8 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3524,6 +3524,9 @@ handle_inferior_event (struct execution_control_state *ecs) current_inferior ()->has_exit_code = 1; current_inferior ()->exit_code = (LONGEST) ecs->ws.value.integer; + /* Support the --return-child-result option. */ + return_child_result_value = ecs->ws.value.integer; + print_exited_reason (ecs->ws.value.integer); } else @@ -5971,8 +5974,6 @@ print_exited_reason (int exitstatus) ui_out_text (uiout, pidstr); ui_out_text (uiout, ") exited normally]\n"); } - /* Support the --return-child-result option. */ - return_child_result_value = exitstatus; } /* Signal received, print why the inferior has stopped. The signal table |