File indexing completed on 2026-05-10 08:42:43
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_BREAKPOINT_STOPPOINTSITE_H
0010 #define LLDB_BREAKPOINT_STOPPOINTSITE_H
0011
0012 #include "lldb/Breakpoint/StoppointHitCounter.h"
0013 #include "lldb/Utility/UserID.h"
0014 #include "lldb/lldb-private.h"
0015
0016 namespace lldb_private {
0017
0018 class StoppointSite {
0019 public:
0020 StoppointSite(lldb::break_id_t bid, lldb::addr_t m_addr, bool hardware);
0021
0022 StoppointSite(lldb::break_id_t bid, lldb::addr_t m_addr,
0023 uint32_t byte_size, bool hardware);
0024
0025 virtual ~StoppointSite() = default;
0026
0027 virtual lldb::addr_t GetLoadAddress() const { return m_addr; }
0028
0029 virtual void SetLoadAddress(lldb::addr_t addr) { m_addr = addr; }
0030
0031 uint32_t GetByteSize() const { return m_byte_size; }
0032
0033 uint32_t GetHitCount() const { return m_hit_counter.GetValue(); }
0034
0035 void ResetHitCount() { m_hit_counter.Reset(); }
0036
0037 bool HardwareRequired() const { return m_is_hardware_required; }
0038
0039 virtual bool IsHardware() const = 0;
0040
0041 virtual bool ShouldStop(StoppointCallbackContext* context) = 0;
0042
0043 virtual void Dump(Stream* stream) const = 0;
0044
0045 lldb::break_id_t GetID() const { return m_id; }
0046
0047 protected:
0048
0049 lldb::break_id_t m_id;
0050
0051
0052 lldb::addr_t m_addr;
0053
0054
0055
0056 bool m_is_hardware_required;
0057
0058
0059
0060
0061 uint32_t m_byte_size;
0062
0063
0064 StoppointHitCounter m_hit_counter;
0065
0066 private:
0067 StoppointSite(const StoppointSite &) = delete;
0068 const StoppointSite &operator=(const StoppointSite &) = delete;
0069 StoppointSite() = delete;
0070 };
0071
0072 }
0073
0074 #endif