[Lldb-commits] [lldb] [lldb][RISCV] fix LR/SC atomic sequence handling in lldb-server (PR #127505)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 20 07:15:10 PDT 2025
================
@@ -32,6 +32,31 @@ class RegisterValue;
class Stream;
class Target;
class UnwindPlan;
+class EmulateInstruction;
+
+using BreakpointLocations = std::vector<lldb::addr_t>;
+
+class SingleStepBreakpointLocationsPredictor {
+public:
+ SingleStepBreakpointLocationsPredictor(
+ std::unique_ptr<EmulateInstruction> emulator_up)
+ : m_emulator_up{std::move(emulator_up)} {}
+
+ virtual BreakpointLocations GetBreakpointLocations(Status &status);
+
+ virtual unsigned GetBreakpointSize(lldb::addr_t, Status &) { return 4; }
+
+ virtual ~SingleStepBreakpointLocationsPredictor() = default;
+
+protected:
+ lldb::addr_t GetSequentiallyNextInstructionPC(Status &error);
+
+ lldb::addr_t GetBreakpointLocationAddress(lldb::addr_t entry_pc,
+ Status &error);
+
+ std::unique_ptr<EmulateInstruction> m_emulator_up;
+ bool m_emulation_result = false;
----------------
dlav-sc wrote:
This value is only used in one place, in `SingleStepBreakpointLocationsPredictor::GetBreakpointLocationAddress` function . I tried to preserve the original logic, so it might look a bit weird now...
https://github.com/llvm/llvm-project/pull/127505
More information about the lldb-commits
mailing list