History log of /haiku/src/apps/debugger/user_interface/gui/team_window/TeamWindow.cpp
Revision Date Author Comments
# 2bfacb1a 28-Sep-2022 Augustin Cavalier <waddlesplash@gmail.com>

Debugger: Adjust default weights of splitters in the main window.

Much more logical proportioning.


# 81c06cac 22-May-2019 Augustin Cavalier <waddlesplash@gmail.com>

Debugger: Add missing SetTarget/AddItem.


# 5ef06496 02-May-2019 Augustin Cavalier <waddlesplash@gmail.com>

Debugger: Add a "Write core file" menu item alongside "Save debug report".


# aa7f93c5 24-Jan-2019 Rob Gill <rrobgill@protonmail.com>

src/apps Code formatting

* No functional changes

code formatting changes only

Change-Id: I046ae21d9b288126022fe0bc2ddf827843765e70
Reviewed-on: https://review.haiku-os.org/c/896
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>


# 3d9b5693 28-Dec-2017 Rene Gollent <rene@gollent.com>

Debugger: Further work on memory leak hunting.

TeamWindow:
- Properly delete stack frame selection entries in destructor.

TeamDebugger:
- The reference to TeamDebugInfo wasn't correctly initialized to own,
leading to TeamDebugInfo never being destroyed.

FunctionInstance:
- Also clear source code reference in destructor.

ImageDebugInfo:
- Release references to specific infos in destructor. These are acquired
on our behalf when loading the image info, but were never released,
leading to the latter never being freed.

DwarfManager:
- Release references to files in destructor.

FileManager:
- Release entries in various destructors.

Somewhat improves the situation in #13800, but is still far from complete,
as a thorough review of this nature hasn't ever really been done.


# 456342ca 24-Sep-2017 Rene Gollent <rene@gollent.com>

Debugger: Reimplement #10671.

- Rather than the previous (reverted) approach of tracking the last selected
stack frame from within the StackTraceView, we now do so from the TeamWindow,
where the selection can be mapped by thread. This fixes a subtle issue where,
due to a lack of contextual information, the stack trace view would restore
the remembered last selected frame rather than an explicitly chosen one. This
was most noticeable upon selecting a function that had a corresponding stack
frame in the current stack trace, where, instead of selecting that frame,
the existing one would remain highlighted, even though the state of all other
views had updated. Found while investigating the cause of #13710.


# cdf821eb 13-Sep-2017 Rene Gollent <rene@gollent.com>

Debugger: Fix #13710.

TeamWindow:
- When changing the active function, we would also attempt to select a stack
frame matching that function. However, in the case where the active function
was set via changing stack frames, this logic would break if the function was
recursive, and would cause the topmost frame to be selected instead of one at
the desired recursion depth.


# 7bdeef54 09-Dec-2016 Rene Gollent <rene@gollent.com>

Debugger: Rework parts of report generation.

Team:
- Adjust report generation event to include a final status code for listeners.

CliContext,TeamWindow,ReportUserinterface:
- Use aforementioned status code to indicate whether report generation
succeeded or failed.

DebugReportGenerator:
- Notify listeners if report generation fails. This may have previously
been responsible for some bug reports where it was indicated that the
debugger hung without exiting after being asked to save a report from
a crashed app.
- When dumping disassembly, retrieve it directly if necessary rather than
requesting it via the user interface listener. This also fixes the quirk
that requesting to save a crash report while looking at the source code
of a function would trigger switching it to disassembly visually.
- When walking the list of threads to dump, acquire references to all of
them before starting. Otherwise, it was potentially possible for a running
but not crashed thread to exit while we were generating the report, leaving
us with a pointer to a deleted thread. This was most likely the cause of one
of the crashes reported in #13082.
- When receiving the notification that source code state has changed, clear
the waiting function. Otherwise, it was potentially possible for us to get
other state change notifications, leading to the data semaphore being
released too often. This would then cause later potential waits such as
the stack frame memory dump to not actually wait when they should,
potentially leading them to dereference objects that weren't yet ready.
This fixes another of the crashes in #13802.


# 10ba3348 30-Nov-2016 Rene Gollent <rene@gollent.com>

Debugger: Cleanup.

- Split MessageCodes.h into a second file that separates out the
application-specific message codes from those used by the core.
Adjust includes accordingly. No functional change.


# a9d53d9e 22-Nov-2016 Rene Gollent <rene@gollent.com>

Debugger: Fix regression introduced in hrev50534.

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

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

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

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

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

Thanks to Humdinger for the heads up!


# d6a334fa 02-Aug-2015 Rene Gollent <rene@gollent.com>

Debugger: Adjust TeamWindow to use ExpressionEvaluationWindow.
- Requesting expression evaluation from the top level menu now
invokes an expression eval window, rather than the past prompt.

ExpressionPromptWindow:
- Simplify, as it's now strictly used to add persistent expressions.


# be32382a 10-Nov-2015 Rene Gollent <rene@gollent.com>

Debugger: Adjust initial configuration of VariablesView.
- VariablesView is now passed a ValueNodeManager to use at
construction time, rather than creating one itself internally.
- Adjust TeamWindow accordingly.


# 0324fc40 14-Aug-2015 Rene Gollent <rene@gollent.com>

Debugger: Add status bar to main team window.

TeamWindow:
- Add a status bar in the form of a string view to the bottom of the
window, along with a helper function to request updating it.


# 10bbf8cb 26-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: TeamWindow refactor.

- When asked to load settings, post a message and do so in the window's
message loop. This avoids a lock order reversal when asked to do so
later as a result of exec() changing the target image out.


# 754b42a5 25-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: Add rename event for Team.

Team:
- Add listener hook and event type for rename events. These occur on exec()
since at this point we're running a different executable.

TeamWindow:
- Factor out code for generating window title into a helper, and use from both
window initialization and newly implemented rename listener hook.


