History log of /haiku/src/apps/debugger/Jamfile
Revision Date Author Comments
# ff3b6fb7 25-Apr-2024 Máximo Castañeda <antiswen@yahoo.es>

Remove unnecessary dependencies on localestub

Introduced in hrev57710, they are the remnants of a previous version of
the change, not needed with the final one.

Change-Id: I03dbb86fd8963897dfed7bd77772e4ac97a8e739


# 28b96e10 21-Apr-2024 Máximo Castañeda <antiswen@yahoo.es>

IK, libshared: fix string formatting of size and rate

- Out of bounds index for values that would use a bigger unit than
available.
- Jumping from bytes to MiB, without using KiB despite being better.
- Wrong catalog key for base units.
- BSizeColumn showing incorrect values for sizes less than 1 MiB.
- Extraction of catalog messages for BSizeColumn.

Fixes: #18892
Change-Id: Ib36a30a29b425654ab569537b11c8c56093ddc2e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7626
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 94457ade 29-Apr-2023 PulkoMandy <pulkomandy@pulkomandy.tk>

Debugger: add a "don't ask again" checkbox to alerts

This allows, for example, to skip all the "get debug info" alerts when
starting a debug session. But it is a generic implementation and will
work for all "question" alerts in Debugger.

For now, the user choices are not saved, this could be done, but then we
need a way to access that setting later.

Fixes #14601

Change-Id: Icc49d1b5bc4168d15d7f740d422f464e996f7c9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6398
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 44daad61 12-Apr-2023 Zardshard <0azrune6@zard.anonaddy.com>

Debugger: improve command help text

Improve the help text of the db, dw, ds, dl, and string commands.

This is accomplished by
* Splitting CliDumpMemoryCommand into CliDumpMemoryCommand and
CliDumpStringCommand
* Moving code shared between the two into CliContext
* Removing functions in CliContext that were replaced by this movement
* Allowing customizing the help text for CliDumpMemoryCommand for each
command it represents
* Changing the help text for CliDumpStringCommand

Change-Id: If4f9e0c20f00f3e3d6c6769216fabb3160aea0a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6332
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 49506076 19-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

Add a features.h to auto enable _DEFAULT_SOURCE

Unless __STRICT_ANSI__ is defined (as it is when running the compiler in
--std=c89 or --std=c99, but not when running it without any specific
args), we can enable these by default and behave like most other
systems. I don't know why no one has done this yet despite suggesting it
multiple times and people prefer to #define _BSD_SOURCE manually
everywhere.

Remove all places in our Jamfiles and sources where it had been defined.
_DEFAULT_SOURCE is now enabled by default for all sources of Haiku, since we
let the compiler use GNU extensions (no strict C standard specified on
command line)

Use _DEFAULT_SOURCE as the define name to match current versions of
glibc. Enable it if _BSD_SOURCE is #defined in compiler flags, for
backward compatibility.

Change-Id: I6db04da5f6db437723cdfba3478f5094a69d7727
Reviewed-on: https://review.haiku-os.org/c/1633
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 77007502 18-Jan-2018 Rene Gollent <rene@gollent.com>

Debugger: Rework type handlers to allow for custom selection.

TypeHandler:
- Add name field for presentation purposes. Adapt subclasses accordingly.

TypeHandlerRoster:
- Add methods to count and retrieve all type handlers for a given type,
and adjust CreateValueNode to allow for passing in an explicit handler.
Adjust callers accordingly.

VariablesViewState:
- Add helpers to store an explicitly chosen type handler for a node.

TypeHandlerMenuItem:
- ActionMenuItem subclass that takes care of reference management
for its contained type handler.

VariablesView:
- Add context menu for choosing type handlers if applicable. Implement
support for invoking said type handlers in a similar manner to explicit
typecasts.
- Adjust saving/restoring the view state so that hidden nodes are taken
into account as well. This is necessary since it may be the case that
the handler had to be applied to the hidden child rather than the visible
node (i.e. the BMessage handler when applied to a pointer to a BMessage).

All together, these changes allow choosing to switch between views of a type
when the Debugger has multiple handlers for it. For example, for BMessages
this allows switching between displaying the raw underlying structure vs
the decoded message content.


# eede6646 04-Dec-2016 Rene Gollent <rene@gollent.com>

Debugger: Add connection config handler framework.

ConnectionConfigHandler:
- Abstract base class for the different types of connection that allows one to
retrieve an appropriate configuration view based on the target host interface
type. This will allow the configuration window to switch dynamically between
network, USB, etc. without having to know the details of any of those.
Initially only a network subclass has been implemented though.

ConnectionConfigHandlerRoster:
- Keeps track of the list of available config handlers, and handles mapping a
request for a given interface info to the appropriate type of handler.

ConnectionConfigView:
- Abstract base class for the actual configuration views returned by the config
handlers. This exposes a listener interface via which the view can notify
an interested party that the configuration has been changed. Correspondingly,
the configuration window will use this to determine if the configuration is
complete enough to allow a connection attempt.


# c521fed0 01-Dec-2016 Rene Gollent <rene@gollent.com>

Debugger: Add connection configuration window.

ConnectionConfigWindow:
- Utility window that is spawned in response to requests to create a new
remote host connection. Allows setting up and attempting to make a
connection.


# 9968f343 05-Jun-2016 Rene Gollent <rene@gollent.com>

Debugger: Adjust header order.

- Ensure that the debugger lib's headers are included before those of libshared
to minimize conflicts between the respective Thread classes. Fixes gcc2 build.

Thanks to Jerome for reporting.


# 3ef3dbce 04-Jun-2016 Rene Gollent <rene@gollent.com>

Debugger: Fix Jamfile typo.


# 1fd3e078 04-Jun-2016 Rene Gollent <rene@gollent.com>

Debugger: Fix build.

- Accidentally removed necessary header dependencies during refactoring.


# 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.


# e6687e8f 28-May-2016 Rene Gollent <rene@gollent.com>

Debugger: Add dedicated functions for global {un}init.

- Add new source file DebuggerGlobals, which contains the relevant
functions for initializing/destroying the various singleton rosters
that the core subsystems rely upon. It is the app's responsibility
to ensure these are called before anything else, and as final cleanup
at exit.
- The GUI/CLI app objects now take care of initializing the settings factory
and ValueHandlerRoster, as those are entirely app-specific.
- Refactor calls to init functions appropriately.


# 5c8ba745 25-May-2016 Rene Gollent <rene@gollent.com>

Debugger: Refactor SettingsManager.

- SettingsManager is now a pure virtual interface. The debugger core provides
a no-op implementation of it which is used by default if no explicit manager
is provided by the client requesting a new TeamDebugger. This allows consumers
of the debugger core that have no need for settings persistence such as the
report generator to not have to care about that particular detail at all.
- Add subclass DebuggerSettingsManager which is essentially the previous
existing implementation. This one will go with the application portion
of the Debugger once the separation of app and lib has been completed.
Adjust callers accordingly.


# 20df96b0 22-May-2016 Rene Gollent <rene@gollent.com>

Debugger: Relocate value_handlers.

- As they are currently only used by the VariablesView, move ValueHandler
and related code into user_interface/gui.


# ec60909a 22-May-2016 Rene Gollent <rene@gollent.com>

Debugger: Reorganize settings classes.

- Refactor TeamUiSettingsFactory into an abstract base class with implementing
subclass DebuggerUiSettingsFactory.
- Adjust SettingsManager to expect the UiSettingsFactory to be passed in as an
initialization parameter, and refactor accordingly.
- Move GuiTeamUiSettings.* into a user_interface/gui subfolder.

No functional change, simply reorganization towards splitting the debugger's
core functionality into a separate library from the application to aid in
sharing with remote_debug_server.


# fc76f5a8 29-Apr-2016 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Support for reading symbols from core file images

* New class ElfSymbolLookup. Given a data source, the address of a
symbol table, symbol hash table, string table, and a few more details
it provides access to the symbol information.
* CoreFile: Add CreateSymbolLookup(). Creates an ElfSymbolLookup for a
specified image.
* CoreFileDebuggerInterface: Implement GetSymbolInfos() for regular
images (no commpage yet) via the new functionality.


# e2d845a4 26-Apr-2016 Rene Gollent <rene@gollent.com>

Debugger: Implement remainder of #12729.

UserInterfaceListener:
- Add request hook for writing a core file. Implement in TeamDebugger.

Jobs/WriteCoreFileJob:
- Add new job to actually dispatch the core file request via the debugger
interface.

Team{::Listener}
- Add listener event + hook for notifications when a core file gets written.
Implement in CLI.

CliContext:
- Add event flag for core file changed.

CommandLineUserInterface:
- Add 'write-core' command. This optionally takes a path to write the core to,
otherwise one is automatically generated by, similarly to debug reports. As
such, one can now generate cores for things like app_server and registrar
crashes if desired, in addition to reports.


# 1a899ed4 24-Apr-2016 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Beginning of core file support

* DebuggerInterface: Add method IsPostMortem() to be able to
descriminate between live and post mortem debugging.
* Add DebuggerInterface implementation CoreFileDebuggerInterface which
provides information from a core file.
* TeamDebugger: Don't start the debug event thread when debugging post
mortem.
* Debugger: New command line variant "Debugger --core <file path>",
which starts a team debugger using the core file.

There are a few issues:
* I didn't see an easy way to integrate with the new
TargetHostInterface framework and I didn't want to get into Rene's
way changing stuff. As a side effect core file debug windows are not
counted and Debugger will quit when only those are left, respectively
will additionally open a teams window on start-up.
* There aren't any symbols yet. We can't use the debug kit
functionality, since it isn't bitness/endianess agnostic. So either
it needs to be adjusted or ported over to Debugger.


# 86fe52b6 24-Apr-2016 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Add class CoreFile

Reads data from Haiku specific core files.


# d9e4b4ce 06-Apr-2016 Rene Gollent <rene@gollent.com>

Debugger: Add initial version of TargetHostInterfaceRoster.

TargetHostInterfaceRoster:
- Provides a singleton interface to enumerate both the available interface
types, and all currently running instances. This will provide clients like
the TeamsWindow with a way to present the user with all available types,
as well as the necessary information to configure/instantiate them.

TargetHostInterfaceInfo:
- Provides an information object for each available type of interface,
including an optional description of the settings needed to configure it.
Callers can then use this to provide a configuration UI as needed, and
once complete, request a corresponding interface instance for the desired
configuration.

{Local}TargetHostInterface:
- Add Settings parameter to Init(). Adjust LocalTargetHostInterface
accordingly.

LocalTargetHostInterfaceInfo:
- Implementation of TargetHostInterfaceInfo for the local system case.


# c6897b28 02-Apr-2016 Rene Gollent <rene@gollent.com>

Debugger: Start implementing host interface.

- Add new model class TargetHost for host-specific information such as
the running team list.
- Add new interface class TargetHostInterface and implementing subclass
LocalTargetHostInterface. Not yet complete/usable due to some as of yet
unresolved issues with the involved system APIs.


# 2e705811 29-Mar-2016 Rene Gollent <rene@gollent.com>

Debugger: DebuggerInterface refactor.

DebuggerInterface:
- Refactor into abstract base class.
- Introduce interface configuration abstract base class.
- Move existing implementation into LocalDebuggerInterface and add
corresponding configuration class.

Debugger:
- Adjust to instantiate LocalDebuggerInterface.

In and of itself no functional change, but paves the way for further
refactoring to make the debugger fully interface-agnostic (this isn't yet
the case for retrieving target system information such as the team listing,
and creating/attaching to teams).


# 8028ede7 15-Jan-2016 Rene Gollent <rene@gollent.com>

Build: Add architecture rule for libshared.a.

- As suggested by Ingo, add libshared.a to the architecture name map.
This allows it to be linked by its short name like other frequently
used libraries.
- Adjust all Jamfiles referencing the lib accordingly.


# 94acd925 01-Aug-2015 Rene Gollent <rene@gollent.com>

Debugger: Add dedicated expression evaluation window.
- Rather than dropping one-off expression evaluation results into the
current team's variables view, they will now be handled in a dedicated
window, which also allows to control the context in which the expression
is evaluated.


# 2d9d01e2 21-Aug-2015 Rene Gollent <rene@gollent.com>

Debugger: Refactor non-interactive report handling.

- Add dedicated ReportDebugger application class for the case where we're
asked to do nothing more than save a report. Also add a corresponding
UserInterface subclass whose sole purpose is to take those necessary
actions and then exit.
- When the debugger is invoked via the --save-report option, we now start
via the aforementioned report/interface rather than piggybacking on the
CLI.
- Clean up CommandLineUserInterface/CliContext to remove handling for the
report saving option.

