diff options
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index fe6a3f9ed6c1..5f18706f67e5 100644 --- a/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -5307,8 +5307,11 @@ void ProcessGDBRemote::DidFork(lldb::pid_t child_pid, lldb::tid_t child_tid) { // Hardware breakpoints/watchpoints are not inherited implicitly, // so we need to readd them if we're following child. - if (GetFollowForkMode() == eFollowChild) + if (GetFollowForkMode() == eFollowChild) { DidForkSwitchHardwareTraps(true); + // Update our PID + SetID(child_pid); + } } void ProcessGDBRemote::DidVFork(lldb::pid_t child_pid, lldb::tid_t child_tid) { @@ -5361,6 +5364,11 @@ void ProcessGDBRemote::DidVFork(lldb::pid_t child_pid, lldb::tid_t child_tid) { error.AsCString() ? error.AsCString() : "<unknown error>"); return; } + + if (GetFollowForkMode() == eFollowChild) { + // Update our PID + SetID(child_pid); + } } void ProcessGDBRemote::DidVForkDone() { |