26 ErrorCode add(
Address const &address, Lifetime lifetime,
size_t size,
28 ErrorCode remove(
Address const &address)
override;
31 int hit(Target::Thread *thread,
Site &site)
override;
34 ErrorCode enableLocation(
Site const &site,
35 Target::Thread *thread =
nullptr)
override;
36 virtual ErrorCode enableLocation(
Site const &site,
int idx,
37 Target::Thread *thread);
38 ErrorCode disableLocation(
Site const &site,
39 Target::Thread *thread =
nullptr)
override;
40 virtual ErrorCode disableLocation(
int idx, Target::Thread *thread);
43 bool enabled(Target::Thread *thread =
nullptr)
const override;
46 virtual size_t maxWatchpoints();
49 void enable(Target::Thread *thread =
nullptr)
override;
50 void disable(Target::Thread *thread =
nullptr)
override;
53 ErrorCode isValid(
Address const &address,
size_t size,
54 Mode mode)
const override;
55 size_t chooseBreakpointSize(
Address const &address)
const override;
58 virtual int getAvailableLocation();
62 enumerateThreads(Target::Thread *thread,
63 std::function<
void(Target::Thread *t)>
const &cb)
const;
66 ErrorCode readDebugRegisters(Target::Thread *thread,
67 std::vector<uint64_t> ®s)
const;
68 ErrorCode writeDebugRegisters(Target::Thread *thread,
69 std::vector<uint64_t> ®s)
const;
72 std::vector<uint64_t> _locations;
73 std::unordered_set<ThreadId> _enabled;
75#if defined(ARCH_X86) || defined(ARCH_X86_64)
77 virtual ErrorCode disableDebugCtrlReg(uint64_t &ctrlReg,
int idx);
78 virtual ErrorCode enableDebugCtrlReg(uint64_t &ctrlReg,
int idx, Mode mode,
82#if defined(ARCH_ARM64) && defined(OS_WIN32)
91 std::unordered_map<int, ByteVector> _lastKnownValues;
95 virtual bool fillStopInfo(Target::Thread *thread,