6155 Commits

Author SHA1 Message Date
Rene Gollent
41bf99064c Implement throw exception breakpoints.
The exception thrown checkbox now tries to set/clear breakpoints for
gcc2/4's respective exception throwing functions. Some tweaking still
needs to be done in order that these aren't visible in the breakpoints
list like normal user set breakpoints.
2013-06-15 14:51:16 -04:00
Rene Gollent
944297b82b Add hooks for actually showing/managing exception config window. 2013-06-15 14:51:16 -04:00
Rene Gollent
f4d95e0e19 Slightly rearrange BreakpointsView.
Line up the buttons along the bottom rather than the side.
Add button to invoke exception configuration window.
2013-06-15 14:51:15 -04:00
Rene Gollent
55fc8da143 Initial implementation of exception configuration window.
Doesn't actually take any actions yet, just presents a UI.
2013-06-15 14:51:14 -04:00
Jerome Duval
b97ad33697 StyledEdit: fixed statistics words count.
* Bug #9822 and actual fix suggested by DanielW.
2013-06-14 20:42:11 +02:00
John Scipione
2a95812e46 Mail: Tweak the height of the menu fields
Since hrev45725 we no longer resize fixed sized menu fields to their preferred
height in the constructor so as to be backwards compatible with the behavior on
BeOS R5. As a consequence though, the menu fields in Mail are now a bit too
tall so this commit tweaks the menu fields to be just a bit shorter matching
the height of the text controls.
2013-06-10 18:31:58 -04:00
Rene Gollent
7e6a958b0b Fix regression introduced in 6b308faf.
That commit switched to a single string column for representing
breakpoint locations, but neglected to update the case of a breakpoint
in a non-debug function to actually format the address as a string
appropriately, leading to those simply showing no data since then.
2013-06-07 22:32:32 -04:00
Rene Gollent
07842a5be0 Fall back to disassembly in case typecast fails.
Since some time now, we construct minimal dwarf image debug infos
for release images if they contain frame unwind information, in order
to allow using that to unwind the stack in as many cases as possible.
As such, it's  entirely possible that such an image may be asked for
statement information regarding a function that isn't in fact compiled
with debugging. As such, we need to simply fall back to disassembly
rather than failing entirely. Fixes setting breakpoints in such
functions (i.e. anything in a release version of libstdc++).
2013-06-07 22:16:38 -04:00
Rene Gollent
37e0f72711 Slight tweak to filtered node expansion logic.
When a filter is active, only expand parent nodes if either a) there is
only one matching parent, or 2) the match actually hit a function
contained in it. This allows the case where the intent of the filter is
to find a particular set of files or subdirectories to be handled more
efficiently.
2013-06-06 18:24:37 -04:00
Rene Gollent
8b98295a68 Redo filtering to use new RegExp classes.
ImageFunctionsView's filtering field now allows shell-style glob matches
rather than just simple direct string matches. Implements remaining
part of #7955.
2013-06-05 22:02:45 -04:00
Rene Gollent
faa0580b62 Optimizations to filter match drawing.
Store the filter match index on the SourcePathComponentNode so we can
retrieve it directly when drawing instead of having to recompute the
position of the match every time.
2013-06-05 22:02:44 -04:00
Rene Gollent
58535f5a9a Initial implementation of #9755.
- ImageFunctionsView now contains a text input allowing one to specify a
filter for its contained functions.
- When in filtered mode, the previous flattened view is used rather than
the hierarchical tree.
- The matching portion of the string is highlighted. However, currently
only simple string matches are supported.
2013-06-05 22:02:42 -04:00
Rene Gollent
cebb446f55 BreakpointManager: Adjust breakpoint installation logic.
If the debugger interface isn't currently connected, don't attempt to
actually install the breakpoint, and simply consider the operation a
success. This allows setting new breakpoints after e.g. the team has
exited.

Resolves remaining part of #9774.
2013-05-30 21:15:33 -04:00
Rene Gollent
6443c430b2 TeamDebugger: minor cleanups.
- On team exit, close the debug interface.
- When receiving a restart request via the listener, save settings
before dispatching it.
2013-05-30 21:15:33 -04:00
Rene Gollent
05d98101be DebuggerInterface: reset port IDs on Close()...
...and add accessor to detect whether we currently have a valid
connection or not.
2013-05-30 21:15:32 -04:00
John Scipione
14701d3ec9 Font Demo: Tweak layout of menu fields.
Need to add more height to the menu fields because we
no longer resize them automatically for fixed size mode
(for BeOS compat) and the text was shorter in BeOS.
2013-05-30 00:05:19 -04:00
Rene Gollent
8835205cf6 Sentence casing corrections, no functional change. 2013-05-29 23:34:43 -04:00
Rene Gollent
dd33ff02fd Add menu item to request team restart. 2013-05-29 22:01:32 -04:00
Rene Gollent
7cbc5a5964 Add UserInterfaceListener hook to request a team restart. 2013-05-29 21:59:51 -04:00
Rene Gollent
c90773b3ba Implement support for restarting teams.
- TeamDebugger's listener interface now exports a
TeamDebuggerRestartRequested hook. The latter is used to request
starting a new debugger instance with the same arguments/settings as the
team it represented. Implemented for the graphical debugger.

