#include "observer.h"
#include "language.h"
#include "solib.h"
+#include "main.h"
#include "gdb_assert.h"
#include "mi/mi-common.h"
/* When using hardware single-step, a SIGTRAP is reported for
both a completed single-step and a software breakpoint. Need
to differentiate between the two as the latter needs
- adjusting but the former does not. */
- if (currently_stepping (ecs))
+ adjusting but the former does not.
+
+ When the thread to be examined does not match the current thread
+ context we can't use currently_stepping, so assume no
+ single-stepping in this case. */
+ if (ptid_equal (ecs->ptid, inferior_ptid) && currently_stepping (ecs))
{
if (prev_pc == breakpoint_pc
&& software_breakpoint_inserted_here_p (breakpoint_pc))
async_reason_lookup (EXEC_ASYNC_EXITED_NORMALLY));
ui_out_text (uiout, "\nProgram exited normally.\n");
}
+ /* Support the --return-child-result option. */
+ return_child_result_value = stop_info;
break;
case SIGNAL_RECEIVED:
/* Signal received. The signal table tells us to print about