diff options
author | Felipe de Azevedo Piovezan <fpiovezan@apple.com> | 2025-04-04 10:05:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-04 10:05:44 -0700 |
commit | 232525f06942adb3b9977632e38dcd5f08c0642d (patch) | |
tree | 4f4feb49a15c209213fad93b2aef64fde544ebbf /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | 5942f0269e62021620e871bfe2e671f4f0f2d932 (diff) | |
download | llvm-232525f06942adb3b9977632e38dcd5f08c0642d.zip llvm-232525f06942adb3b9977632e38dcd5f08c0642d.tar.gz llvm-232525f06942adb3b9977632e38dcd5f08c0642d.tar.bz2 |
[lldb] Clear thread-creation breakpoints in ProcessGDBRemote::Clear (#134397)
Currently, these breakpoints are being accumulated every time a new
process if created (e.g. through a `run`). Depending on the
circumstances, the old breakpoints are even left enabled, interfering
with subsequent processes. This is addressed by removing the breakpoints
in ProcessGDBRemote::Clear
Note that these breakpoints are more of a PlatformDarwin thing, so in
the future we should look into moving them there.
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 6836078..d7e8c2c 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -3410,6 +3410,9 @@ Status ProcessGDBRemote::DisableWatchpoint(WatchpointSP wp_sp, bool notify) { void ProcessGDBRemote::Clear() { m_thread_list_real.Clear(); m_thread_list.Clear(); + if (m_thread_create_bp_sp) + if (TargetSP target_sp = m_target_wp.lock()) + target_sp->RemoveBreakpointByID(m_thread_create_bp_sp->GetID()); } Status ProcessGDBRemote::DoSignal(int signo) { |