forked from qt-creator/qt-creator
debugger: dump integers and floats based on the typedef stripped type
This commit is contained in:
@@ -1594,7 +1594,9 @@ class Dumper:
|
||||
except:
|
||||
pass
|
||||
|
||||
if type.code == gdb.TYPE_CODE_INT:
|
||||
typedefStrippedType = stripTypedefs(type)
|
||||
|
||||
if typedefStrippedType.code == gdb.TYPE_CODE_INT:
|
||||
if self.alienSource and str(type) == "unsigned long long":
|
||||
strlen = value % (1L<<32)
|
||||
strptr = value / (1L<<32)
|
||||
@@ -1609,15 +1611,15 @@ class Dumper:
|
||||
self.putNumChild(0)
|
||||
return
|
||||
|
||||
if type.code == gdb.TYPE_CODE_CHAR:
|
||||
if typedefStrippedType.code == gdb.TYPE_CODE_CHAR:
|
||||
self.putType(realtype)
|
||||
self.putValue(int(value))
|
||||
self.putAddress(value.address)
|
||||
self.putNumChild(0)
|
||||
return
|
||||
|
||||
if type.code == gdb.TYPE_CODE_FLT \
|
||||
or type.code == gdb.TYPE_CODE_BOOL:
|
||||
if typedefStrippedType.code == gdb.TYPE_CODE_FLT \
|
||||
or typedefStrippedType.code == gdb.TYPE_CODE_BOOL:
|
||||
self.putType(realtype)
|
||||
self.putValue(value)
|
||||
self.putAddress(value.address)
|
||||
@@ -1641,8 +1643,6 @@ class Dumper:
|
||||
self.putFields(child)
|
||||
return
|
||||
|
||||
typedefStrippedType = stripTypedefs(type)
|
||||
|
||||
if isSimpleType(typedefStrippedType):
|
||||
#warn("IS SIMPLE: %s " % type)
|
||||
#self.putAddress(value.address)
|
||||
|
@@ -147,6 +147,7 @@ public:
|
||||
int m_extraX;
|
||||
QStringList m_extraY;
|
||||
uint m_extraZ : 1;
|
||||
bool m_extraA : 1;
|
||||
bool m_extraB;
|
||||
};
|
||||
|
||||
@@ -184,6 +185,8 @@ void DerivedObject::setX(int x)
|
||||
{
|
||||
Q_D(DerivedObject);
|
||||
d->m_extraX = x;
|
||||
d->m_extraA = !d->m_extraA;
|
||||
d->m_extraB = !d->m_extraB;
|
||||
}
|
||||
|
||||
QStringList DerivedObject::y() const
|
||||
@@ -216,9 +219,11 @@ struct S
|
||||
{
|
||||
uint x : 1;
|
||||
uint y : 1;
|
||||
bool c : 1;
|
||||
bool b;
|
||||
float f;
|
||||
double d;
|
||||
qreal q;
|
||||
int i;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user