So, how difficult is to implement each component of a debugger?

Here is an estimate of the complexity and effort (by a senior staff engineer with solid experience in compiler development) required to implement each component:

Independent Components Complexity Effort 
Low-level symbol table 1 % 4 hr
High-level symbol table 20 % 60 hr
Object file format reader
low-level (ELF):
high-level (dwarf-3)

5 %
20 %

8 hr
60 hr
Expression evaluator
low-level (address / constants)
high-level (lines, types, variables, functions)

5 %
35 %

8 hr
160 hr
Execution engine 10 % 40 hr
Command processor 3 % 40 hr
User interface 1 % 16 hr
     
Dependent Components    
Disassembler (*) 40 % 40 hr
Code analyzer 20 % 40 hr
Register description 10 % 24 hr
Target access 10 % 40 hr
ABI description 20 % 60 hr

(*) the complexity depends on the processor's instruction set.

A detailed analysis of each component is available here.

 



© 2007 Giampiero Caprino, Backer Street Software