I seem to relearn blr != return once every month or so.
This commit is contained in:
@@ -73,7 +73,7 @@ Breakpoint* Function::FindBreakpoint(uint64_t address) {
|
||||
return result;
|
||||
}
|
||||
|
||||
int Function::Call(ThreadState* thread_state) {
|
||||
int Function::Call(ThreadState* thread_state, uint64_t return_address) {
|
||||
ThreadState* original_thread_state = ThreadState::Get();
|
||||
if (original_thread_state != thread_state) {
|
||||
ThreadState::Bind(thread_state);
|
||||
@@ -94,7 +94,7 @@ int Function::Call(ThreadState* thread_state) {
|
||||
result = 1;
|
||||
}
|
||||
} else {
|
||||
CallImpl(thread_state);
|
||||
CallImpl(thread_state, return_address);
|
||||
}
|
||||
|
||||
if (original_thread_state != thread_state) {
|
||||
|
||||
@@ -36,13 +36,14 @@ public:
|
||||
int AddBreakpoint(Breakpoint* breakpoint);
|
||||
int RemoveBreakpoint(Breakpoint* breakpoint);
|
||||
|
||||
int Call(ThreadState* thread_state);
|
||||
int Call(ThreadState* thread_state, uint64_t return_address);
|
||||
|
||||
protected:
|
||||
Breakpoint* FindBreakpoint(uint64_t address);
|
||||
virtual int AddBreakpointImpl(Breakpoint* breakpoint) { return 0; }
|
||||
virtual int RemoveBreakpointImpl(Breakpoint* breakpoint) { return 0; }
|
||||
virtual int CallImpl(ThreadState* thread_state) = 0;
|
||||
virtual int CallImpl(ThreadState* thread_state,
|
||||
uint64_t return_address) = 0;
|
||||
|
||||
protected:
|
||||
uint64_t address_;
|
||||
|
||||
Reference in New Issue
Block a user