Commit f65be39a authored by hjk's avatar hjk
Browse files

debugger: sometimes a gdb.Value does not seem to have an address

Happens e.g. in gdb sources itself: cp_canonicalize_string in cp-support.c
parent 071c99b4
......@@ -35,6 +35,8 @@ def isGoodGdb():
return 'parse_and_eval' in dir(gdb)
def cleanAddress(addr):
if addr is None:
return "<no address>"
# We cannot use str(addr) as it yields rubbish for char pointers
# that might trigger Unicode encoding errors.
return addr.cast(gdb.lookup_type("void").pointer())
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment