================ @@ -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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits