History log of /haiku-fatelf/src/apps/debugger/debug_info/DwarfFunctionDebugInfo.h
Revision Date Author Comments
# d315bfd5 16-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added class ValueLocation to represent a location of a value on the target
machine.
* DWARF:
- Various additions to the DIE classes.
- DwarfExpressionEvaluationContext:
- Added support for location expressions and thus the missing DW_OP_piece
and DW_OP_bit_piece operations.
- Fixed some deviations from the specs.
- Added debug output.
- DwarfFile:
- Added missing evaluation of CFA expression rules.
- Added service methods to evaluate expressions, location expressions,
and constant and dynamic values.
* Added model classes for representing types and variables. Particularly the
types part is not finished yet.
* StackFrame does now contain parameters and local variables.
* Added DwarfInterfaceFactory, which creates implementation objects for the
types, as well as variables objects. It's even less finished.
* DwarfImageDebugInfo::CreateFrame(): Resolve function parameters and add them
to the stack frame. No local variables yet.
* Added the beginnings of a variables view. Only lists the names of parameters
and local variables (of understood types) ATM.
* Renamed RegisterView to RegistersView.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31614 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f66bd625 07-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Very much work in progress, not in a particularly working state. Haiku munged
a good part of the source tree, so I rather get those changes into the
repository before continuing.
The general aim of the work is to deal with multiple instances of the same
function, e.g. inlined or non-inlined inline functions or those weird duplicates
gcc (4 at least) seems to be generating for no apparent reason.
* Added classes FunctionInstance (wrapping FunctionDebugInfo) and Function.
FunctionInstance represents a physical instance of a function (e.g. inlined
function at a particular address). A Function collects all FunctionInstances
referring to the same source code location.
* Moved the SourceCode property from FunctionDebugInfo to Function accordingly.
* Since SourceCode is no longer associated with a concrete function instance,
several methods dealing with statements have been removed and the
functionality has been provided through other means (e.g. TeamDebugModel or
SpecificImageDebugModel). This part is not yet completed.
* Introduced UserBreakpoint and UserBreakpointInstance. The user sets a
breakpoint at a source code location, which is represented by a
UserBreakpoint. Since that source location can be mapped to one address per
instance of the respective function, UserBreakpoint has a
UserBreakpointInstance per such function instance, which in turn refers to a
Breakpoint (an actual breakpoint at an address).
* Adjusted Breakpoint, BreakpointManager, and TeamDebugger accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31447 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 593fa677 02-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* DWARF:
- DwarfUtils::GetDeclarationLocation(): Line/column numbers are one-based.
- Added line number program interpretation (LineNumberProgram).
* FunctionDebugInfo: Return the source file (LocatableFile) instead of the
file name.
* FileManager/LocatableEntry: Fixed handling when a LocatableEntry is
unreferenced. There was a race condition before, since an unreferenced entry
could be referenced and unreferenced again before removing it from the hash
table, which could lead to double deletion. Now we never reuse an unreferenced
entry and just remove it from the hash table when encountering one.
* FileManager/SourceFile: Added class SourceFile which loads a source file from
disk and slices it into lines. Managed by FileManager.
* Added class FileSourceCode, a SourceCode implementation using a SourceFile as
line provider. The statement management works pretty much exactly as in
DissassembledCode.
* DwarfImageDebugInfo: Implemented LoadSourceCode for real. It creates a
FileSourceCode and uses the DWARF line number information for the statement
information. This basically gets the source level view going, though there
are still several problems -- stepping doesn't work perfectly yet, the source
isn't found for all functions, there's no handling of duplicate functions (no
idea why gcc generates them in the first place), etc.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31382 a95241bf-73f2-0310-859d-f6bbb57e9c96


# df9cc734 29-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Retrieve the source file declaration locations for functions and attach them
to the DwarfFunctionDebugInfo objects. The functions do now appear organized
by source file in the function list view. Unfortunately the list view is too
small to look as clear as it should. Got to think of something else I'm afraid.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31326 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b60969c 29-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renamed ArchitectureTypes.h to Types.h.
* Created "types" subdirectory for basic types and moved Types.h,
SourceLocation, TargetAddressRange there.
* Added TargetAddressRangeList, representing a list of address ranges.
* Array: Added copy constructor and assignment operator.
* Added DwarfFunctionDebugInfo.
* ElfFile: Also read the program headers and provide access to the segment
information.
* DWARF:
- Some work on DIECompileUnitBase and DIESubprogram to handle attributes we
need.
- Added DwarfUtils class which provides static utility methods. Currently some
to get DIE names. Only provisionally implemented yet.
- Read range list attribute values from the .debug_ranges section. Extended
AttributeValue to handle them correctly (ref-counting).
* DwarfImageDebugInfo:
- Implemented GetFunctions() for real, i.e. we return functions for all
subprogram debug info entries we find (those that refer to actual
functions, that is).
- Implemented the fallback part of LoadSourceCode() (reading the code from the
file and disassembling it).