Should hopefully resolve #12155.


# f5d564a1 24-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: Implement float value editor.

FloatValueFormatter:
- Implement parsing/validation hooks.

FloatValueHandler:
- Implement GetTableCellValueEditor() to accordingly return a
(newly implemented) TableCellFloatEditor. This allows variable
value editing for float/double variables.


# 7d25ab99 23-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: Add hook for variable value writing.

WriteValueNodeJob:
- Implement async job that creates a ValueWriter to update a variable
value on request.

UserInterfaceListener:
- Add hook for requesting that a node be updated with a new value.
Implement in TeamDebugger by scheduling a WriteValueNodeJob.


# 9b0d9757 22-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: Add variable editing utility window.

VariableEditWindow:
- Implement container window for variable value editors. While
not as ideal as initially intended, this will handle presenting value
editing to the user until more work is done on the table cell editing
aspect of things.


# 568f2008 24-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add ValueWriter support class.

- Given a value + corresponding location description, this handles
ensuring that the data ends up in the appropriate locations in the
target team.


# 7e24b659 04-Jul-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

build: Convert to external libedit build package

* Drop lib/edit and matching bsd header
* Convert Debugger to libedit build package
* Should solve problems with libedit consumers
not defining _BSD_SOURCE
* Progress on #10267


# b3f2ebf0 02-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: More work on signal configuration.

- Introduce SignalDispositionEditWindow for add/editing disposition
exceptions.

SignalsConfigView:
- Factor out helper class SignalDispositionMenu. Use accordingly in
SignalsConfigView and SignalDispositionEditWindow.
- Watch table selection changes to update button statuses appropriately.
- On add/edit request, show disposition edit window.
- Listen for disposition changes from team and react accordingly.

UiUtils:
- Add helper function to map signal defines to strings.

Together with the previous set of commits, this implements #9720.


# b66f61af 28-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add config view for signals.

SignalsConfigView:
- Provide basic configuration for signal dispositions.

TeamSettingsWindow:
- Add signals view to tab list.


# 10b96226 27-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Layout changes to team settings window.

TeamSettingsWindow:
- Split out functionality into separate views for images and exceptions,
which in turn are held in dedicated tabs.


# c3c2ab31 27-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Code reorganization, no functional change.

- Rename BreakConditionConfigWindow to TeamSettingsWindow,
and move to own dedicated subfolder. Adjust callers accordingly.
Preparation work for other changes to come.


# 86a5bc31 29-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add persistent settings classes for signal dispositions.

- Add class TeamSignalSettings for storing signal disposition settings,
and add instance to TeamSettings.
- Adjust TeamDebugger to load signal settings.


# 17cbae24 26-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add SignalInfo model class.

- Represents information about a signal being delivered to the team.


# 026596dd 06-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add table cell editors for various value types.

TableCell{Bool,Enumeration}Editor:
- OptionPopUp-derived editors for their respective value types.

TableCellIntegerEditor:
- TextControl-derived editor for integer values that validates inputs
based on the target integer size and type.

Not actually used yet, but together with the previous changes, these lay
the groundwork for the remaining part of #9708.


# a8249955 03-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add interface subclasses for table cell editors.

TableCellTextControlEditor:
- Serves as a base for editors that expose their functionality via a
text control. Handles common functionality of watching for changes,
validating input, and notifying listeners appropriately.
TableCellOptionPopUpEditor:
- Serves as a base class for editors where the set of possible values
is fixed and known up front. Handles reacting to selection changes
and notifying listeners.


# 5f5499b4 06-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Refactor + resolve TODO.

- Introduce interface class ValueFormatter. This one takes on the
responsibilities of formatting a value into a string, which were
previously embedded within the various TableCellValueRenderer
subclasses.
- Add implementing subclasses for the various value types.
- Introduce TableCellValueRenderer subclass TableCellFormattedValueRenderer.
This is a simple TableCellValueRenderer implementation for the simple case
of a renderer that does nothing more than use a formatter to present a
string version of its corresponding Value. Since this describes all existing
renderers, this renders them obsolete.
- Refactor the respective ValueHandler subclasses to make use of the formatters
and new rendererer subclass.


# 7589a9af 31-May-2015 Rene Gollent <rene@gollent.com>

Debugger: Extend value handler interface.

- Add new interface class TableCellValueEditor, which provides a controller
for handling editing of table cell values, and corresponding listener
notifications.

ValueHandler:
- Add new hook for requesting such an editor, given a corresponding
value.


# 68e78ff8 23-May-2015 Rene Gollent <rene@gollent.com>

Debugger: Add memory write support.

- Implements various support classes and functions that will be
needed in order to marshal requests to write to memory in the
target team.


# 091a80ae 15-Apr-2015 Adrien Destugues <pulkomandy@gmail.com>

Protect all BSD extensions with _BSD_SOURCE

* Do not define the symbols by default, as they are not in the default
libraries.
* Adjust jamfiles of all code using BSD extensions to define
_BSD_SOURCE.
* This makes Haiku slightly more compliant to standard C/POSIX.


# edf74e6c 26-Dec-2014 Rene Gollent <rene@gollent.com>

Debugger: Cleanups.

General:
- Move all smaller prompt/edit windows to a dedicated subfolder.

Debugger/TeamsWindow/StartTeamWindow:
- Move management of StartTeamWindow to application, rather than
Teams window.

TeamWindow:
- Add top level menu item for commands that aren't specific to the
current team. This currently consists of requesting that the
Teams window be shown, and directly starting a new team.

Fixes part of #11659 (no way to start additional teams if Debugger was
initially started with a specific team).


# 9a539f9e 18-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

Outsource ncurses.


# 9dcef048 15-Dec-2014 Rene Gollent <rene@gollent.com>

Debugger: Cleanups.

Get rid of ExpressionEvaluationWindow.

- When asking to evaluate an expression via the Tools menu, we now
bring up a prompt window the same as the one used to add a watch
expression. This in turn works exactly the same as the latter,
except an additional flag is sent indicating that the expression
in question should not be persisted. As such, the results are
shown in the variables view, with all the capabilities that allows,
but also without the expression following the function as a watch
expression would.


# 172a0247 29-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Cleanup.

- Rearrange source_language subdir to have only the interface classes
at the top level, and devote a subdir to each language-specific
implementation of them.


# 46719593 26-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Minor refactoring.

- Break the expression evaluator's tokenizer out into its own separate
header so that the syntax highlighter can also make use of it.


# c04274bd 24-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Add skeleton C/C++ syntax highlighter classes.


# d431ff41 24-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Cleanups/adjustments to syntax interfaces.

- Add missing public keyword for SyntaxHighlightSource/SyntaxHighlightInfo.
- Add initial set of basic syntax highlight types.
- Remove SyntaxHighlightSource. Instead, add a general purpose LineDataSource
interface to the model classes. Correspondingly adjust SourceCode to inherit
from it and fixup its derivatives accordingly; also adjust SyntaxHighlighter
to take a LineDataSource rather than a SyntaxHighlightSource.


# 81c848a1 14-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Rework expression parsing API.

ExpressionInfo:
- No longer stores an explicit result type (this is inferred from
evaluation of the expression itself now).
- Introduce class ExpressionResult for returning the result of an
expression computation. This can currently take the form of either
a primitive value, or a value node object.
- Adjust UserInterfaceListener and ExpressionInfo::Listener to take
the above changes into account, and correspondingly adjust all
callers/listeners.

CLanguageExpressionEvaluator:
- Introduce child class Operand. This subsumes the functionality that
was previously in the separate Number class, and can represent a
primitive value, a value node or a type. Also has functionality to
implicity handle type promotion/inferring when performing calculations
between operands.
- Adjust expression parser to operate in terms of Operands rather than
Numbers. This allows a number of improvements, most notably that an
expression can now return a value node as a result rather than only
a primitive number. This capability isn't yet fully used, but paves
the way for future uses such as an expression that evaluates to a data
member, a global variable, or an arbitrary pointer of a particular type.
- Various cleanups/simplifications that were possible as a result of the above
changes.

ExpressionEvaluationWindow/ExpressionPromptWindow:
- Remove type menu field, since the expression API no longer uses it.

Adding/removing expressions in the VariablesView is temporarily disabled,
pending some further rework there to properly handle the new result object.


# 05d1068c 08-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Reorganization, no functional change.

- Move SyntheticPrimitiveType to model subdir, since more than just
the UI will be making use of it.


# 0b21bf10 05-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Add simple prompt window for adding expressions.

- Requests an expression + type from the user for use elsewhere.
Intended to be used by VariablesView and possibly others.


# 1904b0c9 06-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Add type subclass for artificial types.

- For expressions we need a Type object to represent their result
type. However, this doesn't need to map to an actual DwarfType,
as we won't need e.g. location and storage format information to
read it out of the target team, so instead derive a simple subclass
representing the appropriate result type.


# 1af58b2a 04-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Add expression-related model classes to build.


# 942226c7 30-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Add UI for configuring breakpoint conditions.

General:
- Add message codes for requesting breakpoint configuration.

UserInterfaceListener/TeamDebugger:
- Add/implement hooks for requesting breakpoint condition changes.

BreakpointsView:
- Add button to request editing the currently selected breakpoint's
condition.

TeamWindow:
- Handle request to show breakpoint edit window.

BreakpointEditWindow:
- Implement simple radio-based UI for modifying the current breakpoint's
condition.

Still missing: Actually handling/evaluating the breakpoint conditions in
the ThreadHandler when the breakpoint is hit.


# 2d5794a1 28-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Add asynchronous expression evaluation interface.

- Add UserInterfaceListener hook to request expression evaluation.
- Add corresponding events/handlers in Team and TeamDebugger.

These allow callers to request evaluation of expressions by the
debugger core's worker threads with asynchronous notifications of
results. While not strictly necessary right now, this paves the way
for further changes to come, as handling of variables will
potentially require resolving their values if they haven't been
already, and this shouldn't be done from user interface threads.


# 1b629877 27-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Cleanups.

- Remove dependency on MAPM/ExpressionParser. Consequently also adjust
CliDumpMemoryCommand, InspectorWindow and WatchPromptWindow to use
CLanguageExpressionEvaluator for address input evaluation.


# 1c6c5f3b 27-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Add Number class for expression usage.

- This class abstracts out the underlying type of a value, and handles
all the basic mathematical logical operators accordingly. Replaces
the MAPM type previously used for these respective operations.


# cda38afb 26-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Initial GUI for expression evaluation.

- Add a simple interface window for expression evaluation. Not yet
accessible from the team window.


# 72654b61 25-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Add initial skeleton for a C-style expression evaluator.

- Adds a stripped down version of ExpressionParser from libshared,
which will eventually be modified to support various other capabilities
needed for debug expressions. Not yet used or complete.


# 220d0402 31-Jul-2014 Oliver Tappe <zooey@hirschkaefer.de>

Use libstdc++, libsupc++ and libgcc from gcc_syslibs.

* Instead of faking libstdc++.so from libstdc++.a, use libstdc++.so
from the gcc_syslibs build feature for everything except x86_gcc2.
* Use libgcc_s.so from the gcc_syslibs build feature for everything but
x86_gcc2 (which still carries libgcc as part of libroot.so).
* Drop filtering of libgcc objects for libroot, as that is no longer
necessary since we're only using libgcc-as-single-object for libroot
with x86_gcc2, where the filtered object file doesn't exist. Should
the objects that used to be filtered cause any problems as part of
libgcc_s.so, we can always filter them as part of the gcc build.
* Use libsupc++.so from the gcc_syslibs build feature for everything but
x86_gcc2.
* Adjust all Jamfiles accordingly.
* Deactivate building of faked libstdc++.so for non-x86-gcc2. For
x86_gcc2, we still build libstdc++.so from the sources in the Haiku
source tree as part of the Haiku build .
* Put gcc_syslibs package onto the image, when needed.


# 778ef3f9 15-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Adjustments to Jamfile.

- Remove duplicate instance of libshared.
- Add linker flags to not export symbols from linked in static libraries.
Resolves an issue on gcc4 where symbols from libedit and libsolv would clash,
leading to crashes.
- Add package kit-related headers and libraries.


# 33151100 10-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Start adding the groundwork for load state handlers.

Adds abstract class ImageDebugLoadingStateHandler which simply contains two
hooks, which allow one to a) ask it if it supports a handling a particular
type of loading state, and b) if so, ask it to attempt to handle that case,
given the passed in user interface object.

Also adds implementing subclass for DwarfImageDebugInfo, currently
intended primarily to handle the case of missing external debug information.
At present, this just supports prompting the user to find/install the file,
but eventually this will be extended to also support automatically installing
the corresponding debug information package, if applicable.

Finally, adds ImageDebugLoadingStateHandlerRoster, which acts as a front end
for matching up a given loading state with the appropriate handler.


# a2627680 08-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Add classes for representing image loading state.

Adds a hierarchy of classes for preserving the loading state information for
a LoadImageDebugInfoJob. These include:
- ImageDebugInfoLoadingState:
Top level class that simply stores a reference for the specific info
state that we're currently attempting to load.

- SpecificImageDebugInfoLoadingState:
Abstract base class representing state information specific to a
particular kind of debug information.

- DwarfImageDebugInfoLoadingState:
Implementation of the above for the case of DWARF.

- DwarfFileLoadingState:
Encapsulates the in-progress loading state of a DWARF file for the case
where a file's debug information is referenced externally, but cannot
be found.


# af8e2aa4 16-Sep-2013 Rene Gollent <anevilyak@gmail.com>

Debugger: add settings manager for source location mappings.

- If it was necessary to help the debugger locate a particular source
file due to it not being found on disk at the location specified in
the debug information, the associated user-supplied path mappings
are now saved and restored in the team settings. The file manager still
needs a bit of extra work to apply these as files are added though.


# b9e8ec7b 14-Sep-2013 Ithamar R. Adema <ithamar@upgrade-android.com>

debugger/debuganalyzer: Remove the explicit -Werror from Jamfile

Specifying -Werror in the Jamfiles directly prevents the build
system from disabling error-on-warning for some arch specific
warnings (or even globally), breaking the ARM build.

The "src/apps" directory is already setup to compile with -Werror
by the build system anyway, so remove the explicit setting here.


# b9b12613 16-Sep-2013 Rene Gollent <anevilyak@gmail.com>

Debugger: add settings manager for source location mappings.

- If it was necessary to help the debugger locate a particular source
file due to it not being found on disk at the location specified in
the debug information, the associated user-supplied path mappings
are now saved and restored in the team settings. The file manager still
needs a bit of extra work to apply these as files are added though.


# 20d9063c 14-Sep-2013 Ithamar R. Adema <ithamar@upgrade-android.com>

debugger/debuganalyzer: Remove the explicit -Werror from Jamfile

Specifying -Werror in the Jamfiles directly prevents the build
system from disabling error-on-warning for some arch specific
warnings (or even globally), breaking the ARM build.

The "src/apps" directory is already setup to compile with -Werror
by the build system anyway, so remove the explicit setting here.


# 44646df4 04-Aug-2013 Rene Gollent <anevilyak@gmail.com>

Debugger: Move CLI commands into their own subdir.


# b0944c78 01-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

More work towards hybrid support

* All packaging architecture dependent variables do now have a
respective suffix and are set up for each configured packaging
architecture, save for the kernel and boot loader variables, which
are still only set up for the primary architecture.
For convenience TARGET_PACKAGING_ARCH, TARGET_ARCH, TARGET_LIBSUPC++,
and TARGET_LIBSTDC++ are set to the respective values for the primary
packaging architecture by default.
* Introduce a set of MultiArch* rules to help with building targets for
multiple packaging architectures. Generally the respective targets are
(additionally) gristed with the packaging architecture. For libraries
the additional grist is usually omitted for the primary architecture
(e.g. libroot.so and <x86>libroot.so for x86_gcc2/x86 hybrid), so that
Jamfiles for targets built only for the primary architecture don't
need to be changed.
* Add multi-arch build support for all targets needed for the stage 1
cross devel package as well as for libbe (untested).


# ef2d649d 05-Jul-2013 Rene Gollent <anevilyak@gmail.com>

ExceptionConfigWindow -> BreakConditionConfigWindow.

Stop on image load removed from BreakpointsView, pending adding it to
BreakConditionConfigWindow with some additional options.


# b8b4219f 27-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Implement #9758.

- Add ConsoleOutputView for showing the debugged team's console output.
The view presents checkboxes for controlling whether or not stdout
and/or stderr output is captured and shown, as well as the
ability to clear the current output.


# fe448830 27-Jun-2013 Rene Gollent <anevilyak@gmail.com>

TeamDebugger: Implement post syscall event handling.

We now watch for file write syscalls in the target team. If they
constitute a write to either stdout or stderr, we attempt to capture the
output, and notify interested listeners accordingly.


# d08227bb 26-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Add SyscallInfoEvent model class.


# 55fc8da1 13-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Initial implementation of exception configuration window.

Doesn't actually take any actions yet, just presents a UI.


# 3bbef9dd 21-Apr-2013 Siarzhuk Zharski <zharik@gmx.li>

Discard Termcap and switch console apps to use Terminfo

* Switch bash, debugger, less, telnet[d] and top apps to use termcap
functionality provided by ncurses lib instead of GNU libtermcap.so;
* NetBSD version of tput utility replaced with ncurses' one. Fixes #9606;
* terminfo database is provided as mandatory package installed during
building target system;
* Remove libtermcap module. The termcap database source and
corresponding build rules are not removed to provide backward compatibility -
until all optional packages will be rebuild on upcoming system version
using terminfo. Note that gcc2 builds may require to provide termcap a bit
longer in the sake of binary compatibility with R5 era apps.


# 1953ec9d 03-May-2013 Rene Gollent <anevilyak@gmail.com>

Add UI window for starting a new team.


# 8a9423ee 27-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Add RangeList utility class.

- Tracks a set of ranges. Implicitly deals with collapsing overlapping
ranges as they're added.


# aecef63c 25-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Add team information model class.


# 2298b5fc 12-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Resolve TODO.

- Added GetSystemInfo() to DebuggerInterface. Use that from
DebugReportGenerator instead of calling get_system_info()/utsname()
directly since otherwise we'd get the information for the wrong system
in the eventual case when we have remote debugging support.


# dcbc00c3 05-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Add model classes for representing semaphore information.


# a5e54e1b 04-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Add model classes for representing area information.


# 76ed6d72 27-Mar-2013 Rene Gollent <anevilyak@gmail.com>

Refactoring to handle multiple return values.

- Replace use of address + CpuState pair in Thread,
SpecificImageDebugInfo::CreateStackTrace() with a ReturnValueInfoList.
Adjust all implementing subclasses and callers accordingly.

- DwarfImageDebugInfo::CreateReturnValue() -> CreateReturnValues().
Now processes a list of return value information structures rather
than just a single one. This means we can now handle multiple return
values in a single statement. This still isn't entirely correct though,
since, e.g. for functions whose return types fit in a register we need
to either retrieve them immediately after function return, or store the
CPU state at that point in time for later use in value retrieval,
otherwise the return values will all be those of the last called function.


# 9ede3c06 28-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Add ReturnValueID base type.


# c8d82cf6 19-Dec-2012 Alex Smith <alex@alex-smith.me.uk>

Started adding x86_64 support to Debugger.

Stack tracing doesn't work yet, nor does single stepping (somehow
manages to completely freeze the system).


# ec7c59ca 18-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Add memory dumping commands similar to those in KDL.


# 596922bb 17-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Add CLI print variable command.


# 287cda6f 16-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Add some more commands to the CLI.

- Added 'frame' command for setting/printing the context's current stack
frame within the active stack trace.
- Added 'variables' command for printing the list of variables visible
within the current frame.


# c1034c63 07-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Pull a ValueNodeManager class out of VariableTableModel.

- The intention is to have a class which handles the actual management
of the variable node graph, creating child nodes and such. This way
the GUI, CLI and report generator don't have to each reimplement
these low-level parts and can instead concentrate on their relevant
representations thereof.


# fad00fb0 02-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Add type handler and corresponding value node for BList.

- When a debugging libbe is present, and a BList is encountered,
we now read its internal structure and expose it as if it were an
array of pointers. Combined with typecasting, this means one can
now easily inspect the content of such a list.


# bb7d146c 22-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Add CLI command for saving debug reports.


# 11e51948 17-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Add initial version of DebugReportGenerator controller class.

Not yet complete or made use of.


# 4549786b 07-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Code reorganization.


# 0ba9bff2 07-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Revert preservation of watchpoints in settings.


# 2a2e3baf 06-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Add UI hooks for watchpoints.

This gets basic watchpoint support working. Right clicking on a variable
and picking Watch now opens a prompt with the inferred address, size
and watch type for the user to adjust.

Still needs some work to get them to show/be modifiable in the breakpoints
tab and to get them to respect architectural restrictions (i.e. on x86 we
can realistically only do 2 hardware watchpoints and those are restricted
to write watch), at least until we support software emulated watchpoints.


# 4235cb3e 06-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Start adding the underlying infrastructure for watchpoint support.


# 9b008d31 04-Aug-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger CLI: Add a bunch of new commands

* "thread": prints/sets the current thread.
* "continue", "stop": continue/stop the current thread.
* "sc"/"bt": Print a stack trace for the current thread. Very basic yet.


# aacf2782 24-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Switch from readline to libedit


# f4b1ddb5 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Coding style: normalize naming, some whitespace fixes

* TeamUISettings[Factory] -> TeamUiSettings[Factory]
* GUITeamUISettings -> GuiTeamUiSettings
* GUISettingsUtils -> GuiSettingsUtils


# 48b4d204 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger CLI: Add "threads" command

It just lists the team's thread.


# 533a7376 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Create UiUtils helper class

Currently only a method to get a description for a thread state lives
there (code pulled from ThreadListView).


# a6de32b0 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger CLI: Pull QuitCommand out of CommandLineUserInterface


# d0ef7540 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger CLI: Start to imbue CliContext with life


# abbcb2ca 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Use readline in the CLI

This is a bit hacky, since gdb's readline is used. It would probably be
best to prepare an optional build package.


# 6d60b554 20-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Some basic work to get the CLI going

There's an input loop thread which reads and parses command lines and
the infrastructure for registering and executing commands. Currently
only "help" and "quit" commands are implemented.


# 82931998 15-Jul-2012 Rene Gollent <anevilyak@gmail.com>

Add definition for a general-purpose action menu item.


# 79dbafbc 19-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Add GUI archiving utility functions to build.


# 20616c59 03-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Add stubs for the eventual command line interface.



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


# 76ce2c7e 01-Nov-2011 Rene Gollent <anevilyak@gmail.com>

More work-in-progress towards getting settings saved/restored.



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


# 0d3e3475 31-Oct-2011 Rene Gollent <anevilyak@gmail.com>

WIP: Add abstract base class TeamUISettings and corresponding subclass GUITeamUISettings.
Once complete, these will be used to store/restore settings for the debugger's various UI
components.



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


# 698ad097 30-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Add interface TeamTypeInformation and implement in TeamDebugInfo. Pass along
to various classes that need a reference to it in order to allow value nodes
to look up type information from the target team.



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


# 185d2cdc 30-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Add model class TypeLookupConstraints.
* Create and pass constraints to type lookup requests to ensure
that the type we get back is in fact the one we wanted, and not
a different one that happened to have a similar name.

Resolves ticket #5495.



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


# ff22dfe8 22-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Should have been part of previous commit.



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


# 04584c0d 21-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Add the beginnings of a BMessage type/value handler. Not yet registered with
the type handler roster since it's quite far from being complete.



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


# 62e1d169 12-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* TeamMemoryBlock: Now stores whether or not the block it represents is writable.
* RetrieveMemoryBlockJob: Make use of get_memory_properties() to retrieve the
block's protection bits and mark it appropriately.



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


# 3e3ce16f 09-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Introduce TeamMemoryBlock[Manager]. These provide an interface to raw memory
page data of the target team.
* Jobs: Add RetrieveMemoryBlockJob which performs a background read of the
target team's memory. Used by InspectRequested() to perform the actual work.
* TeamDebugger: Added InspectRequested() hooks to allow clients to ask for
a memory read to be performed.
* Introduce InspectorWindow and MemoryView to form the basis of a memory inspector.
As yet these are more or less stubs and not yet hooked in.



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


# 87d85ea3 11-Dec-2010 Rene Gollent <anevilyak@gmail.com>

- Refactor setting up the default register rules to happen in the Architecture
class in order to allow us to set up architecture specific default rules
for registers that aren't explicitly set by the CFI program.
- Set up default rule for EIP on x86.
- Theoretically set up a default rule for the stack pointer. Disabled for the
time being though until I determine why that rule's not yielding the expected
values for ESP in anything other than the top frame, though the other location
offset rules work as expected.



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


# 716f06ce 08-Nov-2010 Rene Gollent <anevilyak@gmail.com>

Added type/value handlers for C strings. This allow's the debugger's
variable view to actually render their contents rather than simply giving
the string's address.



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


# 5a13e7b0 03-Nov-2010 Rene Gollent <anevilyak@gmail.com>

Add a means for the user to locate source files if they are not found
at the location specified in the debug info.



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


# ccb01bef 21-Sep-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Finally integrates running_teams_window stuff to the Debugger app:
* Rework Debugger class a bit to ease integration
* Expand TeamDebugger::Listener interface to notify start event too.
* Former RunningTeamsWindow, now name TeamsWindow, is shown at start
if no team/program to launch is specified.
* Double-clicking a team item in this list starts a new Team debugger, or
reactivate the existing one if any

This window settings is not yet integrated with the SettingsManager.
Will comes next.
I plan to add some UI controls to this Teams window to allow user to setup
a program arguments and environment variables and then launch & debug it.



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


# 59ea286f 05-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* EnumerationValue -> EnumeratorValue
* Since some types don't have names (e.g. pointer types or anonymous structs or
unions), each type does now also have a unique ID. The global type cache
registers types by ID and by name (if they have one). This fixes clashes of
types with empty names.
* Completely refactored the code dealing with variable values. Formerly we had
Variable and TypeComponentPath to navigate to a component, mapped to a
BVariant representing the value. Now we have:
* Interface Value with various subclasses (BoolValue, IntegerValue, etc.) to
represent a value, with the flexibility for more esoteric values.
* A tree of ValueNode+ValueNodeChild objects to represent the components of a
variable. On top of each ValueNodeChild sits a ValueNode representing the
value of the component, potentially having ValueNodeChild children. This
should allow casting a component value, simply by replacing its ValueNode.
* Interface ValueHandler and various implementations for the different value
types. It is basically a factory for classes allowing to format/display a
value.
* ValueHandlerRoster -- a registry for ValueHandlers, finding the best one
for a given value.
* Interface TypeHandler and various implementions for the different type
kinds (primitive, compound, address, etc.). It is basically a factory for
ValueNodes for that type.
* TypeHandlerRoster -- a registry for TypeHandlers, finding the best one
for a given type.

That's still a bit work in progress. It introduces at least one regression:
The VariablesView doesn't save/restore its state anymore. Will take a while
until that is added back.



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


# e3a631c0 15-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced interface UserInterface, which abstracts the user interface code.
* Added implementation GraphicalUserInterface for the current GUI.

TeamDebugger does no longer know about TeamWindow.



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


# 0fc8a75c 13-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved TargetAddressTableColumn into own source file in gui/util.
* Fixed misspelled MSG_*_BREAKPONT constants.
* model/Team: Added separate event class UserBreakpointEvent for user
breakpoints.
* SourceView::MarkerManager: Invalidate the markers when new source code is
set.
* Added breakpoints view.


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


# e8e4e613 10-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

The variables view does now save/restore part of its state when the stack
frame changes. Currently that's only the expanded/collapsed state of the
items in the tree view, but that already makes single stepping through code
much less annoying.


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


# d054be0d 09-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the data location resolution methods from StackFrameDebugInfo to the
respective Type classes. StackFrameDebugInfo is pretty much out of work now,
but maybe something comes up later.
* Renamed GlobalTypeLookupContext to GlobalTypeCache and renamed its methods.
* A TeamDebugInfo does now have a GlobalTypeCache which is used for resolving
types. Formerly it was created per stack frame, so all types had to be
resolved after each single step. Single-stepping is usably fast again.
The disadvantage is that DWARF theoretically allows types properties to
depend on instruction/frame/frame base pointer and we don't support that
anymore. I can't think of a reasonable application for that feature, though.
* Refactored DwarfStackFrameDebugInfo:
- Moved the type classes into new DwarfTypes.{h,cpp}.
- Moved the creation of types into new class DwarfTypeFactory.
- Added class DwarfTypeContext which bundles all the dependencies of the type
classes.
* Made DwarfFile a BReferenceable.


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


# 71f75cdc 06-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* WIP regarding non comilation unit local types:
- Introduced GlobalTypeLookup interface and GlobalTypeLookupContext to look
up types by name and cache them.
- TeamDebugInfo implementes GlobalTypeLookup iterating through all
ImageDebugInfos, which in turn iterate through all SpecificImageDebugInfos.
- DwarfImageDebugInfo iterates through all compilation units, using
a temporary DwarfStackFrameDebugInfo to create the type.
- DwarfStackFrameDebugInfo no longer caches the types itself, but uses
GlobalTypeLookupContext. It uses GlobalTypeLookup to look up types not
defined in the compilation unit.
- DwarfFile: Made expression evaluation more robust, so that it also works,
when no subroutine entry, frame pointer, and instruction pointer are
available (and not used by the expression).
Basically works already, although the wrong compilation unit might be used
when resolving values for global types. It's also horribly slow, when there
are many types in the stack frame.
* DwarfStackFrameDebugInfo::ResolveArrayElementLocation(): The element location
piece size was set incorrectly (multiplied by 8, although bytes were
expected).



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


# 4fc4757d 01-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added ArrayIndexPath, a small class storing a index list for identifying an
element in a multi-dimensional array, featuring conversion from and to string.


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


# 6e72ebfc 20-Sep-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* More work on retrieving local variable values. Address and compound types can
now be inspected. Still work in progress -- bit fields and arrays don't work
correctly yet nor does type lookup beyond the current compilation unit.
* Made most of the debugger output configurable via a config header. By default
it's much less noisy now.


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


# 2bf55b39 23-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made FunctionID abstract. There are now two implementing subclasses,
SourceFunctionID (where we know the souce location of the function) and
ImageFunctionID (where we don't know the source location). Made the
classes archivable.
* Added support to find functions by ID.
* Improved user breakpoint handling. We can now "install" a breakpoint before we
even know the function instances in which to install it. Whenever image debug
information become available, breakpoints are installed in the concerned
function instances of the respective image.
* Always trigger loading image debug info as soon as we become aware of an
image.
* Implemented a settings management mechanism. ATM only the breakpoint
locations for debugged teams are persisted. This seriously improves the
debugging fun, though. :-)


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


# a5e1e7ce 22-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Refactoring: Moved TeamDebugModel functionality into Team and got rid of the
former.


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


# da4d62db 18-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Worker:
- Made Job Referenceable.
- Turned JobKey into an abstract base class to add flexibility. The new
SimpleJobKey is a subclass with the former functionality.
* TeamWindow: Removed the TeamWindow* parameter from the listener hooks. The
TeamDebugger knows anyway.
* Added IDs to Variable, Function, and FunctionInstance. The latter two generate
the ID on the fly, Variable stores it.
* SpecificImageDebugInfo::CreateFrame(): Changed FunctionDebugInfo* debug
parameter to FunctionInstance* to provide more info (the function ID).
* DwarfInterfaceFactory/DwarfImageDebugInfo:
- Added class DwarfFunctionParameterID, an ID class implementation for
function parameters and set the IDs on the parameter objects.
- Retrieve the size of a type (i.e. the size of its objects) and store it in
DwarfType.
- If a parameter's ValueLocation doesn't have a size, set that of the
respective type.
- Map the register indicies in the parameters' ValueLocations from DWARF to
our indices.
* Added class TypeComponentPath for identifying subcomponents in types.
* Added class StackFrameValues, a container associating variables and their
subcomponents with values.
* StackFrame does now have a StackFrameValues object for parameters and local
variables and a mechanism to notify listeners when values have been retrieved.
* Added GetStackFrameValueJob to retrieve variable values. Lots of functionality
is missing yet. Most notably it doesn't retrieves values for subcomponents.
* Wired everything to trigger loading of variable values and getting notified
when done.
* VariablesView: Added a value column. This is all very basic and has to be
done differently, but at least values for the parameters can be seen already.


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


# 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


# fd1f5093 13-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Skeleton for source language abstraction. There's SourceLanguage with several
subclasses, though they don't do much yet. SourceCode is now associated with a
SourceLanguage.


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


# 614e1dc4 13-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Register:
- Added a type constant describing the format of the register value.
- Added flag "is callee-preserved" indicating whether the ABI requires the
register to be preserved by a called function.
* CpuState: Added SetRegisterValue(), made GetRegisterValue() const.
* Added RegisterMap interface for mapping register indices between different
models.
* Architecture:
- Added CreateCpuState() version to create a clean CpuState.
- Added GetDwarfRegisterMaps(), which returns to RegisterMaps, converting
from and to DWARF register indices.
- Added ReadValueFromMemory() reading a value from the target team's memory.
The value type is specified by a type constant and the value return via a
BVariant.
- CreateStackTrace: No longer decide whether to adjust the instruction pointer
of the previous CPU state depending on who created the CPU state. Instead
compare it with the return address of the next frame. If they are equal it
obviously has to be adjusted.


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


# 3c5dbb46 01-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved Array.h to new directory "types".
* Added StringUtils with string hash functions.
* Added Locatable{Entry,File,Directory} and FileManager classes to manage the
mapping from debug info/target file names to local file names.
* Image does now have a LocatableFile referring to the image's shared object
file. Added listening to location changes of these files to TeamDebugger. No
action is taken yet (should trigger reloading the debug info).


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


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

Added DwarfTeamDebugInfo and DwarfImageDebugInfo, the classes to interface with
the DWARF code. Not doing much yet.


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


# 7a7112b3 27-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renaming and coding moving.
* Added locking to DwarfManager.


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


# 93b64845 27-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added support for loading the debug info for an image lazily and adjusted
the jobs accordingly.
* Added a view to list the source files and functions for an image.


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


# 1c6fd17f 25-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Pulled interface TeamMemory out of DebuggerInterface to make the arch and model
packages indepent of the latter.


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


# 43b0f7e0 25-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved breakpoint management into new class BreakpointManager and added
support for temporary breakpoints.
* TeamDebugger: No longer handle debug events in the listener thread. Instead
post a message to the looper thread. Makes the locking a bit easier.
* Architecture: Added virtual GetInstructionInfo() and GetStatement() returning
information on the instruction respectively a statement at a given address.
Implemented for x86.
* DebugInfo: Added virtual GetStatement() and implemented it for
DebuggerDebugInfo by means of using the Architecture.
* Implemented step over/into/out support. Works in principle, but has no
handling for PLTs yet, i.e. stepping into functions of other libraries
requires two steps ATM.


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


# 194b3b71 23-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved all handling of threads from TeamDebugger into new class ThreadHandler.
* Added new job to get the initial state of a thread.
* Now we also get the states of new threads correctly.


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


# 6381d6cc 22-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added Breakpoint class and extended TeamDebugModel to manage the objects.
Extended the event mechanism respectively.
* Added support to SourceView to display breakpoints and manipulate them.
* Extended TeamDebugger to install/uninstall breakpoints.


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


# 7367310f 21-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Virtualized SourceCode and implemented a derived class DisassembledCode, which
allows to implement StatementAtAddress() in O(log(n).
* Added SourceCode::StatementAtLine().


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


# 0bcacd22 21-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added classes to represent source code (SourceCode, Statement).
* Added x86 disassembler (via libudis86).
* Added Architecture::DisassembleCode() to disassemble a function to SourceCode.
* Added virtual DebugInfo::LoadSourceCode() to retrieve the source code for a
given function. The implementation in DebuggerDebugInfo disassembles the
function.
* Added source code info to StackFrame. Also added a listener mechanism to get
notified on source code changes.
* Added job to load the source code for a stack frame.
* Added (very basic) source code view and wired everything so that when a stack
frame is selected the source code (respectively disassembly) for the
underlying function is retrieved and shown.


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


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

Added demangling support. Only implemented for gcc 4 yet.


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


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

Moved several classes into new "model" subdir.


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


# ec1b789c 20-Jun-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

DebuggerInterface destructor wasn't virtual, raising a -Werror warning.
Fixed libdebug.so link.


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


# b7c5bd63 19-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Renamed Variant to BVariant and moved it to libshared.a.


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


# 15f040e5 19-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Some work towards getting stack traces:
* Added a virtual Architecture::CreateStackTrace() and added a basic
implementation in ArchitectureX86. Fleshed out StackTrace/StackFrame a bit
and added StackFrameX86. This needs to be organized differently, though, so
that we can get the maximum available information for each stack frame,
depending on what info is available for the respective function.
* Added job to get the stack trace for a thread.
* Added stack trace related handling in TeamDebugger. Reorganized the thread
state/CPU state/stack trace change handling a bit -- we're using a
Team::Listener now, and do things asynchronously.
* Added a StackTraceView to display the stack trace of the current thread. No
function name available yet, otherwise working fine.


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


# 495676ca 19-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented Worker class, which executes Jobs in a separate thread.
* Implemented a job for getting a thread's CPU state.
* The team debugger uses a worker now. ATM only for getting the CPU state for
stopped threads.


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


# c42fe1eb 18-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

More work on the architecture abstraction, particularly regarding information
about what registers the architecture has and how to get them from the CpuState.
Implemented the respective x86 part.


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


# a81bb42a 18-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Beginnings of the architecture abstraction.


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


# f208695c 18-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved all interaction with the kernel/debugger interface into new class
DebuggerInterface. This will simplify adding support for remote debugging
eventually.


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


# ae53f490 17-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changed the layout of the team window. Trying a single window approach.
* Added Run/Step* buttons.
* Added some handling for selection in the thread list.
* Extended listener mechanisms all over the place (in models and views).
* The team debugger now gets the initial states for the team's threads.


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


# 42f07f3f 17-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added ImageListView showing the list of images. It will probably eventually
become a tree view, showing the source files as subitems of the images.
* Added the image list to the team window and changed the layout more towards
what it's intended to look like.


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


# b1588386 17-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Init a debug context and set the team debug event flags.
* Handle the "thread/image created/deleted" events, maintaining the Team's
lists.


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


# ac8b6713 16-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added bits and pieces to the model classes (Team, Thread, Image).
* Added beginnings of the team window. Currently only showing the thread list
(not updated yet).
* Added application startup code and argument parsing.


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


# 008dd426 15-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Initial skeletons of the model (Team, Thread, Image) and the controller
(TeamDebugger) for debugging a team.


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


# 87c08599 15-Jun-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

Ooops, sorry.


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


# f06173c7 15-Jun-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

A tiny contribution to an Haiku Debugger rebirth: a Running Teams window designed similar to old' bdb one.
The skeleton 'hdb' application does nothing usefull beside, as I was trying to get fluent in team_debugger
messages.

That's pretty much all what I came with during a pathetic attempt to secure some free time to work on
a (indeed) most wanted native graphical debugger for Haiku. Building libdwarf was pending when I've realized
I wont have time ever.

Ingo, I hope you don't mind. Fee free to do whatever you want with it, remove included.



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


# 774e234b 15-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Typo.


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


# 9e8ec48b 15-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved dwarf related code into dwarf/ subdirectory.


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


# 44101b1f 13-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

The very beginnings of a debugger. Currently consisting only of the beginnings
of a DWARF 3 reader. It can read the .debug_info section and create objects for
the entries, but most attributes are ignored yet.


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


# 2d9d01e2e849737a184f83779311a04346a5be98 21-Aug-2015 Rene Gollent <rene@gollent.com>

Debugger: Refactor non-interactive report handling.

- Add dedicated ReportDebugger application class for the case where we're
asked to do nothing more than save a report. Also add a corresponding
UserInterface subclass whose sole purpose is to take those necessary
actions and then exit.
- When the debugger is invoked via the --save-report option, we now start
via the aforementioned report/interface rather than piggybacking on the
CLI.
- Clean up CommandLineUserInterface/CliContext to remove handling for the
report saving option.

Should hopefully resolve #12155.


# f5d564a1d395d830f5323669caeaac8228810648 24-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: Implement float value editor.

FloatValueFormatter:
- Implement parsing/validation hooks.

FloatValueHandler:
- Implement GetTableCellValueEditor() to accordingly return a
(newly implemented) TableCellFloatEditor. This allows variable
value editing for float/double variables.


# 7d25ab995d1578a294a7e7c9eb89fb517ae4ce9c 23-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: Add hook for variable value writing.

WriteValueNodeJob:
- Implement async job that creates a ValueWriter to update a variable
value on request.

UserInterfaceListener:
- Add hook for requesting that a node be updated with a new value.
Implement in TeamDebugger by scheduling a WriteValueNodeJob.


# 9b0d97576d41083cf9df72be49ea3c2e83683d7a 22-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: Add variable editing utility window.

VariableEditWindow:
- Implement container window for variable value editors. While
not as ideal as initially intended, this will handle presenting value
editing to the user until more work is done on the table cell editing
aspect of things.


# 568f200843b1a3261696d01ba1db8a15e50ef86b 24-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add ValueWriter support class.

- Given a value + corresponding location description, this handles
ensuring that the data ends up in the appropriate locations in the
target team.


# 7e24b659c4d8ba302e3f5e59b1a432bd60727a4c 04-Jul-2015 Alexander von Gluck IV <kallisti5@unixzen.com>

build: Convert to external libedit build package

* Drop lib/edit and matching bsd header
* Convert Debugger to libedit build package
* Should solve problems with libedit consumers
not defining _BSD_SOURCE
* Progress on #10267


# b3f2ebf008490ab0b37e7d12fb6e2702f45bcd2b 02-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: More work on signal configuration.

- Introduce SignalDispositionEditWindow for add/editing disposition
exceptions.

SignalsConfigView:
- Factor out helper class SignalDispositionMenu. Use accordingly in
SignalsConfigView and SignalDispositionEditWindow.
- Watch table selection changes to update button statuses appropriately.
- On add/edit request, show disposition edit window.
- Listen for disposition changes from team and react accordingly.

UiUtils:
- Add helper function to map signal defines to strings.

Together with the previous set of commits, this implements #9720.


# b66f61af9ba9d12a605029fe5c60d5b746be2872 28-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add config view for signals.

SignalsConfigView:
- Provide basic configuration for signal dispositions.

TeamSettingsWindow:
- Add signals view to tab list.


# 10b962261a1316c97dc6ca4c1e68e2109472d2d7 27-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Layout changes to team settings window.

TeamSettingsWindow:
- Split out functionality into separate views for images and exceptions,
which in turn are held in dedicated tabs.


# c3c2ab316943a85f189415961734382c71e24f23 27-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Code reorganization, no functional change.

- Rename BreakConditionConfigWindow to TeamSettingsWindow,
and move to own dedicated subfolder. Adjust callers accordingly.
Preparation work for other changes to come.


# 86a5bc31a50356c488339c61076d7240eff570aa 29-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add persistent settings classes for signal dispositions.

- Add class TeamSignalSettings for storing signal disposition settings,
and add instance to TeamSettings.
- Adjust TeamDebugger to load signal settings.


# 17cbae24ce6da4f3c94f8487d55641dd1720189f 26-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add SignalInfo model class.

- Represents information about a signal being delivered to the team.


# 026596dd1de1cf86deaea712130cfb6a4901b6fd 06-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add table cell editors for various value types.

TableCell{Bool,Enumeration}Editor:
- OptionPopUp-derived editors for their respective value types.

TableCellIntegerEditor:
- TextControl-derived editor for integer values that validates inputs
based on the target integer size and type.

Not actually used yet, but together with the previous changes, these lay
the groundwork for the remaining part of #9708.


# a82499551d62adc4602840e8100a3ebfe4465727 03-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Add interface subclasses for table cell editors.

TableCellTextControlEditor:
- Serves as a base for editors that expose their functionality via a
text control. Handles common functionality of watching for changes,
validating input, and notifying listeners appropriately.
TableCellOptionPopUpEditor:
- Serves as a base class for editors where the set of possible values
is fixed and known up front. Handles reacting to selection changes
and notifying listeners.


# 5f5499b40b00bc32d6f07234ee85a98d36d289a6 06-Jun-2015 Rene Gollent <rene@gollent.com>

Debugger: Refactor + resolve TODO.

- Introduce interface class ValueFormatter. This one takes on the
responsibilities of formatting a value into a string, which were
previously embedded within the various TableCellValueRenderer
subclasses.
- Add implementing subclasses for the various value types.
- Introduce TableCellValueRenderer subclass TableCellFormattedValueRenderer.
This is a simple TableCellValueRenderer implementation for the simple case
of a renderer that does nothing more than use a formatter to present a
string version of its corresponding Value. Since this describes all existing
renderers, this renders them obsolete.
- Refactor the respective ValueHandler subclasses to make use of the formatters
and new rendererer subclass.


# 7589a9affa121b24647f4dc25c06eaee26f0c757 31-May-2015 Rene Gollent <rene@gollent.com>

Debugger: Extend value handler interface.

- Add new interface class TableCellValueEditor, which provides a controller
for handling editing of table cell values, and corresponding listener
notifications.

ValueHandler:
- Add new hook for requesting such an editor, given a corresponding
value.


# 68e78ff84182e9cf9f05dc7ab334ab1cb4e15b80 23-May-2015 Rene Gollent <rene@gollent.com>

Debugger: Add memory write support.

- Implements various support classes and functions that will be
needed in order to marshal requests to write to memory in the
target team.


# 091a80aeed690e629167ea9e5603f51d950e49b8 15-Apr-2015 Adrien Destugues <pulkomandy@gmail.com>

Protect all BSD extensions with _BSD_SOURCE

* Do not define the symbols by default, as they are not in the default
libraries.
* Adjust jamfiles of all code using BSD extensions to define
_BSD_SOURCE.
* This makes Haiku slightly more compliant to standard C/POSIX.


# edf74e6ca88fd7a0dd394378790ebb7e2da3bc19 26-Dec-2014 Rene Gollent <rene@gollent.com>

Debugger: Cleanups.

General:
- Move all smaller prompt/edit windows to a dedicated subfolder.

Debugger/TeamsWindow/StartTeamWindow:
- Move management of StartTeamWindow to application, rather than
Teams window.

TeamWindow:
- Add top level menu item for commands that aren't specific to the
current team. This currently consists of requesting that the
Teams window be shown, and directly starting a new team.

Fixes part of #11659 (no way to start additional teams if Debugger was
initially started with a specific team).


# 9a539f9e807cafb07ea9c0821883c9cd4614c417 18-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

Outsource ncurses.


# 9dcef0489e544e13fc8ce4b92923ebe48b66f861 15-Dec-2014 Rene Gollent <rene@gollent.com>

Debugger: Cleanups.

Get rid of ExpressionEvaluationWindow.

- When asking to evaluate an expression via the Tools menu, we now
bring up a prompt window the same as the one used to add a watch
expression. This in turn works exactly the same as the latter,
except an additional flag is sent indicating that the expression
in question should not be persisted. As such, the results are
shown in the variables view, with all the capabilities that allows,
but also without the expression following the function as a watch
expression would.


# 172a0247ddef45d84587feec628cda6861969090 29-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Cleanup.

- Rearrange source_language subdir to have only the interface classes
at the top level, and devote a subdir to each language-specific
implementation of them.


# 4671959310e053f0087f6f7a76fe7fba9639b0ae 26-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Minor refactoring.

- Break the expression evaluator's tokenizer out into its own separate
header so that the syntax highlighter can also make use of it.


# c04274bdd35aeeefa2a6d5e09436c6cb2d8d6c7b 24-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Add skeleton C/C++ syntax highlighter classes.


# d431ff418f4c13cafd4ccb5c3e26be9027d02d57 24-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Cleanups/adjustments to syntax interfaces.

- Add missing public keyword for SyntaxHighlightSource/SyntaxHighlightInfo.
- Add initial set of basic syntax highlight types.
- Remove SyntaxHighlightSource. Instead, add a general purpose LineDataSource
interface to the model classes. Correspondingly adjust SourceCode to inherit
from it and fixup its derivatives accordingly; also adjust SyntaxHighlighter
to take a LineDataSource rather than a SyntaxHighlightSource.


# 81c848a14a380679a439cccb9e10b60d05bd6fbc 14-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Rework expression parsing API.

ExpressionInfo:
- No longer stores an explicit result type (this is inferred from
evaluation of the expression itself now).
- Introduce class ExpressionResult for returning the result of an
expression computation. This can currently take the form of either
a primitive value, or a value node object.
- Adjust UserInterfaceListener and ExpressionInfo::Listener to take
the above changes into account, and correspondingly adjust all
callers/listeners.

CLanguageExpressionEvaluator:
- Introduce child class Operand. This subsumes the functionality that
was previously in the separate Number class, and can represent a
primitive value, a value node or a type. Also has functionality to
implicity handle type promotion/inferring when performing calculations
between operands.
- Adjust expression parser to operate in terms of Operands rather than
Numbers. This allows a number of improvements, most notably that an
expression can now return a value node as a result rather than only
a primitive number. This capability isn't yet fully used, but paves
the way for future uses such as an expression that evaluates to a data
member, a global variable, or an arbitrary pointer of a particular type.
- Various cleanups/simplifications that were possible as a result of the above
changes.

ExpressionEvaluationWindow/ExpressionPromptWindow:
- Remove type menu field, since the expression API no longer uses it.

