aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-24 15:11:41 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-02-08 19:04:38 +0000
commitfcaf7f8644a9988098ac6be2165bce3ea4786e91 (patch)
tree08a554363df16b968a623d651c09d82a5a0b1c65 /contrib/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parent753f127f3ace09432b2baeffd71a308760641a62 (diff)
parent4b4fe385e49bd883fd183b5f21c1ea486c722e61 (diff)
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.cpp10
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() {