summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorCaroline Tice <ctice@apple.com>2010-11-19 20:47:54 +0000
committerCaroline Tice <ctice@apple.com>2010-11-19 20:47:54 +0000
commitefed613172d902cf2ce49f68dd36f15a29a34dab (patch)
tree9f2dd7ec50382f4e1c2ca600e0d06d60a9bee4c6 /lldb/source/Target/Process.cpp
parent601e72c88a65fddc4525a3d5a19b51495a68ce82 (diff)
downloadbcm5719-llvm-efed613172d902cf2ce49f68dd36f15a29a34dab.tar.gz
bcm5719-llvm-efed613172d902cf2ce49f68dd36f15a29a34dab.zip
Add the ability to catch and do the right thing with Interrupts (often control-c)
and end-of-file (often control-d). llvm-svn: 119837
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index e50ecf27ef0..cebec5bbd31 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1478,10 +1478,6 @@ Process::Halt ()
}
else
{
- // Since we are eating the event, we need to update our state
- // otherwise the process state will not match reality...
- SetPublicState(state);
-
if (StateIsStoppedState (state))
{
// We caused the process to interrupt itself, so mark this
@@ -1508,7 +1504,7 @@ Process::Halt ()
// stopped the process, intercepted the event and set the interrupted
// bool in the event.
if (event_sp)
- BroadcastEvent(event_sp);
+ m_private_state_broadcaster.BroadcastEvent(event_sp);
}
return error;
@@ -2175,6 +2171,14 @@ Process::ProcessInputReaderCallback (void *baton,
}
break;
+ case eInputReaderInterrupt:
+ process->Halt ();
+ break;
+
+ case eInputReaderEndOfFile:
+ process->AppendSTDOUT ("^D", 2);
+ break;
+
case eInputReaderDone:
break;
OpenPOWER on IntegriCloud