+
+ * infrun.c (handle_inferior_event): Store the exit code for
+ --return-child-result here, instead of ...
+ (print_exited_reason): ... here.
+
PR gdb/13860
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
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