forked from qt-creator/qt-creator
Debugger: Correctly identify derived classes from references
Previously the correctly gdb-identified dynamic types were overwritten with the value's static type. This is probably because the dynamic type doesn't include the "&" for "reference". That, however, can easily be fixed by just appending "&". As we're only handling references there it should be safe to do so. Task-number: QTCREATORBUG-10888 Change-Id: I7310916ce662956e66491423ad26658c32c8776b Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -1253,7 +1253,7 @@ class Dumper(DumperBase):
|
||||
# generic pointer." with MinGW's gcc 4.5 when it "identifies"
|
||||
# a "QWidget &" as "void &" and with optimized out code.
|
||||
self.putItem(value.cast(type.target().unqualified()))
|
||||
self.putBetterType(typeName)
|
||||
self.putBetterType("%s &" % self.currentType)
|
||||
return
|
||||
except RuntimeError:
|
||||
self.putValue("<optimized out reference>")
|
||||
|
||||
Reference in New Issue
Block a user