# 473b2c6a 23-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: Add VariablesView listener hook.

VariablesView::Listener:
- Add hook for requesting value node value updates.

TeamWindow:
- Implement VariablesView listener hook and forward accordingly to
TeamDebugger.


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


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


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


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


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

Debugger: Cleanup.

Team:
- Remove expression evaluation event / listener hook. This doesn't
really belong to the Team anyways.

UserInterfaceListener:
- ExpressionEvaluationRequested() now takes an ExpressionInfo object
rather than the individual subcomponents.

ExpressionEvaluationJob:
- Notification of expression evaluation completion is now handled
via the info object's listener interface rather than the Team.

Others:
- Adjust all users of expressions to set themselves up as
ExpressionInfo::Listener subclasses, and consequently add themselves
to the respective info object when requesting evaluation. This
significantly simplifies various things, and also ensures that no
one accidentally gets notified of an expression they didn't actually
ask for, which could occur with the previous Team-based listener
interface. Make all other required adjustments for new interface
usage.

No functional change intended.


# b7e72db3 02-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Implement first part of #11387.

VariablesView:
- The view now keeps a mapping of a list of expressions associated
with functions.
- Add actions for adding/removing expressions to variables context menu.
- When setting up to show a new stack frame, also add corresponding expression
nodes and request their evaluation.
- Extend VariablesView::Listener interface to also encompass expression
evaluation requests.
- Don't add context actions for expression nodes.

TeamWindow:
- Implement VariablesView::Listener expression evaluation hook and forward
responses along.


# 11832b28 05-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Add expression prompt window handling.

TeamWindow now handles the messages for summoning/dismissing
the expression prompt window.


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


# c3f81329 29-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Implement expression variable value resolution.

General:
- Resolving variable values requires both a stack frame and a CPU state.
Adjust all interfaces and callers accordingly.

ExpressionEvaluationJob:
- Pass additional parameters needed for variable value resolution.
- If variable resolution is desired, ExpressionEvaluationJob now
creates a temporary ValueNodeManager for that purpose.
- If the expression parser returns a value node pointer that needs
to be resolved, schedule a corresponding job and wait.

CLanguageExpressionEvaluator:
- Clean up some leftovers that were preventing variable names from being
handled properly in some cases.
- Implement handling of identifier names. These are now looked up against
the value node graph of the active node manager, and if found, corresponding
values are retrieved. If the value has not yet been resolved, an exception
is thrown to ask that to be done.

This gets value resolution working for basic local variables and function
parameters, and consequently, #9712. Structure/class members and/or pointer
indirection aren't yet handled.


# fdb2d5d9 29-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Adapt expression eval users to async interface.

Factor out message constant for expression evaluation completion,
as multiple places will be using that.

ExpressionEvaluationWindow:
- Check for expression match immediately in listener hook, and
don't bother dispatching to the message loop in such a case.
Simplifies some of the other code.

InspectorWindow / WatchPromptWindow:
- Rather than attempting to evaluate an expression directly,
we now defer to the async interface. Clean up and adjust accordingly.

TeamWindow:
- Adjust window creation calls due to parameter changes.

This leaves only the CLI dump memory command to be adapted.


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

Debugger: Use async request in expression window.

- ExpressionEvaluationWindow now uses the aforementioned
request interface to ask the debugger core to perform evaluation
on its behalf, rather than doing so itself directly.

The remaining users of the expression evaluator will be adjusted in
following commits.


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

Debugger: Locking cleanups.

- Using BMessenger as an indirect lock is unnecessary, as
BLooper::Lock() checks if the current looper is valid via the global
looper list directly.
- Fix race conditions. When asked to show various subwindows, lock them
before calling Activate(), as the window could otherwise potentially
quit in between us checking pointer validity and calling Activate().
- _GetActiveSourceLanguage() needs to acquire a reference to the language
object in the case where it's retrieved from the active source code.
Otherwise, an unbalanced release would take place when creating the
expression window, leading to crashes.

Thanks to Stephan for reviewing.


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

Debugger: Hook in expression evaluation window.

- Adjust expression window interface so it can report being closed
to TeamWindow or whoever else invokes it.
- Add a menu item to Tools to request expression evaluation. This
now attempts to get the expression evaluator for the current language,
and subsequently opens the expression evaluation window with it.

With these changes, basic numerical expression evaluation works.
Resolution of variable values and condition operators aren't yet
handled.


# 432da9e3 29-Aug-2014 Rene Gollent <rene@gollent.com>

Debugger: Implement remaining part of #11033.

TeamDebugInfo:
- Add function to invalidate a source entry's file mapping.
UserInterfaceListener:
- Add listener hook to be able to invoke the aforementioned invalidate.
Add corresponding implementation in TeamDebugger.
FileManager:
- When asked to locate a source entry, invalidate any existing mapping
first.
TeamWindow:
- Always allow choosing an alternate source file.
- If we already have an existing source mapping, invalidate it first
before attempting to establish a new one.


# 36f126fd 02-Aug-2014 Rene Gollent <rene@gollent.com>

Debugger: Fix #11088.

- When walking through and querying volumes for a missing source file,
store the error and report it back in the completion message rather
than exiting the query worker. Otherwise, if something went wrong
with the queries, it'd potentially occur that we'd never prompt the
user to locate the file, as the UI would never be notified that
the background work was complete.


# 712e51d7 11-Jul-2014 Rene Gollent <rene@gollent.com>

Build fix.


# e4adab26 11-Jul-2014 Rene Gollent <rene@gollent.com>

Debugger: Fix minor issue noted in #11003.

- Reset tooltip when it's no longer needed (i.e. if the file path changes).
Otherwise, we'd erroneously show the old tooltip if the new path was short
enough to no longer be truncated, as would often happen after locating a
missing source file.


# 2f605e9f 28-Jun-2014 Rene Gollent <rene@gollent.com>

