22 enum class Lifetime :
unsigned int {
25 TemporaryOneShot = (1 << 1),
26 TemporaryUntilHit = (1 << 2),
32 kModeWrite = (1 << 2),
48 bool operator==(
Site const &other)
const {
49 return (address == other.address) && (lifetime == other.lifetime) &&
50 (mode == other.mode) && (size == other.size);
55 typedef std::map<uint64_t, Site> SiteMap;
73 virtual ErrorCode add(
Address const &address, Lifetime lifetime,
size_t size,
75 virtual ErrorCode remove(
Address const &address);
78 virtual bool has(
Address const &address)
const;
81 virtual void enumerate(std::function<
void(
Site const &)>
const &cb)
const;
84 virtual ErrorCode isValid(
Address const &address,
size_t size,
86 virtual size_t chooseBreakpointSize(
Address const &address)
const = 0;
92 virtual bool hit(
Address const &address,
Site &site);
97 virtual int hit(Target::Thread *thread,
Site &site) = 0;
100 virtual void enable(Target::Thread *thread =
nullptr);
101 virtual void disable(Target::Thread *thread =
nullptr);
104 virtual ErrorCode enableLocation(
Site const &site,
105 Target::Thread *thread =
nullptr) = 0;
106 virtual ErrorCode disableLocation(
Site const &site,
107 Target::Thread *thread =
nullptr) = 0;
108 virtual bool enabled(Target::Thread *thread =
nullptr)
const = 0;
111 virtual bool fillStopInfo(Target::Thread *thread,
StopInfo &stopInfo) = 0;