History log of /haiku/src/kits/debugger/debug_info/TeamDebugInfo.cpp
Revision Date Author Comments
# a9d53d9e 22-Nov-2016 Rene Gollent <rene@gollent.com>

Debugger: Fix regression introduced in hrev50534.

FunctionInstance:
- Add new state FUNCTION_SOURCE_SUPPRESSED. This signals that the user
explicitly forced disassembly to be loaded despite source code being
available.

LoadSourceCodeJob:
- When forced to disassembly, use the above suppressed state accordingly.

SourceView/TeamWindow/TeamDebugger:
- Adjust to take new state into account as needed.

TeamDebugInfo::GetActiveSourceCode:
- When looking at a function to decide whether to return line information
based on source or disassembly, first examine the source code state. If
the source has never been loaded for that function, but we have it available,
set it on the function at that point. This lazily addresses the fact that
LoadSourceCodeJob is called on behalf of a specific function, and
consequently only sets the source code onto that function, and not all others
present in the same file. This allows us to differentiate between the case
where a function doesn't have source code available at all, versus a function
that has simply been forced to disassembly view at this point in time.

The primary symptom of the above issue was that attempting to set a breakpoint
outside of the currently active function, but within the same file would result
in the breakpoints view indicating that the breakpoint was at line 0 rather
than the appropriate line, and breakpoints would also not be drawn in the
source view for such locations.

Thanks to Humdinger for the heads up!


# b65adbdf 09-Sep-2016 Rene Gollent <rene@gollent.com>

Debugger: Fix #12940.

- Add new interface TeamFunctionSourceInformation. Currently this
exposes a single function allowing one to query for the currently
active source code given a FunctionDebugInfo instance.
- Implement TeamFunctionSourceInformation on TeamDebugInfo.
- Pass TeamFunctionSourceInformation to Dwarf{Team,Image}DebugInfo.
In turn, make use of it in DwarfImageDebugInfo::GetStatement() in
order to determine whether to return the corresponding assembly
or source statement.

With this piece of information, the debugger is now correctly able to
determine that the user is currently looking at disassembly despite debug
info being available, and consequently adjust its stepping behavior based on
that. Previously, the source code statement was always used, leading to it
not being possible to single step assembly lines in such a circumstance
without manually using run to cursor.

Other related cleanups:
- TeamDebugInfo now inherits BReferenceable directly, rather than relying on
indirectly inheriting it from TeamTypeInformation.
- Remove BReferenceable from TeamTypeInformation. The latter is only an
interface anyways, and inheriting that base class from multiple locations
was causing GCC5 trouble when resolving BReference<TeamDebugInfo>, even
when virtual inheritance was used.


# fce4895d 29-May-2016 Rene Gollent <rene@gollent.com>

Debugger: Split into core library and application.

- Add subfolder src/kits/debugger which contains the debugger's core
functionality and lower layers. Correspondingly add headers/private/debugger
for shared headers to be used by clients such as the Debugger application
and eventual remote_debug_server. Adjust various files to account for
differences as a result of the split and moves.
- Add libdebugger.so to minimal Jamfile.