TeamWindow: Fix accidental double message sending.

- When we explicitly handle sending B_COPY/B_SELECT_ALL, don't
then pass control back to BWindow::DispatchMessage(), as that will
wind up sending the message to the target view twice.


# 3eadb2cc 26-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Improvements to hrev47421.

- Isolate the filesystem query/result list building into a separate
worker thread in order to prevent blocking the window thread in
case the query winds up being a bit more time consuming. This
doesn't yet handle intelligent prefetching (and associated can of
synchronization worms), but that will come once time permits.
- Also fixes a missing break statement introduced in the aforementioned
commit, though that one shouldn't have caused any actual harm.


# 2661ce46 24-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Implement #10970.

- If a source file cannot be found, and the user clicks the item to locate it,
Debugger now attempts to query all volumes for the corresponding filename.
If any are found, they are presented in a menu, along with an option to
locate the file manually as before (since the file may potentially live on
an unindexed volume). If no matches are found via query, we fall through to
the file panel directly as before.


# 94aa0c62 16-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Fix #10764 (again).

- When terminating TeamWindow, if InspectorWindow is still active,
ensure that it's also quit at that point. Otherwise, it was
possible for the inspector window to receive the quit message from
the main application's shutdown process after TeamDebugger had
already been terminated, leading to a crash when the window tried to
release its current memory block, since the block manager had
already been destroyed by that point.


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


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

Relocate "Stop on image load" option.

Rather than a menu item, it's now a checkbox located in the breakpoints
tab.


# 5b402aa2 04-Jul-2013 Rene Gollent <anevilyak@gmail.com>

Implement #9855.

The Team menu now has a menu item allowing one to tell the debugger to
stop whenever a new executable image is loaded by the debugged team.
This setting is not currently persisted, though that can be changed if
desired.


# a7376ac1 30-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Fix remaining flickering for #9841.

- Revert hrev45802. However, implement the same essential logic in
the TeamWindow itself, and have it guard the StackTraceView,
VariablesView, and step control buttons. This fixes flickering
in between short steps since it prevents the intermediate clear
from happening unnecessarily.
- Implement appropriate guards for the interim wait state.


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


# 2214cb57 25-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Fix regression introduced in 21d8063.

We can't use BPath to get the filename for the source file path embedded
in the debug information, since it may be relative, which BPath will try to
normalize.


# b1975a59 21-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Implement #9775.

- When possible, SourceView now adds a context menu option to switch
between source and disassembly. If the disassembled code is not yet
available, it is asynchronously requested. Adjusted SourceView::Listener
and implementing subclasses accordingly to make that request feasible.

- Adjust TeamWindow to correctly deal with the possibility of the
function source code being available but not loaded.


# ecd9ecb1 21-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Add missing error check.


# 21d80635 21-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Slight tweak to located file handling.

- When the user helps locate a missing source file, verify that the
source and located file names match. If they don't, prompt the user to
verify that they did in fact intend to choose the file in question.
Helps avoid accidentally clicking the wrong file when performing
location.


# 944297b8 13-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Add hooks for actually showing/managing exception config window.


# 8835205c 29-May-2013 Rene Gollent <anevilyak@gmail.com>

Sentence casing corrections, no functional change.


# dd33ff02 29-May-2013 Rene Gollent <anevilyak@gmail.com>

Add menu item to request team restart.


# a6543e68 27-May-2013 Rene Gollent <anevilyak@gmail.com>

When an exception/breakpoint is hit, activate...

...the team window. Resolves #9797.


# 6b308faf 19-May-2013 Rene Gollent <anevilyak@gmail.com>

Implement #9777.

- Introduce class BreakpointProxy which acts as a container for
either a breakpoint or a watchpoint. BreakpointsTableModel now stores
a single list of these rather than separate Breakpoint/Watchpoint lists.
- Switch BreakpointListView to allow multiple selection mode, and
consequently change selection/listener interfaces to use a list of
BreakpointProxy objects. Adjust implementors accordingly.
- Rework breakpoint list columns to better mesh with a unified display
of breakpoint and watchpoint information.
- Add an input filter to handle removing breakpoints when the delete
key is pressed.


# 42d73aba 11-May-2013 Rene Gollent <anevilyak@gmail.com>

Add "Run to cursor" context action.

- UserInterfaceListener/TeamDebugger: Extend ThreadActionRequested()
to allow passing a target address. Adjust TeamDebugger's
implementation accordingly.

- ThreadHandler: The MSG_THREAD_RUN action can now optionally take an
address parameter to run until. If this is specified, set a temporary
breakpoint for said address before resuming execution.

- SourceView: On right click, present a context menu showing possible
actions for the current line if we're currently in a stopped thread.
For the moment, this only yields the "Run to cursor" action, but
more will be added in the future.


# d4f100e5 10-May-2013 Stephan Aßmus <superstippi@gmx.de>

Unify spacing

* Unify split width
* Make break point list attach to tab frame, apply default insets and spacing to buttons.


# 754fcddd 10-May-2013 Stephan Aßmus <superstippi@gmx.de>

Remove the spacing between menu bar and contents

* The spacing is already present due to the insets
of the contents, so there was some extra room
between the menu and the contents which this
commit removes.


# 9f5437a4 10-May-2013 Stephan Aßmus <superstippi@gmx.de>

Changed hierarchy of splits to give variables/registers more room


# abb7ea65 10-May-2013 Stephan Aßmus <superstippi@gmx.de>

Renamed File menu to Team and Quit to Close.

There isn't actually a file on disk somewhere. And Quit
could have been mistaken to quit the entire Debugger
application, as Quit in File usually does with applications.
However, it will only close the that team window and only
quit Debugger if it was the last open window.


# df720531 07-May-2013 Rene Gollent <anevilyak@gmail.com>

Use B_USE_SMALL_{SPACING,INSETS} as suggested by Axel.


