From 5b7c2d794ddf123954f30574d50702682bac4a37 Mon Sep 17 00:00:00 2001 From: iddoeldor Date: Tue, 9 Jul 2019 15:36:20 +0300 Subject: [PATCH] add watchpoint current & return debug symbols --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 31feaef..6f3738b 100644 --- a/README.md +++ b/README.md @@ -110,12 +110,11 @@ For this example I'm intercepting `funcPtr` & I want to know who read/write to ` ```js 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.. 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)` - - return true; + return true; // goto PC }); Interceptor.attach(funcPtr, {