This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Code cleanup - split print_stop_reason / question
- From: Kevin Pouget <kevin dot pouget at gmail dot com>
- To: gdb at sourceware dot org
- Date: Wed, 27 Apr 2011 07:34:24 -0400
- Subject: Code cleanup - split print_stop_reason / question
- References: <BANLkTin70pF0swcBvPZ3ftSmbrrccOUzcw@mail.gmail.com>
Hello,
I had a little question regarding Jan's patch below,
do you remember why you print the `exitstatus' in octal?
it looks like a bug to me when I see
> int main() {
> ??? return 10 ;
> }
> [Inferior 1 (process 4395) exited with code 012]
Thanks,
Kevin
+2010-09-04 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Code cleanup - split print_stop_reason.
+ * infrun.c (enum inferior_stop_reason): Remove.
+ (print_stop_reason): Remove by splitting into ...
+ (print_exited_reason, print_signal_exited_reason)
+ (print_no_history_reason, print_signal_received_reason)
+ (print_end_stepping_range_reason): ... these new functions. Update
+ the preceding comment.
+ (handle_inferior_event): Change the calls to print_exited_reason,
+ print_signal_exited_reason, print_no_history_reason,
+ print_signal_received_reason, print_end_stepping_range_reason.
+ (handle_step_into_function, handle_step_into_function_backward):
+ Change the calls to print_end_stepping_range_reason.
????? ui_out_text (uiout, "[Inferior ");
????? ui_out_text (uiout, plongest (inf->num));
????? ui_out_text (uiout, " (");
????? ui_out_text (uiout, pidstr);
????? ui_out_text (uiout, ") exited with code ");
????? ui_out_field_fmt (uiout, "exit-code", "0%o", (unsigned int) exitstatus);
????? ui_out_text (uiout, "]\n");