Adding/removing expressions in the VariablesView is temporarily disabled,
pending some further rework there to properly handle the new result object.


# 05d1068c97feb2428366e1c9a2954853a5e50a6e 08-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Reorganization, no functional change.

- Move SyntheticPrimitiveType to model subdir, since more than just
the UI will be making use of it.


# 0b21bf1038b62076d9fe8592e8538f33055878db 05-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Add simple prompt window for adding expressions.

- Requests an expression + type from the user for use elsewhere.
Intended to be used by VariablesView and possibly others.


# 1904b0c99ae89ceb38012e6737389796c55799de 06-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Add type subclass for artificial types.

- For expressions we need a Type object to represent their result
type. However, this doesn't need to map to an actual DwarfType,
as we won't need e.g. location and storage format information to
read it out of the target team, so instead derive a simple subclass
representing the appropriate result type.


# 1af58b2afd521cb13133916b8651ffa606fbcfa9 04-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Add expression-related model classes to build.


# 942226c711ca32e4c9b18e7c1e3a76fd546b3082 30-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Add UI for configuring breakpoint conditions.

General:
- Add message codes for requesting breakpoint configuration.

UserInterfaceListener/TeamDebugger:
- Add/implement hooks for requesting breakpoint condition changes.

BreakpointsView:
- Add button to request editing the currently selected breakpoint's
condition.

TeamWindow:
- Handle request to show breakpoint edit window.

BreakpointEditWindow:
- Implement simple radio-based UI for modifying the current breakpoint's
condition.

Still missing: Actually handling/evaluating the breakpoint conditions in
the ThreadHandler when the breakpoint is hit.


# 2d5794a1a3614749dc4f680c4c95c58617b4cd85 28-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Add asynchronous expression evaluation interface.

- Add UserInterfaceListener hook to request expression evaluation.
- Add corresponding events/handlers in Team and TeamDebugger.

These allow callers to request evaluation of expressions by the
debugger core's worker threads with asynchronous notifications of
results. While not strictly necessary right now, this paves the way
for further changes to come, as handling of variables will
potentially require resolving their values if they haven't been
already, and this shouldn't be done from user interface threads.


# 1b629877b1ee4c31f8d4eaed00d253abccd087f5 27-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Cleanups.

- Remove dependency on MAPM/ExpressionParser. Consequently also adjust
CliDumpMemoryCommand, InspectorWindow and WatchPromptWindow to use
CLanguageExpressionEvaluator for address input evaluation.


# 1c6c5f3b57c2634b7666aff000b3aec13208c37e 27-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Add Number class for expression usage.

- This class abstracts out the underlying type of a value, and handles
all the basic mathematical logical operators accordingly. Replaces
the MAPM type previously used for these respective operations.


# cda38afb68290ad9158ee270158b8c03f69b7b08 26-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Initial GUI for expression evaluation.

- Add a simple interface window for expression evaluation. Not yet
accessible from the team window.


# 72654b61cc5db718593f0bffe3149e09b63a9e5a 25-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Add initial skeleton for a C-style expression evaluator.

- Adds a stripped down version of ExpressionParser from libshared,
which will eventually be modified to support various other capabilities
needed for debug expressions. Not yet used or complete.


# 220d04022750f40f8bac8f01fa551211e28d04f2 31-Jul-2014 Oliver Tappe <zooey@hirschkaefer.de>

Use libstdc++, libsupc++ and libgcc from gcc_syslibs.

* Instead of faking libstdc++.so from libstdc++.a, use libstdc++.so
from the gcc_syslibs build feature for everything except x86_gcc2.
* Use libgcc_s.so from the gcc_syslibs build feature for everything but
x86_gcc2 (which still carries libgcc as part of libroot.so).
* Drop filtering of libgcc objects for libroot, as that is no longer
necessary since we're only using libgcc-as-single-object for libroot
with x86_gcc2, where the filtered object file doesn't exist. Should
the objects that used to be filtered cause any problems as part of
libgcc_s.so, we can always filter them as part of the gcc build.
* Use libsupc++.so from the gcc_syslibs build feature for everything but
x86_gcc2.
* Adjust all Jamfiles accordingly.
* Deactivate building of faked libstdc++.so for non-x86-gcc2. For
x86_gcc2, we still build libstdc++.so from the sources in the Haiku
source tree as part of the Haiku build .
* Put gcc_syslibs package onto the image, when needed.


# 778ef3f92b8b5ea5ab7a4b34bb20b02a0569cc10 15-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Adjustments to Jamfile.

- Remove duplicate instance of libshared.
- Add linker flags to not export symbols from linked in static libraries.
Resolves an issue on gcc4 where symbols from libedit and libsolv would clash,
leading to crashes.
- Add package kit-related headers and libraries.


# 331511009c7f769f4c4dad00c7a31e2d926e7731 10-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Start adding the groundwork for load state handlers.

Adds abstract class ImageDebugLoadingStateHandler which simply contains two
hooks, which allow one to a) ask it if it supports a handling a particular
type of loading state, and b) if so, ask it to attempt to handle that case,
given the passed in user interface object.

Also adds implementing subclass for DwarfImageDebugInfo, currently
intended primarily to handle the case of missing external debug information.
At present, this just supports prompting the user to find/install the file,
but eventually this will be extended to also support automatically installing
the corresponding debug information package, if applicable.

Finally, adds ImageDebugLoadingStateHandlerRoster, which acts as a front end
for matching up a given loading state with the appropriate handler.


# a262768084fef1a4ad73c570f259fab2a31ed8f9 08-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Add classes for representing image loading state.

Adds a hierarchy of classes for preserving the loading state information for
a LoadImageDebugInfoJob. These include:
- ImageDebugInfoLoadingState:
Top level class that simply stores a reference for the specific info
state that we're currently attempting to load.

- SpecificImageDebugInfoLoadingState:
Abstract base class representing state information specific to a
particular kind of debug information.

- DwarfImageDebugInfoLoadingState:
Implementation of the above for the case of DWARF.

- DwarfFileLoadingState:
Encapsulates the in-progress loading state of a DWARF file for the case
where a file's debug information is referenced externally, but cannot
be found.


# af8e2aa4736c69637c294b3b6351243e9c7551fd 16-Sep-2013 Rene Gollent <anevilyak@gmail.com>

Debugger: add settings manager for source location mappings.

- If it was necessary to help the debugger locate a particular source
file due to it not being found on disk at the location specified in
the debug information, the associated user-supplied path mappings
are now saved and restored in the team settings. The file manager still
needs a bit of extra work to apply these as files are added though.


# b9e8ec7bc02de57d5031196fc88cf44a94a6621d 14-Sep-2013 Ithamar R. Adema <ithamar@upgrade-android.com>

debugger/debuganalyzer: Remove the explicit -Werror from Jamfile

Specifying -Werror in the Jamfiles directly prevents the build
system from disabling error-on-warning for some arch specific
warnings (or even globally), breaking the ARM build.

The "src/apps" directory is already setup to compile with -Werror
by the build system anyway, so remove the explicit setting here.


# b9b126139a57e5c239f935dc5cef11188042bdc8 16-Sep-2013 Rene Gollent <anevilyak@gmail.com>

Debugger: add settings manager for source location mappings.

- If it was necessary to help the debugger locate a particular source
file due to it not being found on disk at the location specified in
the debug information, the associated user-supplied path mappings
are now saved and restored in the team settings. The file manager still
needs a bit of extra work to apply these as files are added though.


# 20d9063c36be668dcf5519c7aa7baf249c2e79a7 14-Sep-2013 Ithamar R. Adema <ithamar@upgrade-android.com>

debugger/debuganalyzer: Remove the explicit -Werror from Jamfile

Specifying -Werror in the Jamfiles directly prevents the build
system from disabling error-on-warning for some arch specific
warnings (or even globally), breaking the ARM build.

The "src/apps" directory is already setup to compile with -Werror
by the build system anyway, so remove the explicit setting here.


# 44646df41675154a15580e956dde4d08b0a684fc 04-Aug-2013 Rene Gollent <anevilyak@gmail.com>

Debugger: Move CLI commands into their own subdir.


# b0944c78b074a8110bd98e060415d0e8f38a7f65 01-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

More work towards hybrid support

* All packaging architecture dependent variables do now have a
respective suffix and are set up for each configured packaging
architecture, save for the kernel and boot loader variables, which
are still only set up for the primary architecture.
For convenience TARGET_PACKAGING_ARCH, TARGET_ARCH, TARGET_LIBSUPC++,
and TARGET_LIBSTDC++ are set to the respective values for the primary
packaging architecture by default.
* Introduce a set of MultiArch* rules to help with building targets for
multiple packaging architectures. Generally the respective targets are
(additionally) gristed with the packaging architecture. For libraries
the additional grist is usually omitted for the primary architecture
(e.g. libroot.so and <x86>libroot.so for x86_gcc2/x86 hybrid), so that
Jamfiles for targets built only for the primary architecture don't
need to be changed.
* Add multi-arch build support for all targets needed for the stage 1
cross devel package as well as for libbe (untested).


# ef2d649d76723c303957b2d5da5abde668753741 05-Jul-2013 Rene Gollent <anevilyak@gmail.com>

ExceptionConfigWindow -> BreakConditionConfigWindow.

Stop on image load removed from BreakpointsView, pending adding it to
BreakConditionConfigWindow with some additional options.


# b8b4219f26ca324dbaca060885173cbb01331447 27-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Implement #9758.

- Add ConsoleOutputView for showing the debugged team's console output.
The view presents checkboxes for controlling whether or not stdout
and/or stderr output is captured and shown, as well as the
ability to clear the current output.


# fe448830c9e93906af7319af226af06e0738e759 27-Jun-2013 Rene Gollent <anevilyak@gmail.com>

TeamDebugger: Implement post syscall event handling.

We now watch for file write syscalls in the target team. If they
constitute a write to either stdout or stderr, we attempt to capture the
output, and notify interested listeners accordingly.


# d08227bb68d298ef019b410fa6c0e0da29478a56 26-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Add SyscallInfoEvent model class.


# 55fc8da14328ae333d03079f092948f29411e8b3 13-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Initial implementation of exception configuration window.

Doesn't actually take any actions yet, just presents a UI.


# 3bbef9dd76c624c594c739c17ead26e81afc2581 21-Apr-2013 Siarzhuk Zharski <zharik@gmx.li>

Discard Termcap and switch console apps to use Terminfo

* Switch bash, debugger, less, telnet[d] and top apps to use termcap
functionality provided by ncurses lib instead of GNU libtermcap.so;
* NetBSD version of tput utility replaced with ncurses' one. Fixes #9606;
* terminfo database is provided as mandatory package installed during
building target system;
* Remove libtermcap module. The termcap database source and
corresponding build rules are not removed to provide backward compatibility -
until all optional packages will be rebuild on upcoming system version
using terminfo. Note that gcc2 builds may require to provide termcap a bit
longer in the sake of binary compatibility with R5 era apps.


# 1953ec9d1da2b88831fdb8de66e7c84c023ea9bb 03-May-2013 Rene Gollent <anevilyak@gmail.com>

Add UI window for starting a new team.


# 8a9423ee95f61b613cfe961e1a5cbbf54d558bfc 27-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Add RangeList utility class.

- Tracks a set of ranges. Implicitly deals with collapsing overlapping
ranges as they're added.


# aecef63c52f5b683a08c2c6f4cb280a122dcf71a 25-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Add team information model class.


# 2298b5fc2315f40da1674a9774cc157250f9121f 12-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Resolve TODO.

- Added GetSystemInfo() to DebuggerInterface. Use that from
DebugReportGenerator instead of calling get_system_info()/utsname()
directly since otherwise we'd get the information for the wrong system
in the eventual case when we have remote debugging support.


# dcbc00c3cf7aeb9e2a6f8de84cbb9f97d4e44a74 05-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Add model classes for representing semaphore information.


# a5e54e1bcf9e589786ef3295f1d8a87a4d4a9bd4 04-Apr-2013 Rene Gollent <anevilyak@gmail.com>

Add model classes for representing area information.


# 76ed6d72a535697c54305bc36c946e13dc5ed28c 27-Mar-2013 Rene Gollent <anevilyak@gmail.com>

Refactoring to handle multiple return values.

- Replace use of address + CpuState pair in Thread,
SpecificImageDebugInfo::CreateStackTrace() with a ReturnValueInfoList.
Adjust all implementing subclasses and callers accordingly.