# a540b985 23-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Notify user in GUI when debug report has been written.


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

Factor out report name generation as a utility function.


# ba71ae75 21-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Prompt user for location to save report to.


# 37ddff87 21-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Add option to save a debug information report.

- The Tools menu now contains an option to save a debug report for the currently
debugged team. For now this report contains the following:
A list of all loaded images, their base address and their size.
A list of all threads active in their team, and their state.
* For each thread that is in a debug or exception state,
a stack trace, and a register dump at the top frame will also be emitted.

Feedback on report format + included details welcome.

For now, when the option is requested, the report is saved to the desktop
with an auto-generated name based on the target team and the current
date/time.


# 5ad155d7 12-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Use Architecture information in WatchPromptWindow.

- We now check what types of watchpoints the target CPU supports
and limit the UI accordingly.


# 12c53499 07-Nov-2012 Rene Gollent <anevilyak@gmail.com>

More UI support for watchpointgs.

- BreakpointTableModel now encapsulates both breakpoints and watchpoints.
- Extended BreakpointView and TeamWindow to handle enable/disable/removing
watchpoints as well.


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


# 7483c98d 05-Aug-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger (and some friends): 64 bit fixes


# 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


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

Extend MSG_SHOW_INSPECTOR_WINDOW to allow specifying an initial address.


# 2a8e9bb8 14-Jul-2012 Rene Gollent <anevilyak@gmail.com>

Fix missing break statement. CID 611232.


# f55410e1 13-Jul-2012 Rene Gollent <anevilyak@gmail.com>

Fix uninitialized member variable.

- This would randomly prevent the inspector window from being usable
since we wouldn't create it, thinking it already existed.


# e0a6e07b 28-May-2012 Rene Gollent <anevilyak@gmail.com>

Minor cleanup, no functional change.


# c2d1fc4f 27-May-2012 Rene Gollent <anevilyak@gmail.com>

Fix updating of source path.

Factor out updating of the source path view into a dedicated function,
and fix some errors that would sometimes result in the text not updating
properly when switching stack frames, particularly if the target frame
didn't have source code available.


# 119c90fc 30-Apr-2012 Rene Gollent <anevilyak@gmail.com>

Fix remaining part of #8094.

Set an explicit minimum size on the source path view, in order to prevent it
from unduly influencing the initial size constraints of the window. (Belatedly)
fixes the remaining part of #8094.


# 11102e38 19-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Reworked GUI settings storage.

- Simplified things so each window simply records all its settings into
a BMessage, which is what ultimately goes into the actual UI settings.

- Added settings storage/retrieval to the various sub views of the
team window. This means that the column widths/positioning on all
views hosting a column list view are now also preserved and restored.


# 0c07f01e 18-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Modify TeamWindow to use factored out archiving functions.


# 23829e4e 17-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Adjust SaveSettings() to take into account split view method naming changes.

Remove unnecessary saving of collapsible property.


# 7449551d 16-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Save/restore the collapsible and visible properties on the splitters as well.


# 72d14046 13-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Remember the last source location path chosen by the user.

- When the user chooses the location of a source file via the file panel,
we now preserve the file panel so it can remember its previous location
when invoked again.

Resolves the other part of #8095.


# a2db8c56 06-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Truncate the message to locate the source path if it currently wouldn't fit within
the string view's bounds. Partially resolves #8094.



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


# 58f5b04b 06-Nov-2011 Rene Gollent <anevilyak@gmail.com>

- Ensure that team and inspector window are locked when save/restoring settings.
- Don't allow QuitRequested() to terminate the TeamWindow directly. GraphicalUserInterface
will (and must) do so in order to ensure that the window object is still around
when calling SaveSettings() on it.

Should resolve #8091.



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


# 3b8c2d3a 06-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Fix typo that was preventing the splitter between the thread list and stack trace view from being saved/restored properly.



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


# 787740e0 03-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Save and restore the inspector window's frame + mode settings.



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


# 6c59d52b 02-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Rework _Save/LoadSplitSettings() to generally work for split views with any number of splits.



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


# c1f96856 02-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Cleanup, no functional change.



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


# 6877edf8 02-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Also save/restore the image and thread splitters.



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


# ce90d2d1 02-Nov-2011 Rene Gollent <anevilyak@gmail.com>

We now save and restore the main splits of the team window. The tab split
will be joining them shortly.



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


# 04f0e3d3 02-Nov-2011 Rene Gollent <anevilyak@gmail.com>

* Simplify GUITeamUISettings to just use variants mapped by string keys. The
Setting classes didn't wind up being quite as useful for that purpose as
I'd originally hoped, so they remain with their primary purpose of
programmatically generating menus and such.

* When GraphicalUserInterface constructs the team window, immediately start
the message loop. This allows us to reorder startup so we only activate
the user interface after having restored settings.

* TeamWindow now saves/restores its frame on a per-team basis.



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


# 2f47fe6c 16-Jul-2011 Rene Gollent <anevilyak@gmail.com>

Need to acquire a reference here as well.



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


# 07ec2fab 15-Jul-2011 Rene Gollent <anevilyak@gmail.com>

Resolve TODO: If a function is selected by other means than the stack
trace view, but we have a call frame matching that function, then jump
to that frame in the stack trace view as well.



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


# 9186e23d 26-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Rearrange _HandleSourceCodeChanged() a bit so it correctly handles updating
the current source path when changing frames in all cases.



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


# 80480954 18-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Add support for byte swapping to the memory inspector.



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


# 4529df90 17-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Add a keyboard shortcut for Run to accompany the ones for the different step actions.


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


# 2acfac81 15-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Refactored MemoryView to be more flexible ; it can now show a configurable
choice of hexadecimal and/or character displays of the memory data, with
different digit grouping sizes. Still needs some work but is basically
functional.



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


