dbx
Debug programs
TLDR
Create a new dbx project in the current working directory
Sync local files from the specified path to DBFS and watch for changes
Deploy the specified workflow to artifact storage
Launch the specified workflow after deploying it
SYNOPSIS
dbx [options] [program] [core]
PARAMETERS
-c cmdfile
Execute commands from cmdfile before prompting
-C
Enable full runtime checking (memory access, leaks)
-d dbxrc
Use alternate .dbxrc initialization file
-D
Enable dynamic sections in core files
-E
Enable event probing
-f
Suppress loading of .dbxrc and dbxrc
-F
Run until first breakpoint or error even with -r
-G
Disable source loading and line info
-h
Suppress printing of signals and faults
-H
Header: print program header info
-I path
Add path to source search directories
-k
Run until main() like -r but with keyboard interrupt
-ll
Link with loopback libld.so
-lx
Link with X library
-n
Do not initialize dbx environment
-p pid
Attach to running process pid
-r
Run program until breakpoint or error
-s
Stop at first malloc() or free() on errors
-S
Symbol table stabilization
-v
Verbose mode
-V
Print version information
-w
Write core image on quit
-x
Quick: run until main() or first breakpoint
-y
Ignore compiler-generated files
DESCRIPTION
dbx is a versatile source code debugger for Unix-like systems, including Linux via specific toolchains like Oracle Developer Studio. It enables developers to debug executables in languages such as C, C++, Fortran, Modula-2, and Pascal at the source level. Key capabilities include setting breakpoints on lines, functions, or variables; single-stepping through code; examining and modifying memory, registers, and stack traces; handling core dumps; and attaching to running processes.
dbx supports runtime checking for memory access errors, leaks, and bounds violations via options like -C. It integrates with optimizing compilers, preserving debug info for accurate line mapping. Interactive commands like run, stop, print, where, and next provide an intuitive debugging session.
While powerful, dbx is less common on Linux than gdb due to its Sun Microsystems heritage. It excels in multi-threaded and large-scale application debugging, with features like call graphing and performance analysis. Usage typically starts with dbx program core or dbx -x program for quick starts.
CAVEATS
Not standard on most Linux distros; requires Oracle Solaris Studio or compat packages. Limited multi-arch support; best for SPARC/x86 Solaris binaries. May conflict with gdb in mixed environments.
COMMON WORKFLOW
dbx prog
(run)
stop in main
run
next
print var
RUNTIME CHECKS
Use dbx -C prog for memchecks. Commands: check, catch for leaks/errors.
HISTORY
Originated at UC Berkeley in 1979 for Pascal/VAX. Ported to SunOS by 1980s; Sun Microsystems enhanced for SPARC/Solaris (dbx versions 3-8). Oracle acquired Sun; maintained in Developer Studio for Linux/Solaris since 2005.


