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