# 689f750f 12-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Actually create the memory block manager in TeamDebugger, and add a menu item
allowing one to bring up the inspector. This gets us as far as successfully
retrieving memory data from the target team and passing it on to any listeners.
Right now there's not much to see though, as the memory view to visualize the
data is not yet implemented.



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


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

Replaced uses of obsolescent BReference[able] API.


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


# 27a115f6 14-Dec-2010 Rene Gollent <anevilyak@gmail.com>

Revert r39846 and r39847.



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


# 95acfc22 13-Dec-2010 Rene Gollent <anevilyak@gmail.com>

Added keyboard shortcut for Run to go with the shortcuts for Step Over/Step Into.


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


# 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


# 0324fc408c217619b188747ab635be946d0d1247 14-Aug-2015 Rene Gollent <rene@gollent.com>

Debugger: Add status bar to main team window.

TeamWindow:
- Add a status bar in the form of a string view to the bottom of the
window, along with a helper function to request updating it.


# 10bbf8cb8d8bc8eb9e63e87be8dd21f9b73c7937 26-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: TeamWindow refactor.

- When asked to load settings, post a message and do so in the window's
message loop. This avoids a lock order reversal when asked to do so
later as a result of exec() changing the target image out.


# 754b42a5a19e0f183356ebf5efab39529f7fcbb0 25-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: Add rename event for Team.

Team:
- Add listener hook and event type for rename events. These occur on exec()
since at this point we're running a different executable.

TeamWindow:
- Factor out code for generating window title into a helper, and use from both
window initialization and newly implemented rename listener hook.


# 473b2c6ac95c71ec791949fe7dab01668d62fe44 23-Jul-2015 Rene Gollent <rene@gollent.com>

Debugger: Add VariablesView listener hook.

VariablesView::Listener:
- Add hook for requesting value node value updates.

TeamWindow:
- Implement VariablesView listener hook and forward accordingly to
TeamDebugger.


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


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


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


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


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

Debugger: Cleanup.

Team:
- Remove expression evaluation event / listener hook. This doesn't
really belong to the Team anyways.

UserInterfaceListener:
- ExpressionEvaluationRequested() now takes an ExpressionInfo object
rather than the individual subcomponents.

ExpressionEvaluationJob:
- Notification of expression evaluation completion is now handled
via the info object's listener interface rather than the Team.

Others:
- Adjust all users of expressions to set themselves up as
ExpressionInfo::Listener subclasses, and consequently add themselves
to the respective info object when requesting evaluation. This
significantly simplifies various things, and also ensures that no
one accidentally gets notified of an expression they didn't actually
ask for, which could occur with the previous Team-based listener
interface. Make all other required adjustments for new interface
usage.

No functional change intended.


# b7e72db3cc4ff5bb929a83cdf8a47fbd347615ed 02-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Implement first part of #11387.

VariablesView:
- The view now keeps a mapping of a list of expressions associated
with functions.
- Add actions for adding/removing expressions to variables context menu.
- When setting up to show a new stack frame, also add corresponding expression
nodes and request their evaluation.
- Extend VariablesView::Listener interface to also encompass expression
evaluation requests.
- Don't add context actions for expression nodes.

TeamWindow:
- Implement VariablesView::Listener expression evaluation hook and forward
responses along.


# 11832b28af25aef0bd53510cdc81f41efd88b88a 05-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Add expression prompt window handling.

TeamWindow now handles the messages for summoning/dismissing
the expression prompt window.


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


# c3f81329bb1bfcb22b0b59c3a7f66667c6f0c04b 29-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Implement expression variable value resolution.

General:
- Resolving variable values requires both a stack frame and a CPU state.
Adjust all interfaces and callers accordingly.

ExpressionEvaluationJob:
- Pass additional parameters needed for variable value resolution.
- If variable resolution is desired, ExpressionEvaluationJob now
creates a temporary ValueNodeManager for that purpose.
- If the expression parser returns a value node pointer that needs
to be resolved, schedule a corresponding job and wait.

CLanguageExpressionEvaluator:
- Clean up some leftovers that were preventing variable names from being
handled properly in some cases.
- Implement handling of identifier names. These are now looked up against
the value node graph of the active node manager, and if found, corresponding
values are retrieved. If the value has not yet been resolved, an exception
is thrown to ask that to be done.

This gets value resolution working for basic local variables and function
parameters, and consequently, #9712. Structure/class members and/or pointer
indirection aren't yet handled.


# fdb2d5d961fed2e838859db047e284795cf5cb30 29-Oct-2014 Rene Gollent <rene@gollent.com>

Debugger: Adapt expression eval users to async interface.

Factor out message constant for expression evaluation completion,
as multiple places will be using that.

ExpressionEvaluationWindow:
- Check for expression match immediately in listener hook, and
don't bother dispatching to the message loop in such a case.
Simplifies some of the other code.

InspectorWindow / WatchPromptWindow:
- Rather than attempting to evaluate an expression directly,
we now defer to the async interface. Clean up and adjust accordingly.

TeamWindow:
- Adjust window creation calls due to parameter changes.

This leaves only the CLI dump memory command to be adapted.


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

Debugger: Use async request in expression window.

- ExpressionEvaluationWindow now uses the aforementioned
request interface to ask the debugger core to perform evaluation
on its behalf, rather than doing so itself directly.

The remaining users of the expression evaluator will be adjusted in
following commits.


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

Debugger: Locking cleanups.

- Using BMessenger as an indirect lock is unnecessary, as
BLooper::Lock() checks if the current looper is valid via the global
looper list directly.
- Fix race conditions. When asked to show various subwindows, lock them
before calling Activate(), as the window could otherwise potentially
quit in between us checking pointer validity and calling Activate().
- _GetActiveSourceLanguage() needs to acquire a reference to the language
object in the case where it's retrieved from the active source code.
Otherwise, an unbalanced release would take place when creating the
expression window, leading to crashes.

Thanks to Stephan for reviewing.


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

