Using SoftBench Debugger

Interacting with Your Program

that interactions between SoftBench Debugger and your program do not lead to a deadlock. Events are processed when they happen, and are directed to the appropriate window. Debugging X programs not running in synchronous mode can lead to deadlock situations in which the keyboard focus is on an unresponsive window.

The XtAppInitialize function called to initialize the X Toolkit can set your application to synchronous mode. Do one of the following:

Pass the -synchronizeargument to your program on the command line. To always pass this argument to your X program, add -synchronizeto the default argument list using "Options: Default Load/Rerun Settings…".

Use the synchronize resource. You can specify it using xrdb, or in your $HOME/.Xdefaults file:

[Application*synchronize: on]

where Application is the class name of your program.

Your program has full control while it executes under SoftBench Debugger. Mouse functions and keyboard events pass to your program as usual, with the keyboard focus controlled by the X Window System and your window manager. When your program reaches a breakpoint, SoftBench Debugger regains control.

Your program's input and output work as they normally do. If you have not redirected stdin, stdout, or stderr, they refer to the User Program I/O Area.

In some situations it may be necessary to display the program being debugged on a different display terminal. You can do this by specifying the DISPLAY environment variable in the "File: Load Executable" dialog before you execute the program.

176

Chapter 7