Difference between revisions of "Dbx"
From MohidWiki
(→Quick Start) |
m (1 revision) |
(No difference)
|
Latest revision as of 10:27, 3 December 2008
dbx is a command-line based debugger. It debugs any executable compiled with symbolic information (usually with the -g option).
Contents
Quick Start
> dbx (dbx) debug program (dbx) run
(dbx) rerun
Reference sheet
ALIAS builds a user alias ASSIGN changes the values of variables CONT resumes execution after a breakpoint DELETE, CLEAR removes a breakpoint or trace event DUMP, PRINT displays the values of variables and expressions EDIT invokes an editor on a source code file FILE changes the current source code file FUNC changes the current procedure or function HELP accesses on-line help LIST displays the current source code file NEXT, STEP suspends execution after a number of lines of code have executed QUIT exits dbx SH passes a command to the interactive shell process for execution STATUS lists all breakpoints and trace events STOP sets a breakpoint TRACE sets a trace event WHATIS displays data types and dimension information WHERE displays of stack trace of current procedures and parameters WHEREIS displays the scope of an identifier WHICH lists the identifier resolutions
Examples
Set breakpoints
(dbx) stop at filename:linenumber
(dbx) status
Print variables
characters
(dbx) print -f "%c" variable
integers
(dbx) print -f "%d" variable
float
(dbx) print -f "%f" variable