[lldb-dev] OverflowError: in method 'SBProcess_ReadPointerFromMemory', argument 2 of type 'lldb::addr_t'
Lei Kong via lldb-dev
lldb-dev at lists.llvm.org
Fri Sep 16 17:06:25 PDT 2016
I ran into the error in the subject when running a python script with "script myfile.myscript()".
The value addr_t parameter used is 0x0000000001223f68, the following works fine:
(lldb) scr
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>> e = lldb.SBError()
>>> ptr = lldb.process.ReadPointerFromMemory(0x0000000001223f68, e)
>>> print ptr
0
>>>
Any suggestion how to further investigate? Thanks.
myfile.myscript() calls the following function in a loop (iterate through all vtable symbols), which contains the call ReadPointerFromMemory.
def dump_vtbl(vtableAddr) :
error = lldb.SBError()
vtableEndAddr = lldb.process.ReadPointerFromMemory(vtableAddr+8, error)
if not error.success :
return False
print "vtable: [%0.16x, %0.16x)" % (vtableAddr, vtableEndAddr)
for addr in range(vtableAddr, vtableEndAddr, 8) :
print "read from address %.016x" % addr
try:
funcAddr = lldb.process.ReadPointerFromMemory(addr, error)
except:
sys.exc_clear()
continue
if not error.success :
continue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160916/ae4f8832/attachment.html>
More information about the lldb-dev
mailing list