aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2014-03-27 13:13:59 +0000
committerPedro Alves <palves@redhat.com>2014-05-22 12:08:09 +0100
commit98eb56a4bc8a0d3c58ba6f616d6e9238377ecce5 (patch)
tree791391a4e1b4e66674a8920c838822a785061b95
parentb52855e7a06171f98918f9a35de695fa9a3abd88 (diff)
downloadgdb-98eb56a4bc8a0d3c58ba6f616d6e9238377ecce5.zip
gdb-98eb56a4bc8a0d3c58ba6f616d6e9238377ecce5.tar.gz
gdb-98eb56a4bc8a0d3c58ba6f616d6e9238377ecce5.tar.bz2
Don't store the inferior's exit code for --return-child-result in a print routine.
A small cleanup - so we can call the print routine without affecting --return-child-result. gdb/ 2014-05-22 Pedro Alves <palves@redhat.com> * infrun.c (handle_inferior_event): Store the exit code for --return-child-result here, instead of ... (print_exited_reason): ... here.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/infrun.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f64a48b..4e65bdb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-22 Pedro Alves <palves@redhat.com>
+
+ * infrun.c (handle_inferior_event): Store the exit code for
+ --return-child-result here, instead of ...
+ (print_exited_reason): ... here.
+
2014-05-21 Pedro Alves <palves@redhat.com>
PR gdb/13860
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