forked from qt-creator/qt-creator
debugger: str(p) is unsafe to use for invalid char *
This commit is contained in:
@@ -177,8 +177,11 @@ def checkPointer(p, align = 1):
|
|||||||
|
|
||||||
|
|
||||||
def isNull(p):
|
def isNull(p):
|
||||||
s = str(p)
|
# The following can cause evaluation to abort with "UnicodeEncodeError"
|
||||||
return s == "0x0" or s.startswith("0x0 ")
|
# for invalid char *, as their "contents" is being examined
|
||||||
|
#s = str(p)
|
||||||
|
#return s == "0x0" or s.startswith("0x0 ")
|
||||||
|
return p.cast(gdb.lookup_type("unsigned long long")) == 0
|
||||||
|
|
||||||
movableTypes = set([
|
movableTypes = set([
|
||||||
"QBrush", "QBitArray", "QByteArray",
|
"QBrush", "QBitArray", "QByteArray",
|
||||||
|
Reference in New Issue
Block a user