- When a team terminates, the resulting dialog now allows the user to
choose to quit, restart, or simply do nothing. The latter option still
needs some work though, as e.g. setting additional breakpoints currently
fails since the corresponding debugger interface is no longer around.

Implements the main part of #9774.
2013-05-29 19:25:49 -04:00
Rene Gollent
2f6ecd577a Add parsing for several new attribute classes.
- Collectively the previous set of changes get us minimally parsing
some of the new DWARF4 output from gcc 4.7 as well as some of the
draft DWARF5 extensions, which allows us to handle such executables
a bit more gracefully. Not all of the new information is made use of
as yet though. Should resolve #9799.
2013-05-28 22:36:56 -04:00
Rene Gollent
54a0525eca DIESubprogram: Add parsing for main subprogram attribute.
- Will be used later to recognize the main function of a given program.
2013-05-28 22:36:55 -04:00
Rene Gollent
cc428f5bbf Sync definitions with DWARF4 + DWARF5 drafts.
- Add tag, attribute and form definitions from DWARF4, as well as some
  from DWARF5 draft proposals that gcc4.7 is now emitting.
- Add corresponding attribute getter/setters and class definitions.
- Add appropriate attribute class definitions.
- Update tag name and attribute name retrieval accordingly for the
  above.
- Implement barebones DIECallSite/DIECallSiteParameter.
2013-05-28 22:36:33 -04:00
John Scipione
128c5556b9 Set fLastMousedOverItem NULL in ctor
This has a good chance to fix #9676
2013-05-28 18:12:23 -04:00
John Scipione
9ffe350441 Don't set this pointer NULL, is set on next line. 2013-05-28 18:10:56 -04:00
John Scipione
c0d45b53ed Remove DOUBLECLICKBRINGSTOFRONT macro
The code that used it has already been removed and if it were
enabled it would do bad things.
2013-05-28 18:08:54 -04:00
John Scipione
d0f798c8d2 Style fixes to ExpandoMenuBar 2013-05-28 18:07:23 -04:00
Rene Gollent
a6543e68c0 When an exception/breakpoint is hit, activate...
...the team window. Resolves #9797.
2013-05-27 22:01:17 -04:00
Siarzhuk Zharski
7c8e63e171 Terminal: fix handling utf-8 characters in OSC commands
Process the Operating System Control command in multibyte-aware way.
That fixes corresponding behavior for latest versions of Midnight
Commander;
2013-05-23 20:35:21 +02:00
Siarzhuk Zharski
3bbef9dd76 Discard Termcap and switch console apps to use Terminfo
* Switch bash, debugger, less, telnet[d] and top apps to use termcap
  functionality provided by ncurses lib instead of GNU libtermcap.so;
* NetBSD version of tput utility replaced with ncurses' one. Fixes #9606;
* terminfo database is provided as mandatory package installed during
  building target system;
* Remove libtermcap module. The termcap database source and
  corresponding build rules are not removed to provide backward compatibility -
  until all optional packages will be rebuild on upcoming system version
  using terminfo. Note that gcc2 builds may require to provide termcap a bit
  longer in the sake of binary compatibility with R5 era apps.
