* config/i386/tm-i386sol2.h (STAB_REG_TO_REGNUM): Redefine to call
[deliverable/binutils-gdb.git] / gdb / infrun.c
index e3556229473dfe477c3f89b92201c02ad8478865..fa250068e5ff51261483baa4b38a6184f76eca86 100644 (file)
@@ -29,6 +29,7 @@
 #include "gdb_wait.h"
 #include "gdbcore.h"
 #include "gdbcmd.h"
+#include "cli/cli-script.h"
 #include "target.h"
 #include "gdbthread.h"
 #include "annotate.h"
@@ -3308,7 +3309,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
       /* Print a message only if not in the middle of doing a "step n"
         operation for n > 1 */
       if (!step_multi || !stop_step)
-       if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+       if (ui_out_is_mi_like_p (uiout))
          ui_out_field_string (uiout, "reason", "end-stepping-range");
 #endif
       break;
@@ -3320,7 +3321,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
       /* The inferior was terminated by a signal. */
 #ifdef UI_OUT
       annotate_signalled ();
-      if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+      if (ui_out_is_mi_like_p (uiout))
        ui_out_field_string (uiout, "reason", "exited-signalled");
       ui_out_text (uiout, "\nProgram terminated with signal ");
       annotate_signal_name ();
@@ -3354,7 +3355,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
       annotate_exited (stop_info);
       if (stop_info)
        {
-         if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+         if (ui_out_is_mi_like_p (uiout))
            ui_out_field_string (uiout, "reason", "exited");
          ui_out_text (uiout, "\nProgram exited with code ");
          ui_out_field_fmt (uiout, "exit-code", "0%o", (unsigned int) stop_info);
@@ -3362,7 +3363,7 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
        }
       else
        {
-         if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+         if (ui_out_is_mi_like_p (uiout))
            ui_out_field_string (uiout, "reason", "exited-normally");
          ui_out_text (uiout, "\nProgram exited normally.\n");
        }
@@ -3382,6 +3383,8 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
       annotate_signal ();
       ui_out_text (uiout, "\nProgram received signal ");
       annotate_signal_name ();
+      if (ui_out_is_mi_like_p (uiout))
+       ui_out_field_string (uiout, "reason", "signal-received");
       ui_out_field_string (uiout, "signal-name", target_signal_to_name (stop_info));
       annotate_signal_name_end ();
       ui_out_text (uiout, ", ");
@@ -3548,12 +3551,12 @@ and/or watchpoints.\n");
 #ifdef UI_OUT
          /* For mi, have the same behavior every time we stop:
              print everything but the source line. */
-         if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+         if (ui_out_is_mi_like_p (uiout))
            source_flag = LOC_AND_ADDRESS;
 #endif
 
 #ifdef UI_OUT
-         if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0)
+         if (ui_out_is_mi_like_p (uiout))
            ui_out_field_int (uiout, "thread-id",
                              pid_to_thread_id (inferior_ptid));
 #endif
@@ -3588,9 +3591,6 @@ and/or watchpoints.\n");
       select_frame (get_current_frame (), 0);
     }
 
-
-  TUIDO (((TuiOpaqueFuncPtr) tui_vCheckDataValues, selected_frame));
-
 done:
   annotate_stopped ();
 }
This page took 0.024683 seconds and 4 git commands to generate.