- DwarfImageDebugInfo::CreateReturnValue() -> CreateReturnValues().
Now processes a list of return value information structures rather
than just a single one. This means we can now handle multiple return
values in a single statement. This still isn't entirely correct though,
since, e.g. for functions whose return types fit in a register we need
to either retrieve them immediately after function return, or store the
CPU state at that point in time for later use in value retrieval,
otherwise the return values will all be those of the last called function.


# 9ede3c06e8b42ae5428b6580a0416555af4dad05 28-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Add ReturnValueID base type.


# c8d82cf6db9148209256e0ed89bdef72aa355d97 19-Dec-2012 Alex Smith <alex@alex-smith.me.uk>

Started adding x86_64 support to Debugger.

Stack tracing doesn't work yet, nor does single stepping (somehow
manages to completely freeze the system).


# ec7c59ca09cff4de780eb06a10144ff75c86ac5a 18-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Add memory dumping commands similar to those in KDL.


# 596922bb7f69c3f2c267415886e90574efc53d59 17-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Add CLI print variable command.


# 287cda6f721210e5b380c674fbd3f365b0ff71d6 16-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Add some more commands to the CLI.

- Added 'frame' command for setting/printing the context's current stack
frame within the active stack trace.
- Added 'variables' command for printing the list of variables visible
within the current frame.


# c1034c63fbb8debcff35b726c9aa3c48bbd8d2b2 07-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Pull a ValueNodeManager class out of VariableTableModel.

- The intention is to have a class which handles the actual management
of the variable node graph, creating child nodes and such. This way
the GUI, CLI and report generator don't have to each reimplement
these low-level parts and can instead concentrate on their relevant
representations thereof.


# fad00fb02a262b92a1ac2f3ddbe8d5b15310b1fa 02-Dec-2012 Rene Gollent <anevilyak@gmail.com>

Add type handler and corresponding value node for BList.

- When a debugging libbe is present, and a BList is encountered,
we now read its internal structure and expose it as if it were an
array of pointers. Combined with typecasting, this means one can
now easily inspect the content of such a list.


# bb7d146c64d025442c6798caf2d13114dfd18deb 22-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Add CLI command for saving debug reports.


# 11e519484416534773c9761cdcd7148c21a940da 17-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Add initial version of DebugReportGenerator controller class.

Not yet complete or made use of.


# 4549786bad3ebe97704626f9cc73afa64f92415f 07-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Code reorganization.


# 0ba9bff27d88633aa0f9a6477342aa79fccbf4f7 07-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Revert preservation of watchpoints in settings.


# 2a2e3bafa2daaf31ff8be2c7b6782529f63774e3 06-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Add UI hooks for watchpoints.

This gets basic watchpoint support working. Right clicking on a variable
and picking Watch now opens a prompt with the inferred address, size
and watch type for the user to adjust.

Still needs some work to get them to show/be modifiable in the breakpoints
tab and to get them to respect architectural restrictions (i.e. on x86 we
can realistically only do 2 hardware watchpoints and those are restricted
to write watch), at least until we support software emulated watchpoints.


# 4235cb3e331c05b73700905462dc7dfab02eda36 06-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Start adding the underlying infrastructure for watchpoint support.


# 9b008d31ffa35bb2c98bb2accf83e16fb7f2f9ad 04-Aug-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger CLI: Add a bunch of new commands

* "thread": prints/sets the current thread.
* "continue", "stop": continue/stop the current thread.
* "sc"/"bt": Print a stack trace for the current thread. Very basic yet.


# aacf2782d8022d7178125948daac67533ef3e473 24-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Switch from readline to libedit


# f4b1ddb580a6a390c7b11b66c799de95014c2c29 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Coding style: normalize naming, some whitespace fixes

* TeamUISettings[Factory] -> TeamUiSettings[Factory]
* GUITeamUISettings -> GuiTeamUiSettings
* GUISettingsUtils -> GuiSettingsUtils


# 48b4d20480441b4525de6b90cab9539a834ab8fd 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger CLI: Add "threads" command

It just lists the team's thread.


# 533a73766d9c6c75e93fce67a16fa5c97a5a0b75 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Create UiUtils helper class

Currently only a method to get a description for a thread state lives
there (code pulled from ThreadListView).


# a6de32b06c65d62f585d77eb77870f171a5f0e3b 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger CLI: Pull QuitCommand out of CommandLineUserInterface


# d0ef75400b4136bac523bb2f71cd55af2262543a 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger CLI: Start to imbue CliContext with life


# abbcb2caf536311e45a4a25b68339fc92e74bbb1 23-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Use readline in the CLI

This is a bit hacky, since gdb's readline is used. It would probably be
best to prepare an optional build package.


# 6d60b554e6d6cee2a7e73e95b5e06374c9f2e32f 20-Jul-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger: Some basic work to get the CLI going

There's an input loop thread which reads and parses command lines and
the infrastructure for registering and executing commands. Currently
only "help" and "quit" commands are implemented.


# 82931998313bba85fa6e41705e55f6e15502810a 15-Jul-2012 Rene Gollent <anevilyak@gmail.com>

Add definition for a general-purpose action menu item.


# 79dbafbc668ee2488757b50264f2bedf9677009a 19-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Add GUI archiving utility functions to build.


# 20616c59c121f5ae49a83d8a7542537c18a08a28 03-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Add stubs for the eventual command line interface.



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


# 76ce2c7ef72d883238c339ee9d2bb79e8a8bfce6 01-Nov-2011 Rene Gollent <anevilyak@gmail.com>

More work-in-progress towards getting settings saved/restored.



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


# 0d3e3475077cb913d90d780c4e23301d4170867f 31-Oct-2011 Rene Gollent <anevilyak@gmail.com>

WIP: Add abstract base class TeamUISettings and corresponding subclass GUITeamUISettings.
Once complete, these will be used to store/restore settings for the debugger's various UI
components.



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


# 698ad09748bc7e6c117d2028e324d633f2935c55 30-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Add interface TeamTypeInformation and implement in TeamDebugInfo. Pass along
to various classes that need a reference to it in order to allow value nodes
to look up type information from the target team.



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


# 185d2cdcb9b3af20ad0e9cce53ed7e5bafe2e962 30-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Add model class TypeLookupConstraints.
* Create and pass constraints to type lookup requests to ensure
that the type we get back is in fact the one we wanted, and not
a different one that happened to have a similar name.

Resolves ticket #5495.



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


# ff22dfe8f35e713a4ed09dd564743f80dcb92916 22-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Should have been part of previous commit.



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


# 04584c0d6f9eb1cc69fe36df2a761a13ede381da 21-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Add the beginnings of a BMessage type/value handler. Not yet registered with
the type handler roster since it's quite far from being complete.



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


# 62e1d169f8a0471d861b4eb97f946e665ee71790 12-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* TeamMemoryBlock: Now stores whether or not the block it represents is writable.
* RetrieveMemoryBlockJob: Make use of get_memory_properties() to retrieve the
block's protection bits and mark it appropriately.



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


# 3e3ce16f5ea1cd92ef3d4fdb42a8822bde59d318 09-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Introduce TeamMemoryBlock[Manager]. These provide an interface to raw memory
page data of the target team.
* Jobs: Add RetrieveMemoryBlockJob which performs a background read of the
target team's memory. Used by InspectRequested() to perform the actual work.
* TeamDebugger: Added InspectRequested() hooks to allow clients to ask for
a memory read to be performed.
* Introduce InspectorWindow and MemoryView to form the basis of a memory inspector.
As yet these are more or less stubs and not yet hooked in.



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


# 87d85ea382bac0d2c83b5944ef807d4ec31fc111 11-Dec-2010 Rene Gollent <anevilyak@gmail.com>

- Refactor setting up the default register rules to happen in the Architecture
class in order to allow us to set up architecture specific default rules
for registers that aren't explicitly set by the CFI program.
- Set up default rule for EIP on x86.
- Theoretically set up a default rule for the stack pointer. Disabled for the
time being though until I determine why that rule's not yielding the expected
values for ESP in anything other than the top frame, though the other location
offset rules work as expected.



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


# 716f06ce58901e2a0c6cd128e26e42d22fc6e600 08-Nov-2010 Rene Gollent <anevilyak@gmail.com>

Added type/value handlers for C strings. This allow's the debugger's
variable view to actually render their contents rather than simply giving
the string's address.



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


# 5a13e7b045910ee62ae40256dff1d2c06a4bbf77 03-Nov-2010 Rene Gollent <anevilyak@gmail.com>

Add a means for the user to locate source files if they are not found
at the location specified in the debug info.



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


# ccb01bef441eb4f8a951633d646dd545fe5f800c 21-Sep-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Finally integrates running_teams_window stuff to the Debugger app:
* Rework Debugger class a bit to ease integration
* Expand TeamDebugger::Listener interface to notify start event too.
* Former RunningTeamsWindow, now name TeamsWindow, is shown at start
if no team/program to launch is specified.
* Double-clicking a team item in this list starts a new Team debugger, or
reactivate the existing one if any

This window settings is not yet integrated with the SettingsManager.
Will comes next.
I plan to add some UI controls to this Teams window to allow user to setup
a program arguments and environment variables and then launch & debug it.



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


# 59ea286fac914a808edc6989becc77dadff10383 05-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* EnumerationValue -> EnumeratorValue
* Since some types don't have names (e.g. pointer types or anonymous structs or
unions), each type does now also have a unique ID. The global type cache
registers types by ID and by name (if they have one). This fixes clashes of
types with empty names.
* Completely refactored the code dealing with variable values. Formerly we had
Variable and TypeComponentPath to navigate to a component, mapped to a
BVariant representing the value. Now we have:
* Interface Value with various subclasses (BoolValue, IntegerValue, etc.) to
represent a value, with the flexibility for more esoteric values.
* A tree of ValueNode+ValueNodeChild objects to represent the components of a
variable. On top of each ValueNodeChild sits a ValueNode representing the
value of the component, potentially having ValueNodeChild children. This
should allow casting a component value, simply by replacing its ValueNode.
* Interface ValueHandler and various implementations for the different value
types. It is basically a factory for classes allowing to format/display a
value.
* ValueHandlerRoster -- a registry for ValueHandlers, finding the best one
for a given value.
* Interface TypeHandler and various implementions for the different type
kinds (primitive, compound, address, etc.). It is basically a factory for
ValueNodes for that type.
* TypeHandlerRoster -- a registry for TypeHandlers, finding the best one
for a given type.

That's still a bit work in progress. It introduces at least one regression:
The VariablesView doesn't save/restore its state anymore. Will take a while
until that is added back.



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


# e3a631c0b48d904a9502dabb157639539484da53 15-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced interface UserInterface, which abstracts the user interface code.
* Added implementation GraphicalUserInterface for the current GUI.

TeamDebugger does no longer know about TeamWindow.



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


# 0fc8a75c02203277316b64161fff4210a3407dc5 13-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved TargetAddressTableColumn into own source file in gui/util.
* Fixed misspelled MSG_*_BREAKPONT constants.
* model/Team: Added separate event class UserBreakpointEvent for user
breakpoints.
* SourceView::MarkerManager: Invalidate the markers when new source code is
set.
* Added breakpoints view.


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


# e8e4e613b24f7524dabe589afae3f7d9f34e493a 10-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

The variables view does now save/restore part of its state when the stack
frame changes. Currently that's only the expanded/collapsed state of the
items in the tree view, but that already makes single stepping through code
much less annoying.


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


# d054be0d8c41431d611f41171232b0f75ec6f30f 09-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the data location resolution methods from StackFrameDebugInfo to the
respective Type classes. StackFrameDebugInfo is pretty much out of work now,
but maybe something comes up later.
* Renamed GlobalTypeLookupContext to GlobalTypeCache and renamed its methods.
* A TeamDebugInfo does now have a GlobalTypeCache which is used for resolving
types. Formerly it was created per stack frame, so all types had to be
resolved after each single step. Single-stepping is usably fast again.
The disadvantage is that DWARF theoretically allows types properties to
depend on instruction/frame/frame base pointer and we don't support that
anymore. I can't think of a reasonable application for that feature, though.
* Refactored DwarfStackFrameDebugInfo:
- Moved the type classes into new DwarfTypes.{h,cpp}.
- Moved the creation of types into new class DwarfTypeFactory.
- Added class DwarfTypeContext which bundles all the dependencies of the type
classes.
* Made DwarfFile a BReferenceable.


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


