Fixed a launching issue.

llvm-svn: 115999
This commit is contained in:
Sean Callanan 2010-10-07 22:51:14 +00:00
parent abe8c130b1
commit 5c67a628b0
1 changed files with 4 additions and 4 deletions

View File

@ -164,14 +164,14 @@ SBTarget::Launch
error.SetError (sb_process->Launch (argv, envp, launch_flags, tty, tty, tty));
if (error.Success())
{
// We we are stopping at the entry point, we can return now!
if (stop_at_entry)
return sb_process;
// Make sure we are stopped at the entry
StateType state = sb_process->WaitForProcessToStop (NULL);
if (state == eStateStopped)
{
// We we are stopping at the entry point, we can return now!
if (stop_at_entry)
return sb_process;
// resume the process to skip the entry point
error.SetError (sb_process->Resume());
if (error.Success())