More plumbing for breakpoints.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
namespace alloy {
|
||||
namespace runtime {
|
||||
|
||||
class Breakpoint;
|
||||
class FunctionInfo;
|
||||
class ThreadState;
|
||||
|
||||
@@ -38,15 +39,24 @@ public:
|
||||
DebugInfo* debug_info() const { return debug_info_; }
|
||||
void set_debug_info(DebugInfo* debug_info) { debug_info_ = debug_info; }
|
||||
|
||||
int AddBreakpoint(Breakpoint* breakpoint);
|
||||
int RemoveBreakpoint(Breakpoint* breakpoint);
|
||||
|
||||
int Call(ThreadState* thread_state, uint64_t return_address);
|
||||
|
||||
protected:
|
||||
virtual int AddBreakpointImpl(Breakpoint* breakpoint) { return 0; }
|
||||
virtual int RemoveBreakpointImpl(Breakpoint* breakpoint) { return 0; }
|
||||
virtual int CallImpl(ThreadState* thread_state, uint64_t return_address) = 0;
|
||||
|
||||
protected:
|
||||
Type type_;
|
||||
uint64_t address_;
|
||||
DebugInfo* debug_info_;
|
||||
|
||||
// TODO(benvanik): move elsewhere? DebugData?
|
||||
Mutex* lock_;
|
||||
std::vector<Breakpoint*> breakpoints_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user