forked from qt-creator/qt-creator
Debugger: Fix QVector dumper for Qt 6
QVector is a template alias to QList in Qt 6 and gcc creates insufficient type information for template aliases: g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0: <1><91>: Abbrev Number: 8 (DW_TAG_typedef) <92> DW_AT_name : QVector <96> DW_AT_decl_file : 1 <97> DW_AT_decl_line : 5 <98> DW_AT_decl_column : 29 <99> DW_AT_type : <0x2d> <1><9d>: Abbrev Number: clang version 10.0.0-4ubuntu1: <1><86>: Abbrev Number: 8 (DW_TAG_typedef) <87> DW_AT_type : <0x67> <8b> DW_AT_name : (indirect string, offset: 0x4a): QVector<int> <8f> DW_AT_decl_file : 1 <90> DW_AT_decl_line : 5 <1><91>: Abbrev Number: 0 In order to not regress on what the user sees we generate the full type name for the common case in the dumper. Task-number: QTCREATORBUG-24098 Change-Id: Ic0b70b1b87ee027fc3fcc0409ea23f56a175bcc3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -2033,13 +2033,18 @@ def qform__QVector():
|
||||
def qdump__QVector(d, value):
|
||||
if d.qtVersion() >= 0x060000:
|
||||
dd, data, size = value.split('ppi')
|
||||
_, _, alloc = d.split('iii', dd)
|
||||
d.putItemCount(size)
|
||||
d.putPlotData(data, size, value.type.ltarget[0])
|
||||
# g++ 9.3 does not add the template parameter list to the debug info.
|
||||
# Fake it for the common case:
|
||||
if value.type.name == d.qtNamespace() + "QVector":
|
||||
d.putBetterType(value.type.name + '<' + value.type.ltarget[0].name + '>')
|
||||
else:
|
||||
dd = d.extractPointer(value)
|
||||
data, size, alloc = d.vectorDataHelper(dd)
|
||||
d.check(0 <= size and size <= alloc and alloc <= 1000 * 1000 * 1000)
|
||||
d.putItemCount(size)
|
||||
d.putPlotData(data, size, value.type[0])
|
||||
d.check(0 <= size and size <= alloc and alloc <= 1000 * 1000 * 1000)
|
||||
d.putItemCount(size)
|
||||
d.putPlotData(data, size, value.type[0])
|
||||
|
||||
|
||||
if False:
|
||||
|
Reference in New Issue
Block a user