xcdb()
, if found. For every class you wish to examine, write an xcdb()
member function with these constraints:
void
xcdb()
member function (they cannot be inherited; they may be virtual, but must be defined for each subclass)
xcdb()
member function, click on the object (as usual), format the object as a "structure" (choose More
Detail
if you only have a pointer to the object), and choose Show self, which runs the object's xcdb()
member function. Control then returns to the debugger.
An xcdb()
member function can be written to do anything at all. It might say something interesting, display pretty pictures, and so on. Use your imagination.
Attempting to
Any breakpoint or exception inside the
Example
Clicking on the variable class Mumble
{
private: const char *name;
public: Mumble(const char *name) : name(name) {}
public: const char *name() { return name; }
public: void xcdb();
};
void Mumble::xcdb() { printf("My name is '%s'.\n", name()); }
main()
{
Mumble& mumble = *new Mumble("mumble");
}
mumble
in the Locals pane and choosing Show self from the menu displays
in the xterm window that invoked the debugger.My name is 'mumble'.
Notes
Show
self
on a class
or struct
for which no xcdb()
member function is defined produces a warning message but is otherwise harmless.xcdb()
member function, while running in the context of Show
self
, terminates the function (returning control to Xcdb
) and is otherwise ignored.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Generated with WebMaker