25 ErrorCode add(
Address const &address, Lifetime lifetime,
size_t size,
27 ErrorCode remove(
Address const &address)
override;
30 int hit(Target::Thread *thread,
Site &site)
override;
33 ErrorCode enableLocation(
Site const &site,
34 Target::Thread *thread =
nullptr)
override;
35 virtual ErrorCode enableLocation(
Site const &site,
int idx,
36 Target::Thread *thread);
37 ErrorCode disableLocation(
Site const &site,
38 Target::Thread *thread =
nullptr)
override;
39 virtual ErrorCode disableLocation(
int idx, Target::Thread *thread);
42 bool enabled(Target::Thread *thread =
nullptr)
const override;
45 virtual size_t maxWatchpoints();
48 void enable(Target::Thread *thread =
nullptr)
override;
49 void disable(Target::Thread *thread =
nullptr)
override;
52 ErrorCode isValid(
Address const &address,
size_t size,
53 Mode mode)
const override;
54 size_t chooseBreakpointSize(
Address const &address)
const override;
57 virtual int getAvailableLocation();
61 enumerateThreads(Target::Thread *thread,
62 std::function<
void(Target::Thread *t)>
const &cb)
const;
65 ErrorCode readDebugRegisters(Target::Thread *thread,
66 std::vector<uint64_t> ®s)
const;
67 ErrorCode writeDebugRegisters(Target::Thread *thread,
68 std::vector<uint64_t> ®s)
const;
71 std::vector<uint64_t> _locations;
72 std::unordered_set<ThreadId> _enabled;
74#if defined(ARCH_X86) || defined(ARCH_X86_64)
76 virtual ErrorCode disableDebugCtrlReg(uint64_t &ctrlReg,
int idx);
77 virtual ErrorCode enableDebugCtrlReg(uint64_t &ctrlReg,
int idx, Mode mode,
82 virtual bool fillStopInfo(Target::Thread *thread,