Sun Studio 12: Debugging a Program With dbx

Variables Valid for when Command

The following variables are valid only within the body of a when command.

$handlerid

During the execution of the body, $handlerid is the id of the when command to which the body belongs. These commands are equivalent:


when X -temp { do_stuff; }
when X  { do_stuff; delete $handlerid; }

$booting

$booting is set to true if the event occurs during the boot process. Whenever a new program is debugged, it is first run without the user’s knowledge so that the list and location of shared libraries can be ascertained. The process is then killed. This sequence is termed booting.

While booting is occurring, all events are still available. Use this variable to distinguish the sync and the syncrtld events occurring during a debug and the ones occurring during a normal run.