iGio90/Dwarf

failed adding watchpoint

SteinsGate9 opened this issue · 0 comments

Describe the bug
failed adding watchpoint, tried 0xbab60a00, tried Module.findExportByName("libc.so", “open").

To Reproduce
Steps to reproduce the behavior:

  1. dwarf -t android com.android.chrome
  2. Click on + watchpoint
  3. tried 0xbab60a00, tried Module.findExportByName("libc.so", “open").
  4. See error: TypeError: memPtr.isNull is not a function at Function.putWatchpoint (/script1.js:5098:22) at Object.putWatchpoint (/script1.js:2128:49) at Object.api (/script1.js:2920:35) at frida/runtime/message-dispatcher.js:13:1 at c (frida/runtime/message-dispatcher.js:23:1)

Expected behavior
Expected to add watchpoint

Screenshots
image

Desktop (please complete the following information):

  • OS: windows 10
  • USB: Nexus 5
  • Android: 10.0

Additional context
in core.js line 5715

        if (typeof address === 'string') {
          memPtr = ptr(address);
        } else {
          memPtr = address;
        }

i tried to add typeof address === "number" then it worked, it seems that for me the address argument = number so it failed to trans to pointer thus failed at .isNull() at line 5768.

        if (typeof address === 'string' || typeof address === "number") {=
          memPtr = ptr(address);
        } else {
          memPtr = address;
        }