aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/debugger/gdbbridge.py
diff options
context:
space:
mode:
authorTim Jenßen <tim.jenssen@qt.io>2023-03-26 15:58:49 +0200
committerTim Jenßen <tim.jenssen@qt.io>2023-03-26 16:26:18 +0200
commitfeabda3aa78b7861ae03f1cc2296e8adf34ba038 (patch)
tree9bc06c7eeb6fca92e8cdd273908f7350260a8cb8 /share/qtcreator/debugger/gdbbridge.py
parent359ea5d55a9452d70c20754c2380b1bf1c704c04 (diff)
parentf7639f458a4b87263e96de70f26554a660148bc3 (diff)
Merge remote-tracking branch 'origin/10.0' into qds/dev
bigger conflicts resolved at: src/plugins/qmldesigner/CMakeLists.txt src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp Change-Id: I08e2a109d8e37cbd77225129854e9e633725bfc7
Diffstat (limited to 'share/qtcreator/debugger/gdbbridge.py')
-rw-r--r--share/qtcreator/debugger/gdbbridge.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py
index f5e260c54d..71dfde0870 100644
--- a/share/qtcreator/debugger/gdbbridge.py
+++ b/share/qtcreator/debugger/gdbbridge.py
@@ -1,5 +1,5 @@
# Copyright (C) 2016 The Qt Company Ltd.
-# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
try:
import __builtin__
@@ -1004,8 +1004,11 @@ class Dumper(DumperBase):
def importPlainDumpersForObj(self, obj):
for printers in obj.pretty_printers + gdb.pretty_printers:
- for printer in printers.subprinters:
- self.importPlainDumper(printer)
+ if hasattr(printers, "subprinters"):
+ for printer in printers.subprinters:
+ self.importPlainDumper(printer)
+ else:
+ self.warn('Loading a printer without the subprinters attribute not supported.')
def importPlainDumpers(self):
for obj in gdb.objfiles():
@@ -1531,7 +1534,10 @@ class CliDumper(Dumper):
for n in names:
while n:
toExpand.add(n)
- n = n[0:n.rfind('.')]
+ try:
+ n = n[0:n.rindex('.')]
+ except ValueError:
+ break
args = {}
args['fancy'] = 1