# 71f75cdcdee748eb5e0841f8868ab8f477c0ee75 06-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* WIP regarding non comilation unit local types:
- Introduced GlobalTypeLookup interface and GlobalTypeLookupContext to look
up types by name and cache them.
- TeamDebugInfo implementes GlobalTypeLookup iterating through all
ImageDebugInfos, which in turn iterate through all SpecificImageDebugInfos.
- DwarfImageDebugInfo iterates through all compilation units, using
a temporary DwarfStackFrameDebugInfo to create the type.
- DwarfStackFrameDebugInfo no longer caches the types itself, but uses
GlobalTypeLookupContext. It uses GlobalTypeLookup to look up types not
defined in the compilation unit.
- DwarfFile: Made expression evaluation more robust, so that it also works,
when no subroutine entry, frame pointer, and instruction pointer are
available (and not used by the expression).
Basically works already, although the wrong compilation unit might be used
when resolving values for global types. It's also horribly slow, when there
are many types in the stack frame.
* DwarfStackFrameDebugInfo::ResolveArrayElementLocation(): The element location
piece size was set incorrectly (multiplied by 8, although bytes were
expected).



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


# 4fc4757d3d24091a13990cc093318e8859645e2f 01-Oct-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Added ArrayIndexPath, a small class storing a index list for identifying an
element in a multi-dimensional array, featuring conversion from and to string.


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


# 6e72ebfce3cb4969f9b27b4210d7631ba16948fa 20-Sep-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* More work on retrieving local variable values. Address and compound types can
now be inspected. Still work in progress -- bit fields and arrays don't work
correctly yet nor does type lookup beyond the current compilation unit.
* Made most of the debugger output configurable via a config header. By default
it's much less noisy now.


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


# 2bf55b39a5119e092a52d9e50da6efcb38393d54 23-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made FunctionID abstract. There are now two implementing subclasses,
SourceFunctionID (where we know the souce location of the function) and
ImageFunctionID (where we don't know the source location). Made the
classes archivable.
* Added support to find functions by ID.
* Improved user breakpoint handling. We can now "install" a breakpoint before we
even know the function instances in which to install it. Whenever image debug
information become available, breakpoints are installed in the concerned
function instances of the respective image.
* Always trigger loading image debug info as soon as we become aware of an
image.
* Implemented a settings management mechanism. ATM only the breakpoint
locations for debugged teams are persisted. This seriously improves the
debugging fun, though. :-)


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


# a5e1e7ceba589daa8322d42af96077aaa94a7232 22-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Refactoring: Moved TeamDebugModel functionality into Team and got rid of the
former.


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


# da4d62db940d6dd5a89eff24daca94875a309aa4 18-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Worker:
- Made Job Referenceable.
- Turned JobKey into an abstract base class to add flexibility. The new
SimpleJobKey is a subclass with the former functionality.
* TeamWindow: Removed the TeamWindow* parameter from the listener hooks. The
TeamDebugger knows anyway.
* Added IDs to Variable, Function, and FunctionInstance. The latter two generate
the ID on the fly, Variable stores it.
* SpecificImageDebugInfo::CreateFrame(): Changed FunctionDebugInfo* debug
parameter to FunctionInstance* to provide more info (the function ID).
* DwarfInterfaceFactory/DwarfImageDebugInfo:
- Added class DwarfFunctionParameterID, an ID class implementation for
function parameters and set the IDs on the parameter objects.
- Retrieve the size of a type (i.e. the size of its objects) and store it in
DwarfType.
- If a parameter's ValueLocation doesn't have a size, set that of the
respective type.
- Map the register indicies in the parameters' ValueLocations from DWARF to
our indices.
* Added class TypeComponentPath for identifying subcomponents in types.
* Added class StackFrameValues, a container associating variables and their
subcomponents with values.
* StackFrame does now have a StackFrameValues object for parameters and local
variables and a mechanism to notify listeners when values have been retrieved.
* Added GetStackFrameValueJob to retrieve variable values. Lots of functionality
is missing yet. Most notably it doesn't retrieves values for subcomponents.
* Wired everything to trigger loading of variable values and getting notified
when done.
* VariablesView: Added a value column. This is all very basic and has to be
done differently, but at least values for the parameters can be seen already.


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


# fd1f5093305cee37ad817d62ccbbe434aab18405 13-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Skeleton for source language abstraction. There's SourceLanguage with several
subclasses, though they don't do much yet. SourceCode is now associated with a
SourceLanguage.


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


# 614e1dc42fb2c04ff44bda621bea500d01d6a4c3 13-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Register:
- Added a type constant describing the format of the register value.
- Added flag "is callee-preserved" indicating whether the ABI requires the
register to be preserved by a called function.
* CpuState: Added SetRegisterValue(), made GetRegisterValue() const.
* Added RegisterMap interface for mapping register indices between different
models.
* Architecture:
- Added CreateCpuState() version to create a clean CpuState.
- Added GetDwarfRegisterMaps(), which returns to RegisterMaps, converting
from and to DWARF register indices.
- Added ReadValueFromMemory() reading a value from the target team's memory.
The value type is specified by a type constant and the value return via a
BVariant.
- CreateStackTrace: No longer decide whether to adjust the instruction pointer
of the previous CPU state depending on who created the CPU state. Instead
compare it with the return address of the next frame. If they are equal it
obviously has to be adjusted.


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


# 3c5dbb462d2d407e87196e6eb5c24162df9a5af7 01-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved Array.h to new directory "types".
* Added StringUtils with string hash functions.
* Added Locatable{Entry,File,Directory} and FileManager classes to manage the
mapping from debug info/target file names to local file names.
* Image does now have a LocatableFile referring to the image's shared object
file. Added listening to location changes of these files to TeamDebugger. No
action is taken yet (should trigger reloading the debug info).


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


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

Added DwarfTeamDebugInfo and DwarfImageDebugInfo, the classes to interface with
the DWARF code. Not doing much yet.


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


# 7a7112b32d3c8f51a0e89ef2fc9d20a6a4c04159 27-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Renaming and coding moving.
* Added locking to DwarfManager.


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


# 93b6484548d66736b83a5fe17a46c74d53236789 27-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added support for loading the debug info for an image lazily and adjusted
the jobs accordingly.
* Added a view to list the source files and functions for an image.


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


# 1c6fd17f75bd67d7135d31ffb138e19abec4de89 25-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Pulled interface TeamMemory out of DebuggerInterface to make the arch and model
packages indepent of the latter.


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


# 43b0f7e0d78311f9c484992b9bce69916b78a031 25-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved breakpoint management into new class BreakpointManager and added
support for temporary breakpoints.
* TeamDebugger: No longer handle debug events in the listener thread. Instead
post a message to the looper thread. Makes the locking a bit easier.
* Architecture: Added virtual GetInstructionInfo() and GetStatement() returning
information on the instruction respectively a statement at a given address.
Implemented for x86.
* DebugInfo: Added virtual GetStatement() and implemented it for
DebuggerDebugInfo by means of using the Architecture.
* Implemented step over/into/out support. Works in principle, but has no
handling for PLTs yet, i.e. stepping into functions of other libraries
requires two steps ATM.


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


# 194b3b719ab2ff6b0ff535cffe7242c25d894bc3 23-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved all handling of threads from TeamDebugger into new class ThreadHandler.
* Added new job to get the initial state of a thread.
* Now we also get the states of new threads correctly.


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


# 6381d6cc4ee3d8c4efc92523538d63e16cf0b22f 22-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added Breakpoint class and extended TeamDebugModel to manage the objects.
Extended the event mechanism respectively.
* Added support to SourceView to display breakpoints and manipulate them.
* Extended TeamDebugger to install/uninstall breakpoints.


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


# 7367310fbe0c06244a678bfaa36a60e5817659dd 21-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Virtualized SourceCode and implemented a derived class DisassembledCode, which
allows to implement StatementAtAddress() in O(log(n).
* Added SourceCode::StatementAtLine().


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


# 0bcacd22ab6dc13aa6fb33197a6c3d14a62d1b00 21-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added classes to represent source code (SourceCode, Statement).
* Added x86 disassembler (via libudis86).
* Added Architecture::DisassembleCode() to disassemble a function to SourceCode.
* Added virtual DebugInfo::LoadSourceCode() to retrieve the source code for a
given function. The implementation in DebuggerDebugInfo disassembles the
function.
* Added source code info to StackFrame. Also added a listener mechanism to get
notified on source code changes.
* Added job to load the source code for a stack frame.
* Added (very basic) source code view and wired everything so that when a stack
frame is selected the source code (respectively disassembly) for the
underlying function is retrieved and shown.


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


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

Added demangling support. Only implemented for gcc 4 yet.


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


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

Moved several classes into new "model" subdir.


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


# ec1b789c2e8a55645ae17e3235f10a13cb0be3af 20-Jun-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

DebuggerInterface destructor wasn't virtual, raising a -Werror warning.
Fixed libdebug.so link.


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


# b7c5bd634b64a6f9407eeb5fa15609e582f86c34 19-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Renamed Variant to BVariant and moved it to libshared.a.


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


# 15f040e596308c36903c8381112ef04280b95963 19-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Some work towards getting stack traces:
* Added a virtual Architecture::CreateStackTrace() and added a basic
implementation in ArchitectureX86. Fleshed out StackTrace/StackFrame a bit
and added StackFrameX86. This needs to be organized differently, though, so
that we can get the maximum available information for each stack frame,
depending on what info is available for the respective function.
* Added job to get the stack trace for a thread.
* Added stack trace related handling in TeamDebugger. Reorganized the thread
state/CPU state/stack trace change handling a bit -- we're using a
Team::Listener now, and do things asynchronously.
* Added a StackTraceView to display the stack trace of the current thread. No
function name available yet, otherwise working fine.


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


# 495676cab608bb52e4581beb29e28fe88773018b 19-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented Worker class, which executes Jobs in a separate thread.
* Implemented a job for getting a thread's CPU state.
* The team debugger uses a worker now. ATM only for getting the CPU state for
stopped threads.


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


# c42fe1eb572377d133cc3650e49de2ec76e965a2 18-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

More work on the architecture abstraction, particularly regarding information
about what registers the architecture has and how to get them from the CpuState.
Implemented the respective x86 part.


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


# a81bb42a9321a3b8ccf7f92623237826ff8767f4 18-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Beginnings of the architecture abstraction.


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


# f208695cc18a91def34ea8118ce608f5b344a2d9 18-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved all interaction with the kernel/debugger interface into new class
DebuggerInterface. This will simplify adding support for remote debugging
eventually.


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


# ae53f49064a9f4dbd8b46680cf64d7fc3c6aa57d 17-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changed the layout of the team window. Trying a single window approach.
* Added Run/Step* buttons.
* Added some handling for selection in the thread list.
* Extended listener mechanisms all over the place (in models and views).
* The team debugger now gets the initial states for the team's threads.


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


# 42f07f3fead9c9b79fab5695e37f08c8a6c897c6 17-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added ImageListView showing the list of images. It will probably eventually
become a tree view, showing the source files as subitems of the images.
* Added the image list to the team window and changed the layout more towards
what it's intended to look like.


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


# b15883863de147826112b6f8f802dfbde610d1a6 17-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Init a debug context and set the team debug event flags.
* Handle the "thread/image created/deleted" events, maintaining the Team's
lists.


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


# ac8b67130a537ab4aefbbe70df31659c1d00b8d8 16-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added bits and pieces to the model classes (Team, Thread, Image).
* Added beginnings of the team window. Currently only showing the thread list
(not updated yet).
* Added application startup code and argument parsing.


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


# 008dd42650a27f897064eb71f97eedf429fe9f18 15-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Initial skeletons of the model (Team, Thread, Image) and the controller
(TeamDebugger) for debugging a team.


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


# 87c085991f806257604548c16bcf1aa3f71e9189 15-Jun-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

Ooops, sorry.


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


# f06173c765ebc07b3986258fad2e5672a0dd7a65 15-Jun-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

A tiny contribution to an Haiku Debugger rebirth: a Running Teams window designed similar to old' bdb one.
The skeleton 'hdb' application does nothing usefull beside, as I was trying to get fluent in team_debugger
messages.

That's pretty much all what I came with during a pathetic attempt to secure some free time to work on
a (indeed) most wanted native graphical debugger for Haiku. Building libdwarf was pending when I've realized
I wont have time ever.

Ingo, I hope you don't mind. Fee free to do whatever you want with it, remove included.



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


# 774e234b752f7bcbeae76dc70007bc701a528f04 15-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Typo.


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


# 9e8ec48b308eb221da728d5adad2fe6ff7e45f7c 15-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved dwarf related code into dwarf/ subdirectory.


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


# 44101b1f99e37cd9653c45338cff851e0da4889f 13-Jun-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

The very beginnings of a debugger. Currently consisting only of the beginnings
of a DWARF 3 reader. It can read the .debug_info section and create objects for
the entries, but most attributes are ignored yet.


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