diff options
author | Michał Górny <mgorny@moritz.systems> | 2021-04-09 17:00:12 +0200 |
---|---|---|
committer | Michał Górny <mgorny@moritz.systems> | 2021-04-24 11:08:34 +0200 |
commit | fd0af0cf08284de79fe1a5bcfdc2dad83794dcfe (patch) | |
tree | 6e56f2694995c8fd15c78d322330d24cb3252d1e /lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp | |
parent | bbae0c1f7b4f60e9b8ac2be24e35bec79d9b7b01 (diff) | |
download | llvm-fd0af0cf08284de79fe1a5bcfdc2dad83794dcfe.zip llvm-fd0af0cf08284de79fe1a5bcfdc2dad83794dcfe.tar.gz llvm-fd0af0cf08284de79fe1a5bcfdc2dad83794dcfe.tar.bz2 |
[lldb] [Process/Linux] Report fork/vfork stop reason
Enable reporting fork/vfork events to the server when supported.
At this moment, this is used only to test the server code, as real
client does not report fork-events and vfork-events as supported.
Differential Revision: https://reviews.llvm.org/D100208
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp index fcc96e2..c44f10c 100644 --- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp @@ -394,6 +394,21 @@ void NativeThreadLinux::SetStoppedByTrace() { m_stop_info.details.signal.signo = SIGTRAP; } +void NativeThreadLinux::SetStoppedByFork(bool is_vfork, lldb::pid_t child_pid) { + SetStopped(); + + m_stop_info.reason = + is_vfork ? StopReason::eStopReasonVFork : StopReason::eStopReasonFork; + m_stop_info.details.fork.child_pid = child_pid; + m_stop_info.details.fork.child_tid = child_pid; +} + +void NativeThreadLinux::SetStoppedByVForkDone() { + SetStopped(); + + m_stop_info.reason = StopReason::eStopReasonVForkDone; +} + void NativeThreadLinux::SetStoppedWithNoReason() { SetStopped(); |