add watchpoint current & return debug symbols
This commit is contained in:
parent
eaaffe7014
commit
5b7c2d794d
@ -110,12 +110,11 @@ For this example I'm intercepting `funcPtr` & I want to know who read/write to `
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
Process.setExceptionHandler(function(exp) {
|
Process.setExceptionHandler(function(exp) {
|
||||||
console.warn(JSON.stringify(exp, null, 2));
|
console.warn(JSON.stringify(Object.assign(exp, { _lr: DebugSymbol.fromAddress(exp.context.lr), _pc: DebugSymbol.fromAddress(exp.context.pc) }), null, 2));
|
||||||
// can implement a switch case on exp.memory.operation, if read set only 'r--' if write '-w-' etc..
|
// can implement a switch case on exp.memory.operation, if read set only 'r--' if write '-w-' etc..
|
||||||
Memory.protect(exp.memory.address, Process.pointerSize, 'rw-');
|
Memory.protect(exp.memory.address, Process.pointerSize, 'rw-');
|
||||||
// can also use `new NativeFunction(Module.findExportByName(null, 'mprotect'), 'int', ['pointer', 'uint', 'int'])(parseInt(this.context.x2), 2, 0)`
|
// can also use `new NativeFunction(Module.findExportByName(null, 'mprotect'), 'int', ['pointer', 'uint', 'int'])(parseInt(this.context.x2), 2, 0)`
|
||||||
|
return true; // goto PC
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Interceptor.attach(funcPtr, {
|
Interceptor.attach(funcPtr, {
|
||||||
|
Loading…
Reference in New Issue
Block a user