mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 10:09:16 +08:00
2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/ * infcmd.c: Include "inf-loop.h". (step_once): When stepping into an inline subroutine, pretend the target has run. If the target can async, switch the inferior event loop to INF_EXEC_COMPLETE. * inferior.h (user_visible_resume_ptid): Declare. * infrun.c (user_visible_resume_ptid): New function, factored out from `resume'. (resume): Use it. * mi/mi-main.c (mi_execute_async_cli_command): Remove assertion that the current thread is running. Merge async and sync branches.
This commit is contained in:
16
gdb/infcmd.c
16
gdb/infcmd.c
@ -55,6 +55,7 @@
|
||||
#include "valprint.h"
|
||||
#include "inline-frame.h"
|
||||
#include "tracepoint.h"
|
||||
#include "inf-loop.h"
|
||||
|
||||
/* Functions exported for general use, in inferior.h: */
|
||||
|
||||
@ -994,12 +995,23 @@ step_once (int skip_subroutines, int single_inst, int count, int thread)
|
||||
if (!skip_subroutines && !single_inst
|
||||
&& inline_skipped_frames (inferior_ptid))
|
||||
{
|
||||
ptid_t resume_ptid;
|
||||
|
||||
/* Pretend that we've ran. */
|
||||
resume_ptid = user_visible_resume_ptid (1);
|
||||
set_running (resume_ptid, 1);
|
||||
|
||||
step_into_inline_frame (inferior_ptid);
|
||||
if (count > 1)
|
||||
step_once (skip_subroutines, single_inst, count - 1, thread);
|
||||
else
|
||||
/* Pretend that we've stopped. */
|
||||
normal_stop ();
|
||||
{
|
||||
/* Pretend that we've stopped. */
|
||||
normal_stop ();
|
||||
|
||||
if (target_can_async_p ())
|
||||
inferior_event_handler (INF_EXEC_COMPLETE, NULL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user