The X/Motif Analyzer provides special debugging support for X/Motif applications and is available from the WorkShop Views menu. The X/Motif Analyzer operates in a number of modes (referred to as examiners ) for examining different types of X/Motif objects. The X/Motif Analyzer provides information unavailable through conventional debuggers. It also lets you set widget-level breakpoints and collect X-event history.
When you first invoke the X/Motif Analyzer, it comes up in widget examiner mode. You can switch to other examiners through the Examiner menu or by clicking the tabs at the bottom of the window (See Figure 6-1).
The X/Motif Analyzer provides the following types of examiners:
Widget examiner--identifies a widget's ID, name, class, and parent, and displays its definitions.
Widget Tree examiner--displays the widget hierarchy (see Figure 6-2). You can display widgets by name, class, or ID by selecting from the widget display menu. Double-clicking a widget node switches to the widget examiner and displays data for the selected widget.
Breakpoints examiner--lets you set breakpoints at the widget and widget-class level. You can set breakpoints at the following levels:
Timeout callback functions
Input callback functions
Widget state changes
Trace examiner--lets you trace the execution of your application and collect the following types of data:
X Server Events
X Server Requests
Widget event dispatch information
Widget resource changes
Widget state changes
Figure 6-3, is a typical example of the trace examiner. The events appear in a list. Double-clicking an event displays its details.
Callback examiner--comes up automatically when a process stops in a callback. It displays the following information:
Callstack frame for the callback function
Callback data structure
Window examiner--identifies the window, its parent and any children, and displays window attribute information.
Event examiner--displays the event structure for a given X event pointer.
Graphics context (GC) examiner--displays the X graphics context attributes for a given GC pointer.
Pixmap examiner--displays the basic attributes of an X pixmap, including size and depth, and can provide an ASCII display of small pixmaps, using the units digit of the pixel values.
Widget class examiner--displays the widget class attributes for a given widget class pointer.
The following table details where to find more information about the X/Motif Analyzer in the ProDev Workshop: Debugger User's Guide.
General information and tutorial
Chapter 11, “Using the X/Motif Analyzer: X/Motif Analyzer”
Detailed reference information
Appendix A, "X/Motif Analyzer Windows” subsection
Setting breakpoints to capture widget-level information
Appendix A; "Breakpoints Examiner” subsection
Tracing widget-level data through the execution of a program
Appendix A, "Trace Examiner” subsection
Getting information on a specified widget
Appendix A, "Widget Examiner” subsection
Displaying a graph of the widget hierarchy
Appendix A, "Tree Examiner” subsection
Getting information on a specified callback
Appendix A, "Callback Examiner” subsection
Getting information on a specified window
Appendix A, "Window Examiner” subsection
Getting information on a specified X event
Appendix A, "Event Examiner” subsection
Getting information on a specified graphics context
Appendix A, "Graphics Context Examiner” subsection
Getting information on a specified pixmap
Appendix, "Pixmap Examiner” subsection