Debugger: Hook in expression evaluation window.

- Adjust expression window interface so it can report being closed
to TeamWindow or whoever else invokes it.
- Add a menu item to Tools to request expression evaluation. This
now attempts to get the expression evaluator for the current language,
and subsequently opens the expression evaluation window with it.

With these changes, basic numerical expression evaluation works.
Resolution of variable values and condition operators aren't yet
handled.


# 432da9e337cd73bf024331fa048e4aec12dcbd5b 29-Aug-2014 Rene Gollent <rene@gollent.com>

Debugger: Implement remaining part of #11033.

TeamDebugInfo:
- Add function to invalidate a source entry's file mapping.
UserInterfaceListener:
- Add listener hook to be able to invoke the aforementioned invalidate.
Add corresponding implementation in TeamDebugger.
FileManager:
- When asked to locate a source entry, invalidate any existing mapping
first.
TeamWindow:
- Always allow choosing an alternate source file.
- If we already have an existing source mapping, invalidate it first
before attempting to establish a new one.


# 36f126fd5a352cb25f196d1cbb428374954321a7 02-Aug-2014 Rene Gollent <rene@gollent.com>

Debugger: Fix #11088.

- When walking through and querying volumes for a missing source file,
store the error and report it back in the completion message rather
than exiting the query worker. Otherwise, if something went wrong
with the queries, it'd potentially occur that we'd never prompt the
user to locate the file, as the UI would never be notified that
the background work was complete.


# 712e51d79afaf96d4ccca91f3a2cd9197c98185d 11-Jul-2014 Rene Gollent <rene@gollent.com>

Build fix.


# e4adab2698a68cf8d86b79788e8e392ca6b35442 11-Jul-2014 Rene Gollent <rene@gollent.com>

Debugger: Fix minor issue noted in #11003.

- Reset tooltip when it's no longer needed (i.e. if the file path changes).
Otherwise, we'd erroneously show the old tooltip if the new path was short
enough to no longer be truncated, as would often happen after locating a
missing source file.


# 2f605e9fd7440ed162317844cca61dc8540da5d0 28-Jun-2014 Rene Gollent <rene@gollent.com>

TeamWindow: Fix accidental double message sending.

- When we explicitly handle sending B_COPY/B_SELECT_ALL, don't
then pass control back to BWindow::DispatchMessage(), as that will
wind up sending the message to the target view twice.


# 3eadb2cc1d8b5b797574924ba0046dc223bfa40e 26-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Improvements to hrev47421.

- Isolate the filesystem query/result list building into a separate
worker thread in order to prevent blocking the window thread in
case the query winds up being a bit more time consuming. This
doesn't yet handle intelligent prefetching (and associated can of
synchronization worms), but that will come once time permits.
- Also fixes a missing break statement introduced in the aforementioned
commit, though that one shouldn't have caused any actual harm.


# 2661ce4605a59cb594f0c6afbcde427369dceedc 24-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Implement #10970.

- If a source file cannot be found, and the user clicks the item to locate it,
Debugger now attempts to query all volumes for the corresponding filename.
If any are found, they are presented in a menu, along with an option to
locate the file manually as before (since the file may potentially live on
an unindexed volume). If no matches are found via query, we fall through to
the file panel directly as before.


# 94aa0c624b4689a4676236f06c43273ffe40a5c9 16-Jun-2014 Rene Gollent <rene@gollent.com>

Debugger: Fix #10764 (again).

- When terminating TeamWindow, if InspectorWindow is still active,
ensure that it's also quit at that point. Otherwise, it was
possible for the inspector window to receive the quit message from
the main application's shutdown process after TeamDebugger had
already been terminated, leading to a crash when the window tried to
release its current memory block, since the block manager had
already been destroyed by that point.


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


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

Relocate "Stop on image load" option.

Rather than a menu item, it's now a checkbox located in the breakpoints
tab.


# 5b402aa2a39f2c247fec888b41980623d4a0f042 04-Jul-2013 Rene Gollent <anevilyak@gmail.com>

Implement #9855.

The Team menu now has a menu item allowing one to tell the debugger to
stop whenever a new executable image is loaded by the debugged team.
This setting is not currently persisted, though that can be changed if
desired.


# a7376ac17537ebef664373fada57d5d75ac2e818 30-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Fix remaining flickering for #9841.

- Revert hrev45802. However, implement the same essential logic in
the TeamWindow itself, and have it guard the StackTraceView,
VariablesView, and step control buttons. This fixes flickering
in between short steps since it prevents the intermediate clear
from happening unnecessarily.
- Implement appropriate guards for the interim wait state.


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


# 2214cb57eeed6481d73b5ef887b3ce27d47eaf8f 25-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Fix regression introduced in 21d8063.

We can't use BPath to get the filename for the source file path embedded
in the debug information, since it may be relative, which BPath will try to
normalize.


# b1975a590faee9dc91f0a6bc626bc5d84475eb24 21-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Implement #9775.

- When possible, SourceView now adds a context menu option to switch
between source and disassembly. If the disassembled code is not yet
available, it is asynchronously requested. Adjusted SourceView::Listener
and implementing subclasses accordingly to make that request feasible.

- Adjust TeamWindow to correctly deal with the possibility of the
function source code being available but not loaded.


# ecd9ecb13293362df16be49420d64bd2af649aef 21-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Add missing error check.


# 21d806359150aa1b069e9e2d6051da2ac92431ff 21-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Slight tweak to located file handling.

- When the user helps locate a missing source file, verify that the
source and located file names match. If they don't, prompt the user to
verify that they did in fact intend to choose the file in question.
Helps avoid accidentally clicking the wrong file when performing
location.


# 944297b82b37e8f24251b7a275db039467d7452e 13-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Add hooks for actually showing/managing exception config window.


# 8835205cf63fe0ee9f833d37ae40af2db9a2220a 29-May-2013 Rene Gollent <anevilyak@gmail.com>

