KDbg's type table

KDbg's type tables are located under $KDEDIR/share/apps/kdbg/types. By convention, there is one table for each library like Qt, kdecore, X11, etc. The files are named after the library file and end with .kdbgtt. Example: The type table for libqt.a is named qt.kdbgtt.

A type table file obeys the regular KDE configuration file syntax. The file has the following groups:

The [Type Table] group

This group contains the following entries:

The type's group

There is one group for each type that is named exactly as the type. At the moment C++ template classes are not supported. Each group contains the following entries: Currently the number of expressions per type is limited to 5. This can easily be changed if it's too restrictive, but I recommend not to go to that limit at all - it will slow down the debugging process.

Tip: It is not necessary to define derived types if they ought to be treated the same as the base class - KDbg can deduce derived types and uses the type specification of the (leftmost) base class. You can use the Alias entry to quickly specify that a type should be treated like a non-leftmost base class for a multiple-inheritance class.

An example

The example shows how QString and QObject are defined in qt.kdbgtt. Additionally, QTableView is defined as an alias of QObject.
[Type Table]
Types1=QString
Types2=QObject,QTableView
[QString]
Display={ % }
Expr1=(%s).shd->data
[QObject]
Display={ name=% #chld=% }
Expr1=(%s).objname
Expr2=(%s).childObjects->numNodes
[QTableView]
Alias=QObject
Note that it is safer to wrap the %s in parentheses.