Commit 35fe835d authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger: Catch exception if thread name cannot be determined.



As reported on mailing list.

Reviewed-by: hjk
Reviewed-by: default avatarArvid Ephraim Picciani <arvid.picciani@nokia.com>
parent 0a043df6
......@@ -1745,15 +1745,18 @@ class ThreadNamesCommand(gdb.Command):
if e == None or e.name() == None:
break
if e.name() == ns + "QThreadPrivate::start":
thrptr = e.read_var("thr").dereference()
obtype = lookupType(ns + "QObjectPrivate").pointer()
d_ptr = thrptr["d_ptr"]["d"].cast(obtype).dereference()
objectName = d_ptr["objectName"]
out += '{valueencoded="';
out += str(Hex4EncodedLittleEndianWithoutQuotes)+'",id="'
out += str(thread.num) + '",value="'
out += encodeString(objectName)
out += '"},'
try:
thrptr = e.read_var("thr").dereference()
obtype = lookupType(ns + "QObjectPrivate").pointer()
d_ptr = thrptr["d_ptr"]["d"].cast(obtype).dereference()
objectName = d_ptr["objectName"]
out += '{valueencoded="';
out += str(Hex4EncodedLittleEndianWithoutQuotes)+'",id="'
out += str(thread.num) + '",value="'
out += encodeString(objectName)
out += '"},'
except:
pass
print out[:-1] + ']'
ThreadNamesCommand()
......
Markdown is supported
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