Allow breakpoint addresses to be changed after creation
This commit is contained in:
parent
e383e2f101
commit
ac706f6923
|
@ -14,6 +14,9 @@
|
|||
namespace xe {
|
||||
namespace cpu {
|
||||
|
||||
Breakpoint::Breakpoint(Processor* processor,
|
||||
std::function<void(uint32_t, uint64_t)> hit_callback)
|
||||
: processor_(processor), hit_callback_(hit_callback) {}
|
||||
Breakpoint::Breakpoint(Processor* processor, uint32_t address,
|
||||
std::function<void(uint32_t, uint64_t)> hit_callback)
|
||||
: processor_(processor), address_(address), hit_callback_(hit_callback) {}
|
||||
|
|
|
@ -17,11 +17,17 @@ namespace cpu {
|
|||
|
||||
class Breakpoint {
|
||||
public:
|
||||
Breakpoint(Processor* processor,
|
||||
std::function<void(uint32_t, uint64_t)> hit_callback);
|
||||
Breakpoint(Processor* processor, uint32_t address,
|
||||
std::function<void(uint32_t, uint64_t)> hit_callback);
|
||||
~Breakpoint();
|
||||
|
||||
uint32_t address() const { return address_; }
|
||||
void set_address(uint32_t address) {
|
||||
assert_false(installed_);
|
||||
address_ = address;
|
||||
}
|
||||
bool installed() const { return installed_; }
|
||||
|
||||
bool Install();
|
||||
|
|
Loading…
Reference in New Issue