aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/debugger
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-04-02 12:22:48 +0200
committerEike Ziller <eike.ziller@qt.io>2019-04-02 12:22:48 +0200
commitb5e75222373db078591f1e55642a771139fb4e4f (patch)
tree077fdd13d6dcd57dd2cbe05c318b7bbb9f0a7b69 /share/qtcreator/debugger
parent841bbfa7bf2575769d7dfec2d1f238cd65aacf5d (diff)
parent3726218b5e1311f67f41e56d1355bd35b86d9676 (diff)
Merge remote-tracking branch 'origin/4.9'
Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/pythoneditor/pythoneditorplugin.cpp Change-Id: I9a95df5e16b34538539ced7dfc5d326b700794e6
Diffstat (limited to 'share/qtcreator/debugger')
-rw-r--r--share/qtcreator/debugger/gdbbridge.py25
-rw-r--r--share/qtcreator/debugger/qttypes.py4
2 files changed, 23 insertions, 6 deletions
diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py
index 7819d6d5c8..b7aa8811bb 100644
--- a/share/qtcreator/debugger/gdbbridge.py
+++ b/share/qtcreator/debugger/gdbbridge.py
@@ -892,16 +892,33 @@ class Dumper(DumperBase):
def createSpecialBreakpoints(self, args):
self.specialBreakpoints = []
def newSpecial(spec):
+ # GDB < 8.1 does not have the 'qualified' parameter here,
+ # GDB >= 8.1 applies some generous pattern matching, hitting
+ # e.g. also Foo::abort() when asking for '::abort'
+ class Pre81SpecialBreakpoint(gdb.Breakpoint):
+ def __init__(self, spec):
+ super(Pre81SpecialBreakpoint, self).__init__(spec,
+ gdb.BP_BREAKPOINT, internal=True)
+ self.spec = spec
+
+ def stop(self):
+ print("Breakpoint on '%s' hit." % self.spec)
+ return True
+
class SpecialBreakpoint(gdb.Breakpoint):
def __init__(self, spec):
- super(SpecialBreakpoint, self).\
- __init__(spec, gdb.BP_BREAKPOINT, internal=True)
+ super(SpecialBreakpoint, self).__init__(spec,
+ gdb.BP_BREAKPOINT, internal=True, qualified=True)
self.spec = spec
def stop(self):
print("Breakpoint on '%s' hit." % self.spec)
return True
- return SpecialBreakpoint(spec)
+
+ try:
+ return SpecialBreakpoint(spec)
+ except:
+ return Pre81SpecialBreakpoint(spec)
# FIXME: ns is accessed too early. gdb.Breakpoint() has no
# 'rbreak' replacement, and breakpoints created with
@@ -1279,7 +1296,7 @@ class Dumper(DumperBase):
frame = gdb.newest_frame()
ns = self.qtNamespace()
needle = self.qtNamespace() + 'QV4::ExecutionEngine'
- pat = '%sqt_v4StackTrace(((%sQV4::ExecutionEngine *)0x%x)->currentContext)'
+ pat = '%sqt_v4StackTrace(((%sQV4::ExecutionEngine *)0x%x)->currentContext())'
done = False
while i < limit and frame and not done:
block = None
diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py
index 1a30debf3f..77cb2fa512 100644
--- a/share/qtcreator/debugger/qttypes.py
+++ b/share/qtcreator/debugger/qttypes.py
@@ -478,8 +478,8 @@ def qdump__QDir(d, value):
typ = d.lookupType(ns + 'QString')
d.putItem(d.createValue(privAddress + absoluteDirEntryOffset, typ))
with SubItem(d, 'entryInfoList'):
- typ = d.lookupType(ns + 'QList<' + ns + 'QFileInfo>')
- d.putItem(d.createValue(privAddress + fileInfosOffset, typ))
+ typ = d.lookupType(ns + 'QFileInfo')
+ qdumpHelper_QList(d, privAddress + fileInfosOffset, typ)
with SubItem(d, 'entryList'):
typ = d.lookupType(ns + 'QStringList')
d.putItem(d.createValue(privAddress + filesOffset, typ))