dbx ./a.out
dbx ./a.out core
dbx - core
dbx -p <pid>
pathmap <build dir> <src dir>
pathmap -d /path
pathmap
Faster startup (no symbols initially):
dbx -r blah.tsk arg1 arg2
(dbx) loadobject -load -allExclude a library:
(dbx) loadobject -exclude libX.soSpeed up symbol loading (shared object debugging):
strip _task_name_run [args]
rerun
attach <pid>
detach
quit
stop at file.c:42
stop in function_name
stop in class::method
stop in function if x == 10
C++ Specific:
stop in Class::Class
stop in Class::~Class
stop in 'Class<int>::method'
stop throw
status
delete <n>
disable <n>
enable <n>
trace in function_name
trace at file.c:42
stop access var
stop change var
stop access w &var, 4
Reference: https://docs.oracle.com/cd/E37838_01/html/E61063/gkkql.html
run
cont
next # step over
step # step into
step up # finish current function
nexti # instruction step over
stepi # instruction step into
where # backtrace
when at 100 { assign y = 5; cont at 102; }
when in function { assign y = 5; cont at 102; }assign y = 5
cont at 102intercept -all
intercept -x ExceptionType
intercept -setcall foo(15)
call foo(3.14)For templates:
whatis foo
whatis -t foo
stop in foo<double>up
down
frame <n>
Reference: https://docs.oracle.com/cd/E37838_01/html/E61063/gkkom.html
print var
print *ptr
print var.member
display var
undisplay <n>
examine var
x &var
x/16bx &buffer
whatis var
whatis type_name
Reference: https://docs.oracle.com/cd/E37838_01/html/E61063/gkkog.html
file <file_name>
list
list 40,60
list function_name
dis
dis function_name
listi
Threads & LWPs
threads
thread
thread <id>
lwps
lwp
lwp <id>
Reference: https://docs.oracle.com/cd/E37838_01/html/E61063/gkkqj.html
catch SIGSEGV
ignore SIGPIPE
signal
Reference: https://docs.oracle.com/cd/E37838_01/html/E61063/gkkpz.html
dbx ./a.out core
where
print var
debug ./a.out
core corefile
check -all
check -access
check -leaks
showleaks
showmemuse
Reference: https://docs.oracle.com/cd/E37838_01/html/E61063/gkkqu.html
help
help <command>
set $disasm = on
setenv VAR value
shell ls
call function(args)
source .dbxrc
gdb off|on
~/.dbxrc