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:
Pedro Alves
2011-05-20 16:31:31 +00:00
parent 751b8ce122
commit 09cee04be9
5 changed files with 73 additions and 36 deletions

View File

@ -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;
}