if (!args)
{
- if (event_loop_p && target_can_async_p ())
+ if (target_can_async_p ())
async_disable_stdin ();
}
else
/* If we get a request for running in the bg but the target
doesn't support it, error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we don't get a request of running in the bg, then we need
to simulate synchronous (fg) execution. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution */
async_disable_stdin ();
/* If we must run in the background, but the target can't do it,
error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we are not asked to run in the bg, then prepare to run in the
foreground, synchronously. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution */
async_disable_stdin ();
/* If we get a request for running in the bg but the target
doesn't support it, error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we don't get a request of running in the bg, then we need
to simulate synchronous (fg) execution. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution */
async_disable_stdin ();
if (!single_inst || skip_subroutines) /* leave si command alone */
{
enable_longjmp_breakpoint ();
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
cleanups = make_cleanup (disable_longjmp_breakpoint_cleanup, 0 /*ignore*/);
else
make_exec_cleanup (disable_longjmp_breakpoint_cleanup, 0 /*ignore*/);
}
/* In synchronous case, all is well, just use the regular for loop. */
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
{
for (; count > 0; count--)
{
and handle them one at the time, through step_once(). */
else
{
- if (event_loop_p && target_can_async_p ())
+ if (target_can_async_p ())
step_once (skip_subroutines, single_inst, count);
}
}
/* If we must run in the background, but the target can't do it,
error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we are not asked to run in the bg, then prepare to run in the
foreground, synchronously. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution */
async_disable_stdin ();
/* If we must run in the background, but the target can't do it,
error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we are not asked to run in the bg, then prepare to run in the
foreground, synchronously. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution */
async_disable_stdin ();
/* If we must run in the background, but the target can't do it,
error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we are not asked to run in the bg, then prepare to run in the
foreground, synchronously. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution. */
async_disable_stdin ();
/* If we must run in the background, but the target can't do it,
error out. */
- if (event_loop_p && async_exec && !target_can_async_p ())
+ if (async_exec && !target_can_async_p ())
error ("Asynchronous execution not supported on this target.");
/* If we are not asked to run in the bg, then prepare to run in the
foreground, synchronously. */
- if (event_loop_p && !async_exec && target_can_async_p ())
+ if (!async_exec && target_can_async_p ())
{
/* Simulate synchronous execution. */
async_disable_stdin ();
breakpoint = set_momentary_breakpoint (sal, get_frame_id (frame), bp_finish);
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
old_chain = make_cleanup_delete_breakpoint (breakpoint);
else
old_chain = make_exec_cleanup_delete_breakpoint (breakpoint);
if (from_tty)
{
printf_filtered ("Run till exit from ");
- print_stack_frame (get_selected_frame (), 1, LOCATION);
+ print_stack_frame (get_selected_frame (NULL), 1, LOCATION);
}
/* If running asynchronously and the target support asynchronous
execution, set things up for the rest of the finish command to be
completed later on, when gdb has detected that the target has
stopped, in fetch_inferior_event. */
- if (event_loop_p && target_can_async_p ())
+ if (target_can_async_p ())
{
arg1 =
(struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
/* Do this only if not running asynchronously or if the target
cannot do async execution. Otherwise, complete this command when
the target actually stops, in fetch_inferior_event. */
- if (!event_loop_p || !target_can_async_p ())
+ if (!target_can_async_p ())
{
/* Did we stop at our breakpoint? */
if (bpstat_find_breakpoint (stop_bpstat, breakpoint) != NULL
target_files_info ();
printf_filtered ("Program stopped at %s.\n",
- local_hex_string ((unsigned long) stop_pc));
+ hex_string ((unsigned long) stop_pc));
if (stop_step)
printf_filtered ("It stopped after being stepped.\n");
else if (num != 0)
const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
char buffer[MAX_REGISTER_SIZE];
- if (DEPRECATED_DO_REGISTERS_INFO_P ())
- {
- DEPRECATED_DO_REGISTERS_INFO (regnum, print_all);
- return;
- }
-
for (i = 0; i < numregs; i++)
{
/* Decide between printing all regs, non-float / vector regs, or
file, 0, 1, 0, Val_pretty_default);
fprintf_filtered (file, "\t(raw 0x");
- for (j = 0; j < DEPRECATED_REGISTER_RAW_SIZE (i); j++)
+ for (j = 0; j < register_size (current_gdbarch, i); j++)
{
int idx;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
idx = j;
else
- idx = DEPRECATED_REGISTER_RAW_SIZE (i) - 1 - j;
+ idx = register_size (current_gdbarch, i) - 1 - j;
fprintf_filtered (file, "%02x", (unsigned char) buffer[idx]);
}
fprintf_filtered (file, ")");
void
interrupt_target_command (char *args, int from_tty)
{
- if (event_loop_p && target_can_async_p ())
+ if (target_can_async_p ())
{
dont_repeat (); /* Not for the faint of heart */
target_stop ();