Fix up Debugger helpers to be able to dump QObject's with CDB.

- Make container dumper routines set "childnumchild" when known
  in order to avoid roundtrips; avoid repeated invocations of
  container.end().
- Completed dumper information in some places to avoid roundtrips.
- Extended QVariant helpers by dumpers for common GUI types
  (rectangles, points, sizes, fonts, size policies).
- Introduced artificial QObjectChildList/QObjectProperty types to
  be able to dump QObject children and properties without using
  gdb expressions.
- Fixed dumping of Signal/Slot list to pass on correct types. Avoid
  recursions if signal is connected to self.
- Replaced expressions by addresses in the dumpers to it make work
  for CDB.
- Reworked dumper test program to have -a, making it usable for tests,
  add further types.
- Gdb: Clear output buffer before calling dumpers, avoiding mixups
  in case evaluation of expression fails.
- Fix the dumper parser used by CDB, do not be fooled by
  "<synthetic>" addresses, etc.
- Pass on a "dumperVersion" in initial query.
This commit is contained in:
Friedemann Kleint
2009-07-06 17:36:50 +02:00
parent 45448ce5d5
commit 5bd1d2a028
9 changed files with 748 additions and 365 deletions

View File

@@ -209,6 +209,8 @@ QString WatchData::toString() const
QTextStream str(&res);
if (!iname.isEmpty())
str << "iname=\"" << iname << doubleQuoteComma;
if (!addr.isEmpty())
str << "addr=\"" << addr << doubleQuoteComma;
if (!exp.isEmpty())
str << "exp=\"" << exp << doubleQuoteComma;
@@ -780,6 +782,7 @@ static int findInsertPosition(const QList<WatchItem *> &list, const WatchItem *i
void WatchModel::insertData(const WatchData &data)
{
// qDebug() << "WMI:" << data.toString();
QTC_ASSERT(!data.iname.isEmpty(), return);
WatchItem *parent = findItem(parentName(data.iname), m_root);
if (!parent) {