0% found this document useful (0 votes)
269 views1 page

DBX Cheat Sheet: in Memory and Runs Till The

This document provides a cheat sheet for using the dbx debugging tool. It lists common dbx commands for loading and running programs, examining the call stack, setting and deleting breakpoints, stepping through code, tracing execution, debugging multithreaded programs, and examining variables and memory. The cheat sheet also provides tips for debugging programs on mismatched machines and fixing and continuing debugging within a session.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
269 views1 page

DBX Cheat Sheet: in Memory and Runs Till The

This document provides a cheat sheet for using the dbx debugging tool. It lists common dbx commands for loading and running programs, examining the call stack, setting and deleting breakpoints, stepping through code, tracing execution, debugging multithreaded programs, and examining variables and memory. The cheat sheet also provides tips for debugging programs on mismatched machines and fixing and continuing debugging within a session.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

DBX Cheat Sheet  [] indicates optional values

Loading a program Examining the call stack Debugging multithreaded  Mismatched cores

dbx program_name where threads e.g., when debugging a core 


generated on machine X 
dbx ­ process_id thread
(customer) using machine Y 
Examining variables thread thread_id (developer) 
(dbx) dbxenv 
Running a program print expression lwps
core_lo_pathmap on 
(dbx) run [args] display expression (dbx) pathmap 
(dbx) run [args] [<input ]  undisplay expression Miscellaneous paths_to_correct_libs 
[>output ] (dbx) pathmap /install/ 
undisplay 0 list [function_name] /local/dbg/install/ 
dump (show local variables) (dbx) debug program core

Examining core files Examining memory regs

dbx program_name core examine address [/ [count]  detach


[format]
dbx ­ core Fix and continue

Walking the call stack Dbx allows you to fix code 
and continue debugging 
Breakpoints Tracing Execution up [­h] [number]
without rebuilding/restarting 
(dbx) stop in function_name Display lines as executed down [­h] [number] the debug session. To fix 
(dbx) trace event_spec  your code:
(dbx) stop at file:line frame [­h] [number]
[modifier] 1. Change source
2. (dbx) fix
(dbx) status e.g.,
This rebuilds the .o, loads it 
(dbx) delete all/#breakpoint trace step Runtime checking in memory and runs till the 
trace next­in function (dbx) check ­memuse fix. This does not change 
the exe, so the exe has to be 
Stepping trace change variable (dbx) check ­access rebuilt post debugging.
next [n]  trace in func ­thread th_id Generates reports about 
memory access/leaks/use
step [n] (dbx) dbxenv trace_speed  Exit
number  (dbx) quit
cont (dbx) trace ­file output_file

Debugging a Program With dbx
http://docs.sun.com/source/819­3683/

You might also like