2013-05-23 14:07:50 +02:00
Rene Gollent
325f7bb4ec Show correct type in case a typecast has taken place. 2013-05-21 17:37:50 -04:00
Rene Gollent
e312ed26ef Add "Cast to array" context option.
Implements a simple context shortcut allowing to cast a pointer variable
directly to a 10-element array of the type it points to. Resolves #9778.
2013-05-20 19:03:55 -04:00
Rene Gollent
f297d6591d Relax range setting constraints for arrays.
- VariablesView now detects if a container's range is fixed or not,
and uses that to adjust both the prompt it displays and whether or not
the parsed ranges are bounds checked.
- ArrayValueNode now returns the currently user-set range rather than
the dimension constraints, since those might not always be accurate.
2013-05-20 19:03:53 -04:00
Rene Gollent
570241e8b7 Extend ValueNode interface for ranged containers.
Add an IsContainerRangeFixed() hook which specifies whether or not
the container in question can only display elements within a fixed
lower/upper bound, i.e. B{Object}List.
2013-05-20 19:03:52 -04:00
Rene Gollent
6b308faf1e 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.
2013-05-19 21:38:59 -04:00
Rene Gollent
d51ab41d49 Fix oversight in set visible range support.
Detect the case where we have a pointer to an array type, as seen
when typecasting a pointer to an array, and present the set visible
range option for these as well.
2013-05-17 22:06:04 -04:00
Rene Gollent
c05a041eac Add Type column to VariablesView. Resolves #9779. 2013-05-17 20:43:10 -04:00
Rene Gollent
c81a7bda64 Refactor DIE name resolution.
Factor out DwarfUtils::GetDIETypeName(). Make use of it for both
Subprogram parameters and modified types in general. Resolves TODO.
2013-05-17 20:43:09 -04:00
Rene Gollent
d1a797e6cd Add context action to open source file to SourceView.
Implements #9776.
2013-05-17 19:59:35 -04:00
Rene Gollent
ed6d6081c1 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.
2013-05-16 22:44:37 -04:00
Rene Gollent
c21b8ec703 Extend DebuggerInterface.
- Factor out an _GetDebugCpuState() call to share between
{Get,Set}CpuState().

- Add SetCpuState() which allows to update the state of a given thread.
2013-05-16 22:22:48 -04:00
Rene Gollent
93b54e54a4 Add MSG_THREAD_SET_ADDRESS and implement handling. 2013-05-16 22:22:47 -04:00
Rene Gollent
fe3e87c2a8 Extend CpuState interface.
- Add SetInstructionPointer() to allow an outside updates.
- Add Clone() to request a duplicate of the current state object.
- Add UpdateDebugState() to take a debug cpu state structure matching
the current architecture and update its registers with the values from
the cpu state object.
2013-05-16 22:22:45 -04:00
Rene Gollent
3938bea1dc Rework source path parsing.
- As we parse the image's function list, we now track the last source
file we encountered. If it's the first time we encounter the current
file, we parse its source path components up front and then simply walk
the parsed list in order to add the function to its appropriate place in
the model, rather than the previous recursive approach.  This allows us
to reuse the parsed component list for subsequent functions in the same
source file rather than having to reparse the path on every iteration.

- Refactor GetFunctionPath() to make use of the new
_GetSourcePathComponents() parsing function.

Should further improve the time needed to change the active image.
2013-05-15 21:10:57 -04:00
Rene Gollent
66b86c6aee ImageFunctionsView: Switch back to NotifyNodesRemoved(). 2013-05-15 20:18:05 -04:00
Rene Gollent
5d8c967fac VariablesView: Switch back to NotifyNodesRemoved(). 2013-05-15 20:18:05 -04:00
Rene Gollent
1d897b8a54 Remove NotifyNodesCleared() again.
- For various reasons this one can be error prone, since it relies on
the model being able to provide the correct row count, which won't be
the case if the subclass calls it after having already removed all its
nodes.

- Optimize Table's RowsRemoved() similarly to TreeTable's for the remove
all rows case.
2013-05-15 20:18:04 -04:00
Rene Gollent
ad6158096c VariablesView: Use Notify{NodesCleared,TableModelReset}(). 2013-05-15 19:22:25 -04:00
Rene Gollent
f3bf3eb0d4 Cleanups/optimizations for ImageFunctionsView.
- Get rid of the functions array as we no longer really needed it except
to sift duplicates. The latter function is now done simply by keeping a
set of already seen function addresses, and skipping entries which fall
in said category.

- Use NotifyNodesCleared()/NotifyTableModelReset() as appropriate.

- Remove now-unused sorting functions.

Combined, these changes significantly reduce the overhead of switching
the active image, which was produced observable lag when either choosing
another image in the Images list, or when stepping into/out of a
function resulted in an image change.
2013-05-15 19:22:24 -04:00
Rene Gollent
6132f7b96d Extend Table/TreeTable's interface.
- Add NotifyNodesCleared() hook to table model as a shortcut for
removing all rows.

- TreeTable::_RemoveChildRows() now recognizes the special case of the
above and optimizes it by calling BColumnListView::Clear() rather than
removing each row individually.

- Add TableModelReset()/NotifyTableModelReset(). This notification is
used to tell the underlying table that a full rebuild is needed due to
the model changing completely.
2013-05-15 19:22:23 -04:00