ldb -- A Retargetable Debugger

ldb is a retargetable debugger for ANSI C. The original version supported MIPS, SPARC, VAX, and MC68000 targets. ldb has been shown to be very easy to retarget from machine to machine. I believe it should also be easy to support different target languages, but I have not amassed much evidence. ldb was my dissertation project; the abstract and thesis are available. You can find some other related papers on my research activities page.

On January 5, 1996, I released a working, publicly-available version, but there is still some awkwardness with paths and the build process. You can get a source distribution in gzipped tar format, installation instructions, a guide to the sources, and a totally inadequate guide to using ldb. You might want to read the rest of this introduction before grabbing lots of other stuff, though.

ldb was my dissertation project; the abstract and thesis are available. You can find some other related papers on my research activities page.

ldb is a research prototype. You might find it useful if:

If you just need a debugger, use gdb or dbx.

An essential premise of ldb's design is that the compiler has most of the machine-dependent information the debugger needs, so the compiler should be the one to provide it. ldb's debugging-symbol format is designed expressly to support retargeting (and multi-language debugging), and it is not backward-compatible with formats designed for gdb, dbx, or with DWARF. You can't use ldb unless you have a compiler that has been altered to emit these symbols.

I have altered Fraser and Hanson's lcc compiler to emit debugging symbols used by ldb. The current distribution works with lcc version 3.4b. For historical reasons, ldb does not support lcc's x86 target, and lcc no longer supports ldb's 68000 and VAX targets.

ldb is written using noweb, a tool for literate programming. It's not a very literate program, though---the only parts I've expended much effort documenting are the ``hard parts.'' Most of the system is written in Modula-3, but parts are also written in C, Icon, PostScript, and two special-purpose languages. You must install DEC SRC Modula-3 (version 3), noweb, Icon, and lcc (or alter another C compiler to make it compatible). I supply the PostScript and the special-purpose languages.

As should be clear, a working ldb system requires more than a single program. The most important parts are:

Other parts are used during the build process.

ldb is built using the Modula-3 m3build program. A twisty collection of impenetrable quake code mostly gets the parts in the right places and properly hooked together. Because this is a first release, it probably won't build. Please write me, nr@cs.tufts.edu, with complaints and suggestions.

If you are truly adventurous and want to try porting ldb to new hardware, you might begin with these sadly obsolete porting instructions. Stuff about source-code organization and building ldbis guaranteed to be lies.