|
Class relationship
The following table describes the
relationships between the major classes that constitute the
debugger.
Implementation of these classes should ensure that all main features
of the debugger can be supported in a fairly straightforward way.
This table does not define the following two
important elements:
The basic design principle of the classes is
that <class>Manager or <class>Pool implement most of the logic
controlling a number of <class> instances.
For example, a StringPool class can implement the Find() method; a
SymbolPool can implement a FindByName(), a FindByAddress(), a
PreviousSymbol() and other similar methods.
Basic Services |
Allocator |
|
5 % |
40 hr |
|
Semaphore |
|
|
|
|
HostThread |
Semaphore |
|
|
|
HostThreadPool |
Thread |
|
|
|
Task |
|
|
|
|
TaskManager |
Task,
Allocator |
|
|
|
Event |
|
|
|
|
EventDispatcher |
Event,
Allocator |
|
|
|
String |
|
|
|
|
Hash |
|
|
|
|
StringPool |
String,
Hash |
|
|
|
Segment |
String |
|
|
|
SegmentPool |
Segment,
Allocator |
|
|
|
Address |
Segment |
|
|
|
AddressRange |
Address |
|
|
|
Section |
Segment,
AddressRange |
|
|
|
SectionMap |
Section |
|
|
|
NameTable |
StringPool |
|
|
|
AddressTable |
Address,
Segment |
|
|
|
|
|
|
|
Low-level symbol table |
|
|
1 % |
4 hr |
|
Symbol |
AddressRange,
Section,
NameTable |
|
|
|
SymbolPool |
Symbol |
|
|
|
LowLevelSymbolTable |
LowLevelSymbol |
|
|
|
Value |
|
|
|
|
BinaryFile |
LowLevelSymbolTable,
SectionMap,
CompilationUnitPool |
|
|
|
BinaryFilePool |
BinaryFile,
Allocator |
|
|
|
SymbolTable |
BinaryFilePool |
|
|
|
|
|
|
|
High-level symbol table |
|
|
20 % |
60 hr |
|
Location |
|
|
|
|
LocationPool |
Location,
Allocator |
|
|
|
SourceFile |
NameTable,
SectionMap,
LineTable |
|
|
|
SourceFilePool |
SourceFile,
Allocator |
|
|
|
Statement |
AddressRange,
SourceFile |
|
|
|
LineTable |
Statement,
SourceFile |
|
|
|
Type |
Location,
Statement |
|
|
|
TypePool |
Type,
Allocator |
|
|
|
Variable |
Type,
NameTable,
Address,
SourceLocation |
|
|
|
VariablePool |
Variable,
Allocator |
|
|
|
Function |
Type,
VariablePool,
SourceFile,
LineTable,
LocationPool
(instances) |
|
|
|
FunctionPool |
Function,
Allocator |
|
|
|
CompilationUnit |
VariablePool
(globals, static),
FunctionPool,
TypePool
(C only) |
|
|
|
CompilationUnitPool |
CompilationUnit,
Allocator |
|
|
|
|
|
|
|
Object
file format reader
low-level (ELF): |
|
|
5 % |
8 hr |
|
ElfFile |
BinaryFile |
|
|
|
ElfRelocation |
BinaryFile |
|
|
|
|
|
|
|
Object
file format reader
high-level (dwarf-3) |
|
|
20 % |
60 hr |
|
DwarfLineParser |
ElfFile,
SourceFilePool,
Statement |
|
|
|
DwarfCUParser |
CompilationUnitPool,
VariablePool,
TypePool,
FunctionPool,
SourceFilePool |
|
|
|
DwarfMacroParser |
SourceFilePool,
NameTable |
|
|
|
DwarfFrameParser |
FunctionPool,
LocationPool,
AddressRange |
|
|
|
|
|
|
|
Expression evaluator
low-level (address / constants) |
|
|
5 %
|
8 hr
|
|
Node |
Value,
Type,
Location |
|
|
|
NodePool |
Node,
Allocator |
|
|
|
Result |
Node |
|
|
|
EvaluationTask |
String,
Result,
Context,
Task |
|
|
|
ExpressionParser |
String,
NodePool,
SymbolTable |
|
|
|
|
|
|
|
Expression evaluator
high-level (lines, types, variables, functions) |
|
|
35 % |
160 hr |
|
ExpressionParser
(extended) |
CompilationUnitPool,
VariablePool,
TypePool,
FunctionPool,
LineTable |
|
|
|
|
|
|
|
Execution engine |
|
|
10 % |
40 hr |
|
Register |
Value,
String,
Type |
|
|
|
RegisterPool |
Register,
Allocator |
|
|
|
RegisterLocation |
Register,
Location |
|
|
|
Frame |
AddressRange,
RegisterLocation,
Value, Address |
|
|
|
FramePool |
Frame,
Allocator |
|
|
|
BreakPoint |
Address,
Statement,
Node (condition) |
|
|
|
BreakPointPool |
BreakPoint,
Allocator |
|
|
|
Thread |
Process,
FramePool,
RegisterPool,
BreakPointPool |
|
|
|
ThreadPool |
Thread,
Allocator |
|
|
|
Process |
ThreadPool,
SymbolTable,
BreakPointPool,
TargetAccess |
|
|
|
ProcessPool |
Process,
Allocator |
|
|
|
EventManager
(stepping) |
Process,
Event,
Task,
BreakPoint |
|
|
|
|
|
|
|
Command
processor |
Command |
TaskManager,
Context,
Process,
String,
ExpressionParser,
OutputChannel,
TargetAccess |
3 % |
40 hr |
|
CommandManager |
Command,
Thread |
|
|
|
CommandParser |
CommandManager |
|
|
|
|
|
|
|
User
interface |
OutputChannel |
|
1 % |
16 hr |
|
Serial |
OutputChannel |
|
|
|
Terminal |
OutputChannel |
|
|
|
GDBChannel |
OutputChannel |
|
|
|
|
|
|
|
Disassembler (*) |
Disassembler |
Address,
Context,
String,
SymbolTable |
40 % |
40 hr |
|
|
|
|
|
CodeAnalyzer |
InstructionType |
|
20 % |
40 hr |
|
CodeAnalyzer |
Address,
Context,
SymbolTable |
|
|
|
|
|
|
|
Register definition |
RegisterDefinition |
RegisterPool |
10 % |
24 hr |
|
|
|
|
|
Target
access |
TargetAccess |
EventDispatcher,
Task,
Thread,
String (device) |
10 % |
40 hr |
|
Connect
(method) |
TargetAccess,
String (options) |
|
|
|
Disconnect
(method) |
TargetAccess |
|
|
|
MemoryAccess
(method) |
TargetAccess,
Address |
|
|
|
RegisterAccess
(method) |
TargetAccess,
RegisterPool |
|
|
|
Run
(method) |
TargetAccess |
|
|
|
SetBreakPoint
ClearBreakPoint
(methods) |
TargetAccess,
Address |
|
|
|
GetInfo
(method) |
TargetAccess,
ProcessPool |
|
|
|
|
|
|
|
ABI
description |
|
|
20 % |
60 hr |
|
ParameterLocator |
Function,
Variable,
Type,
Location |
|
|
|
ReturnValueLocator |
Function,
Variable,
Type,
Location |
|
|
(*) the complexity depends on the processor's instruction set.
© 2007 Giampiero Caprino, Backer Street Software
|
|