diff options
author | Pedro Alves <palves@redhat.com> | 2011-05-20 16:31:31 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-05-20 16:31:31 +0000 |
commit | 09cee04be9e51b992fd835e7fa671d3b65448a6b (patch) | |
tree | fe2d3c07280753606639cd25a9d182906b5ff68f /gdb/infcmd.c | |
parent | 751b8ce122ef06e9bd673542e7876f44dcd0165c (diff) | |
download | gdb-09cee04be9e51b992fd835e7fa671d3b65448a6b.zip gdb-09cee04be9e51b992fd835e7fa671d3b65448a6b.tar.gz gdb-09cee04be9e51b992fd835e7fa671d3b65448a6b.tar.bz2 |
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.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index ab1f2f9..f857ba0 100644 --- a/gdb/infcmd.c +++ b/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; } |