aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2000-02-03 04:14:45 +0000
committerJason Molenda <jmolenda@apple.com>2000-02-03 04:14:45 +0000
commit8b93c6380e299446e645ece29bf77d26f5713529 (patch)
tree9f06d80fcf4b95cd76cbceda50de2a454da9287f /gdb/infrun.c
parent6bb9f1226aa9f328aba73bcc6c0ecaa0525a8931 (diff)
downloadgdb-8b93c6380e299446e645ece29bf77d26f5713529.zip
gdb-8b93c6380e299446e645ece29bf77d26f5713529.tar.gz
gdb-8b93c6380e299446e645ece29bf77d26f5713529.tar.bz2
import gdb-2000-02-02 snapshot
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 549c515..57ab576 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1441,7 +1441,13 @@ handle_inferior_event (struct execution_control_state *ecs)
{
add_thread (ecs->pid);
+#ifdef UI_OUT
+ ui_out_text (uiout, "[New ");
+ ui_out_text (uiout, target_pid_or_tid_to_str (ecs->pid));
+ ui_out_text (uiout, "]\n");
+#else
printf_filtered ("[New %s]\n", target_pid_or_tid_to_str (ecs->pid));
+#endif
#if 0
/* NOTE: This block is ONLY meant to be invoked in case of a
@@ -3223,6 +3229,19 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
break;
case SIGNAL_EXITED:
/* The inferior was terminated by a signal. */
+#ifdef UI_OUT
+ annotate_signalled ();
+ ui_out_text (uiout, "\nProgram terminated with signal ");
+ annotate_signal_name ();
+ ui_out_field_string (uiout, "signal-name", target_signal_to_name (stop_info));
+ annotate_signal_name_end ();
+ ui_out_text (uiout, ", ");
+ annotate_signal_string ();
+ ui_out_field_string (uiout, "signal-meaning", target_signal_to_string (stop_info));
+ annotate_signal_string_end ();
+ ui_out_text (uiout, ".\n");
+ ui_out_text (uiout, "The program no longer exists.\n");
+#else
annotate_signalled ();
printf_filtered ("\nProgram terminated with signal ");
annotate_signal_name ();
@@ -3236,19 +3255,46 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
printf_filtered ("The program no longer exists.\n");
gdb_flush (gdb_stdout);
+#endif
break;
case EXITED:
/* The inferior program is finished. */
+#ifdef UI_OUT
+ annotate_exited (stop_info);
+ if (stop_info)
+ {
+ ui_out_text (uiout, "\nProgram exited with code ");
+ ui_out_field_fmt (uiout, "exit-code", "0%o", (unsigned int) stop_info);
+ ui_out_text (uiout, ".\n");
+ }
+ else
+ {
+ ui_out_text (uiout, "\nProgram exited normally.\n");
+ }
+#else
annotate_exited (stop_info);
if (stop_info)
printf_filtered ("\nProgram exited with code 0%o.\n",
(unsigned int) stop_info);
else
printf_filtered ("\nProgram exited normally.\n");
+#endif
break;
case SIGNAL_RECEIVED:
/* Signal received. The signal table tells us to print about
it. */
+#ifdef UI_OUT
+ annotate_signal ();
+ ui_out_text (uiout, "\nProgram received signal ");
+ annotate_signal_name ();
+ ui_out_field_string (uiout, "signal-name", target_signal_to_name (stop_info));
+ annotate_signal_name_end ();
+ ui_out_text (uiout, ", ");
+ annotate_signal_string ();
+ ui_out_field_string (uiout, "signal-meaning", target_signal_to_string (stop_info));
+ annotate_signal_string_end ();
+ ui_out_text (uiout, ".\n");
+#else
annotate_signal ();
printf_filtered ("\nProgram received signal ");
annotate_signal_name ();
@@ -3260,6 +3306,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
annotate_signal_string_end ();
printf_filtered (".\n");
gdb_flush (gdb_stdout);
+#endif
break;
default:
internal_error ("print_stop_reason: unrecognized enum value");