dbx (debugger)

Definition
dbx is a command‑line source‑level debugger for programs written in languages such as C, C++, and Fortran. It enables developers to inspect and control the execution of a program, set breakpoints, examine memory and registers, and analyze core dump files on Unix‑like operating systems.

Overview
Originally developed at the University of California, Berkeley, dbx was first distributed as part of the Berkeley Software Distribution (BSD) and later incorporated into commercial Unix variants, including SunOS/Solaris, HP‑UX, AIX, and Tru64 UNIX. The tool operates interactively, allowing the user to issue commands to pause program execution, step through code, and query program state. Over time, dbx has been extended to support 64‑bit architectures, remote debugging over network connections, multi‑threaded applications, and modern language features such as C++ templates.

Etymology/Origin
The name “dbx” is commonly understood to be an abbreviation derived from “debugger”, with the “x” possibly indicating an extended or experimental version of earlier debugging utilities. Precise historical documentation of the naming convention is not publicly detailed, but the abbreviation aligns with naming practices of early Unix tools.

Characteristics

  • Platform Support: Primarily available on commercial Unix systems (Solaris, HP‑UX, AIX, Tru64) and some BSD derivatives. A version of dbx is also included in the OpenSolaris and Illumos projects.
  • Language Compatibility: Supports debugging of programs compiled from C, C++, Fortran, and, on some platforms, Java and Ada.
  • Executable Formats: Works with native executable formats such as ELF and COFF, and can analyze core dump files generated by the operating system.
  • Interface: Text‑based interactive command prompt. Commands include stop (set breakpoint), cont (continue execution), step, next, print, display, and where.
  • Symbolic Debugging: Utilizes symbol tables embedded in executables (produced by compilers with debugging flags, e.g., -g in GCC) to map machine addresses to source lines and variable names.
  • Remote Debugging: Provides facilities for debugging programs on a remote host via a network connection, using a client–server model where the debugger runs on a development workstation and the target process runs on a separate system.
  • Multi‑Threading: Supports inspection of individual threads, including setting thread‑specific breakpoints and viewing thread stacks.
  • Scripting and Automation: Allows execution of command scripts to automate repetitive debugging tasks; integration with IDEs on supported platforms enables graphical front‑ends.
  • Limitations: Compared with modern debuggers such as GDB or LLDB, dbx lacks some advanced features like just‑in‑time (JIT) debugging for interpreted languages, extensive plugin ecosystems, and extensive community‑driven documentation.

Related Topics

  • gdb (GNU Debugger) – A widely used open‑source debugger for Unix‑like systems.
  • lldb – The debugger component of the LLVM project, offering modern language support.
  • Core Dump – A file capturing the memory image of a crashed process, which dbx can analyze.
  • Symbol Table – Data structures within executables that map program addresses to source identifiers, utilized by dbx for symbolic debugging.
  • Remote Debugging – Techniques for debugging a program running on a different machine, supported by dbx and other debuggers.
  • Debugging Symbols – Compiler‑generated information (e.g., via -g) required for source‑level debugging.

Note: The information provided reflects documented features and historical context of dbx as reported by vendor manuals and Unix system documentation up to the knowledge cutoff date.

Browse

More topics to explore