Added an lldb_private & equivalent SB API to send an AsyncInterrupt to the event loop.

Convert from calling Halt in the lldb Driver.cpp's input reader's sigint handler to sending this AsyncInterrupt so it can be handled in the 
event loop.
If you are attaching and get an async interrupt, abort the attach attempt.
Also remember to destroy the process if get interrupted while attaching.
Getting this to work also required handing the eBroadcastBitInterrupt in a few more places in Process WaitForEvent & friends.

<rdar://problem/10792425>

llvm-svn: 160903
This commit is contained in:
Jim Ingham
2012-07-27 23:57:19 +00:00
parent ae5bbfc0d0
commit cfc0935ed9
10 changed files with 209 additions and 127 deletions

View File

@@ -718,6 +718,16 @@ SBProcess::Signal (int signo)
return sb_error;
}
void
SBProcess::SendAsyncInterrupt ()
{
ProcessSP process_sp(GetSP());
if (process_sp)
{
process_sp->SendAsyncInterrupt ();
}
}
SBThread
SBProcess::GetThreadByID (tid_t tid)
{