Skip Navigation Links | |
Exit Print View | |
Oracle Solaris Studio 12.3: Debugging a Program With dbx Oracle Solaris Studio 12.3 Information Library |
4. Viewing and Navigating To Code
5. Controlling Program Execution
6. Setting Breakpoints and Traces
8. Evaluating and Displaying Data
11. Debugging Multithreaded Applications
16. Debugging Fortran Using dbx
17. Debugging a Java Application With dbx
18. Debugging at the Machine-Instruction Level
19. Using dbx With the Korn Shell
20. Debugging Shared Libraries
Breakpoint Event Specifications
inmember function inmethod function
inclass classname [-recurse | -norecurse]
inobject object-expression [-recurse | -norecurse]
Data Change Event Specifications
access mode address-expression [, byte-size-expression]
dlopen [ lib-path ] dlclose [ lib-path ]
Execution Progress Event Specifications
Variables Valid for when Command
Variables Valid for when Command and Specific Events
Setting a Breakpoint for Store to an Array Member
Enabling a Handler While Within a Function (in function)
Determining the Number of Lines Executed
Determining the Number of Instructions Executed by a Source Line
Enabling a Breakpoint After an Event Occurs
Resetting Application Files for replay
While dbx provides you with a rich set of breakpoint types through the event mechanism, it also uses many events internally. By stopping on some of these internal events you can easily disrupt the internal workings of dbx. If you modify the process state in these cases the chance of disruption is even higher. See Appendix A, Modifying a Program State and Call Safety.
dbx can protect itself from disruption in some cases but not all cases. Some events are implemented in terms of lower level events. For example, all stepping is based on the fault FLTTRACE event. So, issuing the command stop fault FLTTRACE disrupts stepping.
During the following phases of debugging, dbx is unable to handle user events because they interfere with some careful internal orchestration. These phases include:
When rtld runs at program startup (see Dynamic Linker)
The beginning and end of processes
Following the fork() function and the exec() function (see Following the fork Function and Following the exec Function
During calls when dbx needs to initialize a head in the user process (proc_heap_init())
During calls when dbx needs to ensure availability of mapped pages on the stack (ensure_stack_memory())
In many cases you can use the when command instead of the stop command, and echo the information you would have otherwise acquired interactively.
dbx protects itself by:
Disallowing the stop command for the sync, syncrtld, and prog_new events
Ignoring the stop command during the rtld handshake and the other phases mentioned above
For example:...stopped in munmap at 0xff3d503c 0xff3d503c: munmap+0x0004: ta %icc,0x00000008 dbx76: warning: 'stop' ignored -- while doing rtld handshake
Only the stoppage effect, including recording in the $firedhandlers variable, is ignored. Counts or filters are still active. To stop in such a case, set the event_safety environment variable to off.