aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
diff options
context:
space:
mode:
authordlav-sc <daniil.avdeev@syntacore.com>2025-06-24 19:52:38 +0300
committerGitHub <noreply@github.com>2025-06-24 19:52:38 +0300
commit3bc1fc6493240b457f5b04281c28759a6ee1b6e0 (patch)
tree5aa00fea6f4bb8f99890482f907edb3e211ee6ee /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
parent7d2293d1d95379bbdbb6446b088219ac06b97e1e (diff)
downloadllvm-3bc1fc6493240b457f5b04281c28759a6ee1b6e0.zip
llvm-3bc1fc6493240b457f5b04281c28759a6ee1b6e0.tar.gz
llvm-3bc1fc6493240b457f5b04281c28759a6ee1b6e0.tar.bz2
[lldb][RISCV] fix LR/SC atomic sequence handling in lldb-server (#127505)
lldb-server had limited support for single-stepping through the lr/sc atomic sequence. This patch enhances that support for all possible atomic sequences.
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index 7f2aba0..9c798cb 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -833,7 +833,7 @@ void NativeProcessLinux::MonitorBreakpoint(NativeThreadLinux &thread) {
auto stepping_with_bp_it =
m_threads_stepping_with_breakpoint.find(thread.GetID());
if (stepping_with_bp_it != m_threads_stepping_with_breakpoint.end() &&
- stepping_with_bp_it->second == reg_ctx.GetPC())
+ llvm::is_contained(stepping_with_bp_it->second, reg_ctx.GetPC()))
thread.SetStoppedByTrace();
StopRunningThreads(thread.GetID());
@@ -1960,10 +1960,12 @@ void NativeProcessLinux::SignalIfAllThreadsStopped() {
// Clear any temporary breakpoints we used to implement software single
// stepping.
for (const auto &thread_info : m_threads_stepping_with_breakpoint) {
- Status error = RemoveBreakpoint(thread_info.second);
- if (error.Fail())
- LLDB_LOG(log, "pid = {0} remove stepping breakpoint: {1}",
- thread_info.first, error);
+ for (auto &&bp_addr : thread_info.second) {
+ Status error = RemoveBreakpoint(bp_addr);
+ if (error.Fail())
+ LLDB_LOG(log, "pid = {0} remove stepping breakpoint: {1}",
+ thread_info.first, error);
+ }
}
m_threads_stepping_with_breakpoint.clear();