summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/MacOSX/MachProcess.h
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2014-04-24 19:54:32 +0000
committerGreg Clayton <gclayton@apple.com>2014-04-24 19:54:32 +0000
commit4296c221d39a01d4ed8b129f05a8159e24821342 (patch)
tree4459c7391084f2c60eb9ab5b4f6159ba91947237 /lldb/tools/debugserver/source/MacOSX/MachProcess.h
parentd19e6a7e5456690cb86cfcb0b6ad01f2d90e5ce8 (diff)
downloadbcm5719-llvm-4296c221d39a01d4ed8b129f05a8159e24821342.tar.gz
bcm5719-llvm-4296c221d39a01d4ed8b129f05a8159e24821342.zip
Fixed an issue where we would try to interrupt a process while it is in the process of naturally stopping due to another reason (breakpoint, or step).
Added a new MachProcess::Interrupt() which correctly tracks such cases and "does the right thing". <rdar://problem/16593556> llvm-svn: 207139
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/MachProcess.h')
-rw-r--r--lldb/tools/debugserver/source/MacOSX/MachProcess.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.h b/lldb/tools/debugserver/source/MacOSX/MachProcess.h
index c98700c0fc5..fd5bdc9bb55 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.h
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.h
@@ -101,6 +101,7 @@ public:
bool Resume (const DNBThreadResumeActions& thread_actions);
bool Signal (int signal, const struct timespec *timeout_abstime = NULL);
+ bool Interrupt();
bool SendEvent (const char *event, DNBError &send_err);
bool Kill (const struct timespec *timeout_abstime = NULL);
bool Detach ();
@@ -325,6 +326,18 @@ private:
m_image_infos_callback;
void * m_image_infos_baton;
std::string m_bundle_id; // If we are a SB or BKS process, this will be our bundle ID.
+ int m_sent_interrupt_signo; // When we call MachProcess::Interrupt(), we want to send a single signal
+ // to the inferior and only send the signal if we aren't already stopped.
+ // If we end up sending a signal to stop the process we store it until we
+ // receive an exception with this signal. This helps us to verify we got
+ // the signal that interrupted the process. We might stop due to another
+ // reason after an interrupt signal is sent, so this helps us ensure that
+ // we don't report a spurious stop on the next resume.
+ int m_auto_resume_signo; // If we resume the process and still haven't received our interrupt signal
+ // acknownledgement, we will shortly after the next resume. We store the
+ // interrupt signal in this variable so when we get the interrupt signal
+ // as the sole reason for the process being stopped, we can auto resume
+ // the process.
bool m_did_exec;
};
OpenPOWER on IntegriCloud