Premium
A Machine‐Independent Debugger
Author(s) -
HANSON DAVID R.,
RAGHAVACHARI MUKUND
Publication year - 1996
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/(sici)1097-024x(199611)26:11<1277::aid-spe62>3.0.co;2-y
Subject(s) - debugger , computer science , programming language , compiler , debugging , interface (matter) , symbol (formal) , operating system , code (set theory) , table (database) , source code , independence (probability theory) , parallel computing , set (abstract data type) , database , mathematics , statistics , bubble , maximum bubble pressure method
cdb is a simpe, source‐level debugger for ANSI/ISO 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, a 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.