Quick links

A Machine-Independent Debugger

Report ID:
TR-500-95
Date:
October 1995
Pages:
24
Download Formats:

Abstract:

cdb is a simple, source-level debugger for ANSI C programs compiled by
lcc, a retargetable C compiler. cdb is completely independent of its
target architecture. This independence is achieved by embedding a
small amount of itself -- a `nub' -- in the program to be debugged and
by having the compiler emit machine-independent symbol-table data and
related code. This paper describes the design of a nub interface for
debugging, the target-independent implementation of this interface for
cdb, and the implementation of cdb itself. When compared to
platform-specific debuggers, cdb's implementation is minuscule: the
nub, debugger, and associated communications routines take about 1500
lines of C, and fewer than 600 lines were added to lcc's front end to
emit symbol tables and breakpoint hooks. All this code is machine
independent.

This technical report has been published as
A Machine-Independent Debugger. David R. Hanson and Mukund
Raghavachari,
Software--Practice and Experience 26(11) 1996,
pp. 1277-1299.
Follow us: Facebook Twitter Linkedin