Sentence casing corrections, no functional change.


# dd33ff02fd15252aaa31f57f0c37cc79c47a8e03 29-May-2013 Rene Gollent <anevilyak@gmail.com>

Add menu item to request team restart.


# a6543e68c04261c31456b503c50295148152edd9 27-May-2013 Rene Gollent <anevilyak@gmail.com>

When an exception/breakpoint is hit, activate...

...the team window. Resolves #9797.


# 6b308faf1ec990dd5bee3c870f6d654fd52a914f 19-May-2013 Rene Gollent <anevilyak@gmail.com>

Implement #9777.

- Introduce class BreakpointProxy which acts as a container for
either a breakpoint or a watchpoint. BreakpointsTableModel now stores
a single list of these rather than separate Breakpoint/Watchpoint lists.
- Switch BreakpointListView to allow multiple selection mode, and
consequently change selection/listener interfaces to use a list of
BreakpointProxy objects. Adjust implementors accordingly.
- Rework breakpoint list columns to better mesh with a unified display
of breakpoint and watchpoint information.
- Add an input filter to handle removing breakpoints when the delete
key is pressed.


# 42d73abab96321f93eae63d9ea6db5b844f1e216 11-May-2013 Rene Gollent <anevilyak@gmail.com>

Add "Run to cursor" context action.

- UserInterfaceListener/TeamDebugger: Extend ThreadActionRequested()
to allow passing a target address. Adjust TeamDebugger's
implementation accordingly.

- ThreadHandler: The MSG_THREAD_RUN action can now optionally take an
address parameter to run until. If this is specified, set a temporary
breakpoint for said address before resuming execution.

- SourceView: On right click, present a context menu showing possible
actions for the current line if we're currently in a stopped thread.
For the moment, this only yields the "Run to cursor" action, but
more will be added in the future.


# d4f100e56ef82d007ed3428bd8b7d0838425477f 10-May-2013 Stephan Aßmus <superstippi@gmx.de>

Unify spacing

* Unify split width
* Make break point list attach to tab frame, apply default insets and spacing to buttons.


# 754fcddd724cefcc1b30c0cac40e8e461ca59f53 10-May-2013 Stephan Aßmus <superstippi@gmx.de>

Remove the spacing between menu bar and contents

* The spacing is already present due to the insets
of the contents, so there was some extra room
between the menu and the contents which this
commit removes.


# 9f5437a40bd3b3fcbccfd619e0d8c4257d237445 10-May-2013 Stephan Aßmus <superstippi@gmx.de>

Changed hierarchy of splits to give variables/registers more room


# abb7ea65120d761dc4dedc37b6c79eff80f8b649 10-May-2013 Stephan Aßmus <superstippi@gmx.de>

Renamed File menu to Team and Quit to Close.

There isn't actually a file on disk somewhere. And Quit
could have been mistaken to quit the entire Debugger
application, as Quit in File usually does with applications.
However, it will only close the that team window and only
quit Debugger if it was the last open window.


# df720531e35c3f78df963af874ddf11970deaebe 07-May-2013 Rene Gollent <anevilyak@gmail.com>

Use B_USE_SMALL_{SPACING,INSETS} as suggested by Axel.


# a540b9852773e048812d75a9e239bd7b5a43a822 23-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Notify user in GUI when debug report has been written.


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

Factor out report name generation as a utility function.


# ba71ae755234e05c8a3b8563a680ad487e75aa45 21-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Prompt user for location to save report to.


# 37ddff87ec1e472d4ec6ca9863d41a01f5347037 21-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Add option to save a debug information report.

- The Tools menu now contains an option to save a debug report for the currently
debugged team. For now this report contains the following:
A list of all loaded images, their base address and their size.
A list of all threads active in their team, and their state.
* For each thread that is in a debug or exception state,
a stack trace, and a register dump at the top frame will also be emitted.

Feedback on report format + included details welcome.

For now, when the option is requested, the report is saved to the desktop
with an auto-generated name based on the target team and the current
date/time.


# 5ad155d720823ffacbab56f4dff94f41d32d60d4 12-Nov-2012 Rene Gollent <anevilyak@gmail.com>

Use Architecture information in WatchPromptWindow.

- We now check what types of watchpoints the target CPU supports
and limit the UI accordingly.


# 12c53499e76d8d0e63a94eb738bbe13f387cb0dd 07-Nov-2012 Rene Gollent <anevilyak@gmail.com>

More UI support for watchpointgs.

- BreakpointTableModel now encapsulates both breakpoints and watchpoints.
- Extended BreakpointView and TeamWindow to handle enable/disable/removing
watchpoints as well.


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


# 7483c98dece8f3606fc5d3fd746c0544f7e4b6dd 05-Aug-2012 Ingo Weinhold <ingo_weinhold@gmx.de>

Debugger (and some friends): 64 bit fixes


# 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


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

Extend MSG_SHOW_INSPECTOR_WINDOW to allow specifying an initial address.


# 2a8e9bb83d29cb06a5846ddc42fa1606d831a597 14-Jul-2012 Rene Gollent <anevilyak@gmail.com>

Fix missing break statement. CID 611232.


# f55410e169aa22948520f94ec238045f9de05b27 13-Jul-2012 Rene Gollent <anevilyak@gmail.com>

Fix uninitialized member variable.

- This would randomly prevent the inspector window from being usable
since we wouldn't create it, thinking it already existed.


# e0a6e07bb31229a8d7277e8d7bdfffccdb35ed3e 28-May-2012 Rene Gollent <anevilyak@gmail.com>

Minor cleanup, no functional change.


# c2d1fc4ffa7236283061c6358c31f9067c672ca6 27-May-2012 Rene Gollent <anevilyak@gmail.com>

Fix updating of source path.

Factor out updating of the source path view into a dedicated function,
and fix some errors that would sometimes result in the text not updating
properly when switching stack frames, particularly if the target frame
didn't have source code available.


