History log of /haiku/src/apps/debugger/user_interface/gui/team_window/SourceView.cpp
Revision Date Author Comments
# c0936b5a 11-Jan-2018 Rene Gollent <rene@gollent.com>

Debugger: Another set of #13800 fixes.

AbstractTable/Table/TreeTable:
- Let BColumnListView take care of deleting columns. The previous
approach was resulting in the columns being leaked.

Debugger:
- Don't detach the UI reference, as TeamDebugger will acquire its own.

GraphicalUserInterface:
- Cleanup of file panel handler.

SourceView:
- Clean up marker manager.

*Roster:
- Clean up registered objects in destructors.

GlobalTypeLookup:
- Clean up hash tables.

NetworkTargetHostInterfaceInfo:
- Fix reference handling for settings.


# 3995592c 10-Jan-2018 Rene Gollent <rene@gollent.com>

Debugger: Fix #13939, more work on #13800.

- Fix various cases where OpenHashTables weren't being cleared properly.
- Fix various reference counting errors.
- Simplify FileManager reference handling.
- Fix bug in LocatableDirectory where the directory named '/' would have its
name returned as empty. This would lead to failed lookups for entries already
in the table, and ultimately corrupted the hash table when deleting unused
entries, leading to #13939. This was previously never noticed due to the
entries not being freed properly.
- AbbreviationTable wasn't clearing its entries.


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


# 4d9388f3 01-Jan-2015 Rene Gollent <rene@gollent.com>

Debugger: Adjustments to syntax highlighter.

SyntaxHighlighter/CLanguageFamilySyntaxHighlighter/SourceView:
- TeamTypeInformation is now passed as a parameter when requesting parsing,
so highlighters can make use of it to identify types. Adjust callers.

CLanguageFamilySyntaxHighlightInfo:
- Use TeamTypeInformation to check if identifiers map to types, and highlight
accordingly if they do.


# 0f45a480 28-Dec-2014 Rene Gollent <rene@gollent.com>

Debugger: Fix #11669.

SourceView:
- When calculating line widths for scrollbar calculation purposes, tabstop
offsets weren't being correctly taken into account, which would result
in lines being computed as shorter than they actually were. Depending
on the content of the file, the horizontal scrollbar would consequently
be configured improperly in some cases.


# 310e80e0 01-Dec-2014 Rene Gollent <rene@gollent.com>

Debugger: SourceView cleanups.

SourceView:
- Now that we need to track the current text drawing position for syntax
purposes anyways, get rid of the previous inefficient hack to handle
tabstops, and instead adjust for them on the fly. This both avoids
quite a bit of string copying/reformatting, and eliminates the need to
adjust the syntax highlight offsets to compensate for the aforementioned
reformatting.
- Fix syntax color for string literals.


# 177202d8 29-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Use syntax highlight info for source code view.

SourceView:
- Request syntax highlight information when new source file is set.
- Adjust _FormatLine() to also patch raw syntax highlights to match
up with calculated tabstops.
- Draw strings in pieces corresponding to how they're broken up in
terms of syntax highlights with colors.


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

Debugger: MarkerView tweaks.

- Draw conditional breakpoints in a different color from regular
ones for easy visual differentiation.
- Right clicking on an existing breakpoint marker now brings up the
condition editing window.


# 8832917f 11-Jul-2013 Rene Gollent <anevilyak@gmail.com>

Debugger: SourceView: Fix several drawing bugs.

- MarkerView: If the view was resized, and the newly revealed region was
after the last source line, it wouldn't be redrawn properly.
- TextView: Reset low color for painting the region after the
source. Otherwise, if either the instruction pointer or a breakpoint
were at the last line of the current source, the empty space after would
be filled in that color rather than the background color.


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

Fix redrawing issue.

If we had a source code change that resulted in a new file that was shorter than
the entire view, the section below the last line wouldn't get repainted properly.


