History log of /haiku-fatelf/src/apps/debugger/debug_info/BasicFunctionDebugInfo.cpp
Revision Date Author Comments
# c3e066cf 16-Dec-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Replaced uses of obsolescent BReference[able] API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39869 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


# 671ef9b0 27-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Some moving and renaming.
* Added TeamDebugInfo which serves as factory for ImageDebugInfos.
* Added the DWARF code to the build again. It's not used yet, though.


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


# 6fb6551c 26-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* ThreadHandler::_ClearContinuationState(): Forgot to set fStepStatement to
NULL after releasing its reference, so it could be released again later.
* No longer attach the source code to StackFrame, but rather to
FunctionDebugInfo. Besides being the more obvious place it also prevents
un-/reloading the source code when stepping. Only disadvantage is that we
never unload the source again yet.


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


# 0b60fa86 20-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added DebuggerInterface::GetSymbolInfos() to get the symbols for an image.
* Added the beginnings of the debug info abstraction. Currently we can only load
the symbols via the debugger.
* Added a job to retrieve debug info for an image. Extended the GetStackTraceJob
to support waiting for image debug info to be loaded.
* Extended ImageInfo by text/data address and size.
* Removed StackFrameX86 and made StackFrame a simple non-polymorphic class
featuring all the needed data. The really architecture-dependent is in the
referenced CpuState already. Added Image* and FunctionDebugInfo* attributes,
referring to the image respectively debug info for the function hit by the
instruction pointer.
* Switched StrackTrace's StackFrame management from DoublyLinkedList to
BObjectList. This makes it more comfortable to use.
* Changed the code for creating stack traces:
- The creation of the StackTrace object and the main loop to collect the
frames are now located in the no longer virtual
Architecture::CreateStackTrace().
- The decision how to create a StackFrame is based on the instruction pointer.
If it hit a function for which debug info is available, the respective
DebugInfo::CreateStackFrame() is used, otherwise we fall back to the new
virtual Architecture::CreateStackFrame().
* Adjusted the stack trace view to also show function names (mangled ATM).


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


# c3e066cf6d35a86d29396d4e740f9811e506b66c 16-Dec-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Replaced uses of obsolescent BReference[able] API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39869 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


# 671ef9b08426d9131bbea63d1ba4177c6f497d70 27-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Some moving and renaming.
* Added TeamDebugInfo which serves as factory for ImageDebugInfos.
* Added the DWARF code to the build again. It's not used yet, though.


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


# 6fb6551c9715409467e93941b15e87c7d5291e69 26-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* ThreadHandler::_ClearContinuationState(): Forgot to set fStepStatement to
NULL after releasing its reference, so it could be released again later.
* No longer attach the source code to StackFrame, but rather to
FunctionDebugInfo. Besides being the more obvious place it also prevents
un-/reloading the source code when stepping. Only disadvantage is that we
never unload the source again yet.


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


# 0b60fa86e977411b90631a7a177c4b93c18106e1 20-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added DebuggerInterface::GetSymbolInfos() to get the symbols for an image.
* Added the beginnings of the debug info abstraction. Currently we can only load
the symbols via the debugger.
* Added a job to retrieve debug info for an image. Extended the GetStackTraceJob
to support waiting for image debug info to be loaded.
* Extended ImageInfo by text/data address and size.
* Removed StackFrameX86 and made StackFrame a simple non-polymorphic class
featuring all the needed data. The really architecture-dependent is in the
referenced CpuState already. Added Image* and FunctionDebugInfo* attributes,
referring to the image respectively debug info for the function hit by the
instruction pointer.
* Switched StrackTrace's StackFrame management from DoublyLinkedList to
BObjectList. This makes it more comfortable to use.
* Changed the code for creating stack traces:
- The creation of the StackTrace object and the main loop to collect the
frames are now located in the no longer virtual
Architecture::CreateStackTrace().
- The decision how to create a StackFrame is based on the instruction pointer.
If it hit a function for which debug info is available, the respective
DebugInfo::CreateStackFrame() is used, otherwise we fall back to the new
virtual Architecture::CreateStackFrame().
* Adjusted the stack trace view to also show function names (mangled ATM).


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