# 119c90fc35b013c6def51b167a1212027ba49394 30-Apr-2012 Rene Gollent <anevilyak@gmail.com>

Fix remaining part of #8094.

Set an explicit minimum size on the source path view, in order to prevent it
from unduly influencing the initial size constraints of the window. (Belatedly)
fixes the remaining part of #8094.


# 11102e3848bcd78ce9a90478ad6992f966fae5c6 19-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Reworked GUI settings storage.

- Simplified things so each window simply records all its settings into
a BMessage, which is what ultimately goes into the actual UI settings.

- Added settings storage/retrieval to the various sub views of the
team window. This means that the column widths/positioning on all
views hosting a column list view are now also preserved and restored.


# 0c07f01eb643854a89794048c0954f1b0921b629 18-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Modify TeamWindow to use factored out archiving functions.


# 23829e4e74d2be9a24fcacb60263a60e9e94c0bc 17-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Adjust SaveSettings() to take into account split view method naming changes.

Remove unnecessary saving of collapsible property.


# 7449551dab875b2dcadf2858a8853a009ee95231 16-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Save/restore the collapsible and visible properties on the splitters as well.


# 72d140460db0cd36f2eb0b540980b5d0ddab6d9b 13-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Remember the last source location path chosen by the user.

- When the user chooses the location of a source file via the file panel,
we now preserve the file panel so it can remember its previous location
when invoked again.

Resolves the other part of #8095.


# a2db8c56536d287b4a82b77aa81303dac78e6836 06-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Truncate the message to locate the source path if it currently wouldn't fit within
the string view's bounds. Partially resolves #8094.



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


# 58f5b04b3ba31bb0be91a590a560b97b40ffda4d 06-Nov-2011 Rene Gollent <anevilyak@gmail.com>

- Ensure that team and inspector window are locked when save/restoring settings.
- Don't allow QuitRequested() to terminate the TeamWindow directly. GraphicalUserInterface
will (and must) do so in order to ensure that the window object is still around
when calling SaveSettings() on it.

Should resolve #8091.



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


# 3b8c2d3aad058311cfcc1fd909a2780d0610d321 06-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Fix typo that was preventing the splitter between the thread list and stack trace view from being saved/restored properly.



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


# 787740e0f9b9fc64b8ecf635e7b667699e5f80ea 03-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Save and restore the inspector window's frame + mode settings.



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


# 6c59d52b62c5d95233ef1f8403665c1e49e1dd4b 02-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Rework _Save/LoadSplitSettings() to generally work for split views with any number of splits.



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


# c1f96856b70b826914bd9e03d39be6d3cd97f9fa 02-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Cleanup, no functional change.



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


# 6877edf850fb21042686775c2c2c9d64c7c754f8 02-Nov-2011 Rene Gollent <anevilyak@gmail.com>

Also save/restore the image and thread splitters.



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


# ce90d2d1645b3ec8436bb639f27aaddf3e16f8eb 02-Nov-2011 Rene Gollent <anevilyak@gmail.com>

We now save and restore the main splits of the team window. The tab split
will be joining them shortly.



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


# 04f0e3d37b9730b5e2934775a4efeaee73d8cf2e 02-Nov-2011 Rene Gollent <anevilyak@gmail.com>

* Simplify GUITeamUISettings to just use variants mapped by string keys. The
Setting classes didn't wind up being quite as useful for that purpose as
I'd originally hoped, so they remain with their primary purpose of
programmatically generating menus and such.

* When GraphicalUserInterface constructs the team window, immediately start
the message loop. This allows us to reorder startup so we only activate
the user interface after having restored settings.

* TeamWindow now saves/restores its frame on a per-team basis.



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


# 2f47fe6c8a070f3e57db70131d186158a0713246 16-Jul-2011 Rene Gollent <anevilyak@gmail.com>

Need to acquire a reference here as well.



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


# 07ec2fab0250e8783cf18d8e18d2e6a7e0bd2a56 15-Jul-2011 Rene Gollent <anevilyak@gmail.com>

Resolve TODO: If a function is selected by other means than the stack
trace view, but we have a call frame matching that function, then jump
to that frame in the stack trace view as well.



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


# 9186e23d5a959e528876dc4f56bcdb88e14285d2 26-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Rearrange _HandleSourceCodeChanged() a bit so it correctly handles updating
the current source path when changing frames in all cases.



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


# 80480954e22ab9345c14079a0974e943b63afc58 18-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Add support for byte swapping to the memory inspector.



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


# 4529df90fe6e6f05a4d4e471ca49819e192abea1 17-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Add a keyboard shortcut for Run to accompany the ones for the different step actions.


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


# 2acfac81cd0853fb6d6d505e9435f7caba54824e 15-Jun-2011 Rene Gollent <anevilyak@gmail.com>

* Refactored MemoryView to be more flexible ; it can now show a configurable
choice of hexadecimal and/or character displays of the memory data, with
different digit grouping sizes. Still needs some work but is basically
functional.



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


# 689f750f2d367f22feca1efec937384b9ec17663 12-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Actually create the memory block manager in TeamDebugger, and add a menu item
allowing one to bring up the inspector. This gets us as far as successfully
retrieving memory data from the target team and passing it on to any listeners.
Right now there's not much to see though, as the memory view to visualize the
data is not yet implemented.



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


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

Replaced uses of obsolescent BReference[able] API.


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


# 27a115f6685cc7821dd2ab6d528d6f3abe70158d 14-Dec-2010 Rene Gollent <anevilyak@gmail.com>

Revert r39846 and r39847.



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


# 95acfc22259867d8bcbd5c24a3ee5cfdfd9437fc 13-Dec-2010 Rene Gollent <anevilyak@gmail.com>

Added keyboard shortcut for Run to go with the shortcuts for Step Over/Step Into.


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


# 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