# 48411285 29-Jun-2013 Rene Gollent <anevilyak@gmail.com>

MarkerView: rework drawing to reduce flicker.

Addresses another part of #9841.


# 97a83952 29-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Reduce drawing flicker in SourceView.

Instead of relying on the app_server to handle the background color, do so
ourselves. This allows somewhat more granular control, and helps reduce
flicker on drawing when single stepping.


# 6eb68a04 23-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Slight tweak to inactive instruction pointer highlight color.


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


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

Style fix.


# 77d2c53c 19-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Slight tweak to instruction pointer highlight drawing.

- When highlighting lines that match IPs in the current stack trace,
draw those which aren't from the currently selected frame in a lighter
color, so as to make it more clear which is which when multiple calls
are visible at once.


# 72873800 15-Jun-2013 Rene Gollent <anevilyak@gmail.com>

BreakpointListView/SourceView: ignore hidden breakpoints.


# d1a797e6 17-May-2013 Rene Gollent <anevilyak@gmail.com>

Add context action to open source file to SourceView.

Implements #9776.


# ed6d6081 16-May-2013 Rene Gollent <anevilyak@gmail.com>

Implement "Set next statement".

Adds a context menu command allowing the user to specify that the active
thread should be set to execute the specified statement next, by
updating its instruction pointer. Implements second part of #9709.

Note that care needs to be taken with this feature for now, as it
doesn't yet sanity check the requested address. Setting the target
to e.g. a statement in an entirely different function is likely to have
unpredictable/unstable effects on the debugged program.


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


# c7b441ac 02-May-2013 Rene Gollent <anevilyak@gmail.com>

Cleanup.


# 22dc5f2b 02-May-2013 Rene Gollent <anevilyak@gmail.com>

Add tooltips to breakpoint marker view.

- If the user hovers over a valid breakpoint marker location, emit a
tooltip message indicating the action that can be taken.


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

Debugger (and some friends): 64 bit fixes


# 7a574c6c 16-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Check that a source file is in fact available before attempting to use it to
generate a clipping name. Fixes #7704.



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


# 98dcc2e8 07-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Most useless cosmetic change. Ever.


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


# 4d9388f38924cffde0db7bf3d8e02be5cd4505e6 01-Jan-2015 Rene Gollent <rene@gollent.com>

Debugger: Adjustments to syntax highlighter.

SyntaxHighlighter/CLanguageFamilySyntaxHighlighter/SourceView:
- TeamTypeInformation is now passed as a parameter when requesting parsing,
so highlighters can make use of it to identify types. Adjust callers.

CLanguageFamilySyntaxHighlightInfo:
- Use TeamTypeInformation to check if identifiers map to types, and highlight
accordingly if they do.


# 0f45a4808764ba3bbe4b7fdc13d63c146d01edfc 28-Dec-2014 Rene Gollent <rene@gollent.com>

Debugger: Fix #11669.

SourceView:
- When calculating line widths for scrollbar calculation purposes, tabstop
offsets weren't being correctly taken into account, which would result
in lines being computed as shorter than they actually were. Depending
on the content of the file, the horizontal scrollbar would consequently
be configured improperly in some cases.


# 310e80e0b61dbd927d1d477c5b45e2d370937658 01-Dec-2014 Rene Gollent <rene@gollent.com>

Debugger: SourceView cleanups.

SourceView:
- Now that we need to track the current text drawing position for syntax
purposes anyways, get rid of the previous inefficient hack to handle
tabstops, and instead adjust for them on the fly. This both avoids
quite a bit of string copying/reformatting, and eliminates the need to
adjust the syntax highlight offsets to compensate for the aforementioned
reformatting.
- Fix syntax color for string literals.


# 177202d882abb78166900311d2057019dd7f12d0 29-Nov-2014 Rene Gollent <rene@gollent.com>

Debugger: Use syntax highlight info for source code view.