Things should hopefully work as before, just a bit slower and with less accurate
function names, if DWARF debug info is available. Promising, eh? ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31321 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d315bfd510d1dba20fe05a39ac455fe354ca1a96 16-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added class ValueLocation to represent a location of a value on the target
machine.
* DWARF:
- Various additions to the DIE classes.
- DwarfExpressionEvaluationContext:
- Added support for location expressions and thus the missing DW_OP_piece
and DW_OP_bit_piece operations.
- Fixed some deviations from the specs.
- Added debug output.
- DwarfFile:
- Added missing evaluation of CFA expression rules.
- Added service methods to evaluate expressions, location expressions,
and constant and dynamic values.
* Added model classes for representing types and variables. Particularly the
types part is not finished yet.
* StackFrame does now contain parameters and local variables.
* Added DwarfInterfaceFactory, which creates implementation objects for the
types, as well as variables objects. It's even less finished.
* DwarfImageDebugInfo::CreateFrame(): Resolve function parameters and add them
to the stack frame. No local variables yet.
* Added the beginnings of a variables view. Only lists the names of parameters
and local variables (of understood types) ATM.
* Renamed RegisterView to RegistersView.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31614 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f66bd6256a87005ccaa493859ede2ca1601b8560 07-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Very much work in progress, not in a particularly working state. Haiku munged
a good part of the source tree, so I rather get those changes into the
repository before continuing.
The general aim of the work is to deal with multiple instances of the same
function, e.g. inlined or non-inlined inline functions or those weird duplicates
gcc (4 at least) seems to be generating for no apparent reason.
* Added classes FunctionInstance (wrapping FunctionDebugInfo) and Function.
FunctionInstance represents a physical instance of a function (e.g. inlined
function at a particular address). A Function collects all FunctionInstances
referring to the same source code location.
* Moved the SourceCode property from FunctionDebugInfo to Function accordingly.
* Since SourceCode is no longer associated with a concrete function instance,
several methods dealing with statements have been removed and the
functionality has been provided through other means (e.g. TeamDebugModel or
SpecificImageDebugModel). This part is not yet completed.
* Introduced UserBreakpoint and UserBreakpointInstance. The user sets a
breakpoint at a source code location, which is represented by a
UserBreakpoint. Since that source location can be mapped to one address per
instance of the respective function, UserBreakpoint has a
UserBreakpointInstance per such function instance, which in turn refers to a
Breakpoint (an actual breakpoint at an address).
* Adjusted Breakpoint, BreakpointManager, and TeamDebugger accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31447 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 593fa6776aecf8e722941718824b08338991555d 02-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* DWARF:
- DwarfUtils::GetDeclarationLocation(): Line/column numbers are one-based.
- Added line number program interpretation (LineNumberProgram).
* FunctionDebugInfo: Return the source file (LocatableFile) instead of the
file name.
* FileManager/LocatableEntry: Fixed handling when a LocatableEntry is
unreferenced. There was a race condition before, since an unreferenced entry
could be referenced and unreferenced again before removing it from the hash
table, which could lead to double deletion. Now we never reuse an unreferenced
entry and just remove it from the hash table when encountering one.
* FileManager/SourceFile: Added class SourceFile which loads a source file from
disk and slices it into lines. Managed by FileManager.
* Added class FileSourceCode, a SourceCode implementation using a SourceFile as
line provider. The statement management works pretty much exactly as in
DissassembledCode.
* DwarfImageDebugInfo: Implemented LoadSourceCode for real. It creates a
FileSourceCode and uses the DWARF line number information for the statement
information. This basically gets the source level view going, though there
are still several problems -- stepping doesn't work perfectly yet, the source
isn't found for all functions, there's no handling of duplicate functions (no
idea why gcc generates them in the first place), etc.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31382 a95241bf-73f2-0310-859d-f6bbb57e9c96


# df9cc7340c2434eefbad8589ae4b5d2e7061fdca 29-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Retrieve the source file declaration locations for functions and attach them
to the DwarfFunctionDebugInfo objects. The functions do now appear organized
by source file in the function list view. Unfortunately the list view is too
small to look as clear as it should. Got to think of something else I'm afraid.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31326 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b60969c5cd42c27295bb89746ef6882c0559a7a 29-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renamed ArchitectureTypes.h to Types.h.
* Created "types" subdirectory for basic types and moved Types.h,
SourceLocation, TargetAddressRange there.
* Added TargetAddressRangeList, representing a list of address ranges.
* Array: Added copy constructor and assignment operator.
* Added DwarfFunctionDebugInfo.
* ElfFile: Also read the program headers and provide access to the segment
information.
* DWARF:
- Some work on DIECompileUnitBase and DIESubprogram to handle attributes we
need.
- Added DwarfUtils class which provides static utility methods. Currently some
to get DIE names. Only provisionally implemented yet.
- Read range list attribute values from the .debug_ranges section. Extended
AttributeValue to handle them correctly (ref-counting).
* DwarfImageDebugInfo:
- Implemented GetFunctions() for real, i.e. we return functions for all
subprogram debug info entries we find (those that refer to actual
functions, that is).
- Implemented the fallback part of LoadSourceCode() (reading the code from the
file and disassembling it).

Things should hopefully work as before, just a bit slower and with less accurate
function names, if DWARF debug info is available. Promising, eh? ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31321 a95241bf-73f2-0310-859d-f6bbb57e9c96