SourceView:
- Request syntax highlight information when new source file is set.
- Adjust _FormatLine() to also patch raw syntax highlights to match
up with calculated tabstops.
- Draw strings in pieces corresponding to how they're broken up in
terms of syntax highlights with colors.


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

Debugger: MarkerView tweaks.

- Draw conditional breakpoints in a different color from regular
ones for easy visual differentiation.
- Right clicking on an existing breakpoint marker now brings up the
condition editing window.


# 8832917f2c44f719acff0909010f8e639e8838ab 11-Jul-2013 Rene Gollent <anevilyak@gmail.com>

Debugger: SourceView: Fix several drawing bugs.

- MarkerView: If the view was resized, and the newly revealed region was
after the last source line, it wouldn't be redrawn properly.
- TextView: Reset low color for painting the region after the
source. Otherwise, if either the instruction pointer or a breakpoint
were at the last line of the current source, the empty space after would
be filled in that color rather than the background color.


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

Fix redrawing issue.

If we had a source code change that resulted in a new file that was shorter than
the entire view, the section below the last line wouldn't get repainted properly.


# 484112853509e3dedf57e3ef973ce37645c90849 29-Jun-2013 Rene Gollent <anevilyak@gmail.com>

MarkerView: rework drawing to reduce flicker.

Addresses another part of #9841.


# 97a83952a141b23800267ad942b2cd04a7933b04 29-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Reduce drawing flicker in SourceView.

Instead of relying on the app_server to handle the background color, do so
ourselves. This allows somewhat more granular control, and helps reduce
flicker on drawing when single stepping.


# 6eb68a043026d0d8194c81eb859548fa8716858d 23-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Slight tweak to inactive instruction pointer highlight color.


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


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

Style fix.


# 77d2c53ce721cd15192af6baa9830a60ee39bae2 19-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Slight tweak to instruction pointer highlight drawing.

- When highlighting lines that match IPs in the current stack trace,
draw those which aren't from the currently selected frame in a lighter
color, so as to make it more clear which is which when multiple calls
are visible at once.


# 7287380095821b335c1eb3151f20594bf1fcb22e 15-Jun-2013 Rene Gollent <anevilyak@gmail.com>

BreakpointListView/SourceView: ignore hidden breakpoints.


# d1a797e6cdcf558b80967fe29a9f9077c74b9245 17-May-2013 Rene Gollent <anevilyak@gmail.com>

Add context action to open source file to SourceView.

Implements #9776.


# ed6d6081c133128d1f2c297303f2c3d27d465d7b 16-May-2013 Rene Gollent <anevilyak@gmail.com>

Implement "Set next statement".

Adds a context menu command allowing the user to specify that the active
thread should be set to execute the specified statement next, by
updating its instruction pointer. Implements second part of #9709.

Note that care needs to be taken with this feature for now, as it
doesn't yet sanity check the requested address. Setting the target
to e.g. a statement in an entirely different function is likely to have
unpredictable/unstable effects on the debugged program.


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


# c7b441ac1ebe234e085235a4fafe2ef64f9a5d2e 02-May-2013 Rene Gollent <anevilyak@gmail.com>

Cleanup.


# 22dc5f2bcd29a89072c96785f3cac573e133ab74 02-May-2013 Rene Gollent <anevilyak@gmail.com>

Add tooltips to breakpoint marker view.

- If the user hovers over a valid breakpoint marker location, emit a
tooltip message indicating the action that can be taken.


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

Debugger (and some friends): 64 bit fixes


# 7a574c6cbd281371d0e21d7ec12c972c7f5271ec 16-Jun-2011 Rene Gollent <anevilyak@gmail.com>

Check that a source file is in fact available before attempting to use it to
generate a clipping name. Fixes #7704.



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


# 98dcc2e8a1ac13154acd319b289099334be0269d 07-Dec-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Most useless cosmetic change. Ever.


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