Commit Graph
100 Commits
Author SHA1 Message Date
Rene Gollent 2d9d01e2e8 Debugger: Refactor non-interactive report handling.
- Add dedicated ReportDebugger application class for the case where we're
  asked to do nothing more than save a report. Also add a corresponding
  UserInterface subclass whose sole purpose is to take those necessary
  actions and then exit.
- When the debugger is invoked via the --save-report option, we now start
  via the aforementioned report/interface rather than piggybacking on the
  CLI.
- Clean up CommandLineUserInterface/CliContext to remove handling for the
  report saving option.

Should hopefully resolve #12155.
2015-08-22 00:21:07 -04:00
Rene Gollent 9d9c74ecdb Debugger: Cleanups and improvements for status notification.
Worker/Job:
- Add job listener hooks for when work actually begins for a job,
  and when a job is suspended to wait for user input.
- Add hook for setting a job description string, and implement in several
  subclasses.

LoadImageDebugInfoJob:
- Get rid of ImageDebugInfoJobListener since its functionality can be
  handled via the more general job wait for user input hook. Refactor
  accordingly.

TeamDebugger:
- Adjust to use new job hooks. When a worker job is initiated, we now
  check if the job has a description, and if so pass it on to the UI
  to display a notification.

DwarfLoadingStateHandler:
- Notify the UI when a package download is in progress.

With these changes, the status bar now notifies the user if any of the
following actions are in flight:

1) Loading/parsing debug information
2) Stack trace retrieval
3) Source code retrieval
4) Downloading a debug info package
2015-08-15 16:47:26 -04:00
Rene Gollent 36a43c9d51 Debugger: Implement notifications for debug info loading.
TeamDebugger:
- When notified that an image debug info job has started loading,
  notify the user interface accordingly. Also reset status to a ready
  state whenever all in-flight jobs are complete. This allows the
  user to know when then debug subsystem is still in the process
  of parsing debug information, as this can be time consuming for
  larger programs/libraries.
2015-08-14 20:53:06 -04:00
Rene Gollent 674e0424f7 Debugger: Extend ImageDebugInfoJobListener.
ImageDebugInfoJobListener:
- Add hook for notification that the loading job is in progress. Call
  as appropriate when the job actually starts.
2015-08-14 20:53:05 -04:00
Rene Gollent 7f77789d5b Debugger: Add work notification hook to UserInterface.
UserInterface:
- Add new hook function used to notify the UI that some form of
  background work is taking place for informational purposes,
  i.e. no interaction required. Implement accordingly in
  GraphicalUserInterface.
2015-08-14 20:53:03 -04:00
Rene Gollent 0324fc408c 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.
2015-08-14 20:53:02 -04:00
Rene Gollent 667361d71f Debugger: Add worker helper function.
Worker:
- Add helper to check if the background worker thread has any unfinished
  jobs in its queue.
2015-08-14 20:49:23 -04:00
Rene Gollent 422b0ec754 libroot: Fix issue reported in ticket #12291.
fts.c:
- Our fts functions were imported from FreeBSD and consequently did not
  use the same weak alias methodology that most of our glibc-derived
  POSIX functions do. These subsequently wound up clashing with the
  implementation of said functions in current versions of coreutils,
  resulting in assertion failures when e.g. running a program through
  stdbuf, since the BSD-derived functions had different flag constraints
  than their GNU peers. Consequently, this change adjusts the fts_*
  family of functions to similarly be exported as weak symbols so they
  can be preempted.
2015-08-10 17:01:35 -04:00
Rene Gollent 03bf949ed4 launch_daemon: Correctly fix #12289 as pointed out by Axel.
- Rather than depending just on mount_server's launch, instead use
  a condition that waits for the volumes mounted event. Had missed
  the existence of this one previously.
2015-08-08 17:12:17 -04:00
Rene Gollent fdc32a3844 Launch configuration: Fix #12289.
- Adjust launch configuration such that media_server requires mount_server.
  Otherwise, if the user has specified sound files for any events that are
  on non-boot disks, these won't be found/loaded properly during the boot
  process.
2015-08-07 22:05:08 -04:00
Rene Gollent 08c57f1d3b Debugger: Fix #12291.
UiUtils:
- Fix incorrect check to see if we had hit the bounds of the current memory
  block that would cause us to overflow the block's data buffer if incorrect
  length values were passed in.
2015-08-06 17:51:15 -04:00
Rene Gollent 5e95945071 Debugger: Cleanup.
ThreadHandler:
- Simplify SetBreakpointAndRun() to always use the debugger interface to
  continue execution, since the latter is now intelligent enough to determine
  how to handle that in all cases. Adjust callers accordingly.
2015-07-31 17:28:02 -04:00
Rene Gollent 27dec4bb1e user_debugger: Adjust handling of continue request.
- B_DEBUG_MESSAGE_CONTINUE_THREAD now checks if the thread in question
  is in a suspended state rather than waiting on the debug nub port, and
  if so, handles resuming it automatically. This allows the continue message
  to be used on the main thread of a team that was freshly created under
  debug control without the API user having to be cognizant of the distinction.
2015-07-31 17:28:00 -04:00
Rene Gollent 3333f96888 SplitLayout: Fix #12261.
- SetItemCollapsed()/IsItemCollapsed() didn't properly handle inverting
  values when mapping between the collapsed flag and the layout item's
  internal visibility flag, leading to them having the opposite semantics
  from what their name would suggest.
2015-07-30 22:33:36 -04:00
Rene Gollent 9123fde7b9 Debugger: Implement #9783.
TeamDebugger:
- When we're notified that the target team has called exec(), take all
  necessary steps to prepare. These include saving settings for the old
  team, clearing out breakpoints, resetting signal dispositions, and
  removing the old team's image list. Also set a flag indicating an exec
  is pending for later processing.
- On image load notification, if the pending flag is set, check if the
  new image is the app image, and if so update the team's name to
  the new image, load that respective team's settings, and set a
  temporary breakpoint in its main() so the user has a chance to
  perform any additional desired actions before starting execution
  in the new executable.
2015-07-26 14:37:28 -04:00
Rene Gollent 10bbf8cb8d 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.
2015-07-26 14:37:28 -04:00
Rene Gollent 754b42a5a1 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.
2015-07-26 14:37:27 -04:00
Rene Gollent 25c638c20b Debugger: Adjust ThreadHandler.
- SetBreakpointAndRun() now takes an additional argument indicating if this
  invocation is for a fresh run of a team or not, as continuing the thread's
  execution needs to be done differently in the two cases.
2015-07-26 14:37:26 -04:00
Rene Gollent 8f21b17520 Debugger: Add more helpers to Team.
ClearImages():
- Removes all existing images from the team's image list and notifies callers.
  To be used in case of an exec().

ClearSignalDispositionMappings():
- Remove any existing custom signal disposition mappings. This is intended to
  be used in preparation for loading new ones from a team after exec() is
  called.
2015-07-26 14:37:26 -04:00
Rene Gollent 3bb17aa98a Debugger: Minor refactoring.
VariablesView:
- Factor out setting up a variable edit request into a helper function.
Adjust table node invocation accordingly.
- Add Edit variable context menu item if appropriate.
2015-07-24 23:38:04 -04:00
Rene Gollent af92957fd9 Debugger: Minor tweak to enumeration editor.
- Don't return result of SelectOptionFor(). It's possible to attempt
to edit an enum value that hasn't yet been initialized, in which case
its current value might not map to any of the defined enumerations, and
the resulting error would prevent editing from being allowed.
2015-07-24 23:37:50 -04:00
Rene Gollent 410b38b5c5 libroot: Fix strto{i,u}max.
- According to POSIX, these functions should map to whatever's appropriate
  for the platform's intmax_t size, which in our case is a 64-bit integer.
  Our (2004) implementation, however, was calling the 32-bit variations of
  strto*(), leading to truncation for larger values.
2015-07-24 21:57:11 -04:00
Rene Gollent f5d564a1d3 Debugger: Implement float value editor.
FloatValueFormatter:
- Implement parsing/validation hooks.

FloatValueHandler:
- Implement GetTableCellValueEditor() to accordingly return a
  (newly implemented) TableCellFloatEditor. This allows variable
  value editing for float/double variables.
2015-07-24 19:22:08 -04:00
Rene Gollent 5c5c25163d Debugger: Tweaks for float values.
FloatValue:
- Store value as variant rather than double so as to be able to
  later differentiate between float vs double.

PrimitiveValueNode:
- Construct float nodes with variant value.
2015-07-24 19:20:52 -04:00
Rene Gollent d88d941c90 Debugger: Finish variable edit support.
VariablesView:
- Intercept table node invocations. If the invocation corresponds to
  a writable variable, request a corresponding editor and bring up a
  an edit window for it.
- Handle requests from the edit window to write the final updated value
  of the variable.

This implements the last missing piece for ticket #9708, except for an
editor for floats.
2015-07-24 17:09:08 -04:00
Rene Gollent 473b2c6ac9 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.
2015-07-24 17:08:53 -04:00
Rene Gollent 7d25ab995d Debugger: Add hook for variable value writing.
WriteValueNodeJob:
- Implement async job that creates a ValueWriter to update a variable
  value on request.

UserInterfaceListener:
- Add hook for requesting that a node be updated with a new value.
  Implement in TeamDebugger by scheduling a WriteValueNodeJob.
2015-07-24 17:08:53 -04:00
Rene Gollent 9b0d97576d Debugger: Add variable editing utility window.
VariableEditWindow:
- Implement container window for variable value editors. While
  not as ideal as initially intended, this will handle presenting value
  editing to the user until more work is done on the table cell editing
  aspect of things.
2015-07-24 17:08:52 -04:00
Rene Gollent 55d4f9ff18 Debugger: Implement value editor hook for more handlers.
{Bool,Enumeration}ValueHandler:
- Implement GetTableCellValueEditor() hook.
2015-07-24 17:08:52 -04:00
Rene Gollent 1f3db0d0d6 Debugger: Flesh out option-based value editors.
TableCellOptionPopUpEditor:
- Add virtual hook for retrieving the final selected value. Implement
  accordingly in Bool and Enumeration editor subclasses.
- Implement calling the edit completion hook upon value changes.
2015-07-24 17:08:51 -04:00
Rene Gollent 1f8d1f68ce Debugger: Slight tweak to text control editor.
- Trigger a caller update on modification as well.
2015-07-24 17:08:50 -04:00
Rene Gollent 006fd65396 Add missing launch definition for net_server. 2015-07-22 17:19:02 -04:00
Rene Gollent f068ecea0a Icon-O-Matic: Fix gcc4 build.
- Add explicit casts to uint8 since gcc4 otherwise warns about a narrowing
  conversion.
2015-07-19 21:06:42 -04:00
Rene Gollent a3b04ab398 Debugger: Fix oversight in TeamDebugger.
- In the case where the target team terminates, the subsequent prompt
  to ask the user what action they wish to take in response needs to
  take into account the possibility that the UserInterface in question
  hasn't yet implemented such prompting. Treat such a case as equivalent
  to asking the debugger to quit.

Addresses part of #10292.
2015-07-18 16:42:38 -04:00
Rene Gollent 6edcd0bf79 Debugger: Build fix. 2015-07-17 23:30:23 -04:00
Rene Gollent 8a5d051fa3 Debugger: Minor fix to text control editor.
TableCellTextControlEditor:
- Switch BTextControl inheritance to public, as gcc2 otherwise fails to
  properly dynamic_cast to BTextControl, which breaks the latter
  internally.
2015-07-17 23:12:46 -04:00
Rene Gollent 220ccc72f6 Debugger: Fix incorrect comparison. 2015-07-17 23:12:42 -04:00
Rene Gollent df459da6ed {Tree,Table}: Add cell rect accessor.
BColumnListView:
- Add helper method for getting the visible rect of a given field.
  Refactor SuggestTextPosition to use it.

{Tree,Table}:
- Add wrapper to retrieve table cell rect using the aforementioned
  BCLV helper.
2015-07-17 23:12:39 -04:00
Rene Gollent 8988902ec3 Debugger: Implement editor hooks for integer values.
IntegerValueHandler:
- Add hook for acquiring value editor.
2015-07-17 23:12:10 -04:00
Rene Gollent 568f200843 Debugger: Add ValueWriter support class.
- Given a value + corresponding location description, this handles
  ensuring that the data ends up in the appropriate locations in the
  target team.
2015-07-17 22:03:24 -04:00
Rene Gollent 5b026a2960 Debugger: Improve variable tooltips.
VariablesView:
- Tooltips now indicate if there was a problem resolving either the location
  or the actual value of a given variable, as well as whether or not the
  variable is editable in its current location.
2015-07-17 22:03:22 -04:00
Rene Gollent 4c880a79bc Debugger: Add writable property to ValueLocation.
Value{Piece}Location:
- Add member to indicate whether the current location, respectively
  all its pieces are in locations where they can theoretically be
  modified.
2015-07-17 22:03:21 -04:00
Rene Gollent 32b9dee486 Debugger: Minor tweaks. 2015-07-12 15:14:51 -04:00
Rene Gollent b3f2ebf008 Debugger: More work on signal configuration.
- Introduce SignalDispositionEditWindow for add/editing disposition
  exceptions.

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

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

Together with the previous set of commits, this implements #9720.
2015-07-02 22:38:08 -04:00
Rene Gollent b66f61af9b Debugger: Add config view for signals.
SignalsConfigView:
- Provide basic configuration for signal dispositions.

TeamSettingsWindow:
- Add signals view to tab list.
2015-07-02 22:38:08 -04:00
Rene Gollent 10b962261a Debugger: Layout changes to team settings window.
TeamSettingsWindow:
- Split out functionality into separate views for images and exceptions,
  which in turn are held in dedicated tabs.
2015-07-02 22:38:08 -04:00
Rene Gollent c3c2ab3169 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.
2015-07-02 22:38:08 -04:00
Rene Gollent 24fe478ef8 Debugger: Start watching signal events.
TeamDebugger:
- Add signal events to debug event mask. Upon receipt of such an event,
  stop the target thread. WIP.
2015-07-02 22:38:07 -04:00
Rene Gollent 601a9f1d23 Debugger: Add handling for signal debug messages.
DebugEvents:
- Add definition for SignalReceivedEvent.

DebuggerInterface:
- Generate SignalReceivedEvent upon receipt of
  B_DEBUGGER_MESSAGE_SIGNAL_RECEIVED.
2015-07-02 22:38:07 -04:00
Rene Gollent 86a5bc31a5 Debugger: Add persistent settings classes for signal dispositions.
- Add class TeamSignalSettings for storing signal disposition settings,
  and add instance to TeamSettings.
- Adjust TeamDebugger to load signal settings.
2015-07-02 22:38:07 -04:00
Rene Gollent 14a55dce06 Debugger: Add signal settings and listener hooks.
Team:
- Add settings and accessors for signal dispositions.
- Add event definitions and listener hooks for signal disposition
  changes.
2015-07-02 22:38:07 -04:00
Rene Gollent 8e5da927ea Debugger: Add definitions for signal dispositions.
- Add header for defining the possible signal dispositions that can be
  configured.
- Add corresponding UI helper function to map to a string
  representation.
2015-07-02 22:38:07 -04:00
Rene Gollent 17cbae24ce Debugger: Add SignalInfo model class.
- Represents information about a signal being delivered to the team.
2015-07-02 22:38:06 -04:00
Rene Gollent 37248a2fff Debugger: Add address column to functions list.
ImageFunctionsView:
- For function nodes, also display the start address of the function in
  question. Makes it somewhat more convenient to determine which function a
  function pointer actually refers to.
2015-06-27 13:20:14 -04:00
Rene Gollent 299f564e06 Debugger: Fix potential crash in VariablesView.
VariableTableModel:
- When attempting to retrieve the type for a given node, ensure
  that it actually has a value node first. This might not necessarily
  be the case if no appropriate type handler was found.
2015-06-27 12:53:26 -04:00
Rene Gollent 55c1477fbc Debugger: Minor adjustment to address value node.
AddressValueNode:
- If the address node is pointing to a function, don't bother creating
  a child, as there isn't really any useful information that can be displayed
  for such a node besides its target address, which is already shown by the
  address node anyways.
2015-06-27 12:47:19 -04:00
Rene Gollent 026596dd1d Debugger: Add table cell editors for various value types.
TableCell{Bool,Enumeration}Editor:
- OptionPopUp-derived editors for their respective value types.

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

Not actually used yet, but together with the previous changes, these lay
the groundwork for the remaining part of #9708.
2015-06-13 16:57:19 -04:00
Rene Gollent a82499551d Debugger: Add interface subclasses for table cell editors.
TableCellTextControlEditor:
- Serves as a base for editors that expose their functionality via a
  text control. Handles common functionality of watching for changes,
  validating input, and notifying listeners appropriately.
TableCellOptionPopUpEditor:
- Serves as a base class for editors where the set of possible values
  is fixed and known up front. Handles reacting to selection changes
  and notifying listeners.
2015-06-13 16:57:13 -04:00
Rene Gollent 5f5499b40b Debugger: Refactor + resolve TODO.
- Introduce interface class ValueFormatter. This one takes on the
responsibilities of formatting a value into a string, which were
previously embedded within the various TableCellValueRenderer
subclasses.
- Add implementing subclasses for the various value types.
- Introduce TableCellValueRenderer subclass TableCellFormattedValueRenderer.
  This is a simple TableCellValueRenderer implementation for the simple case
  of a renderer that does nothing more than use a formatter to present a
  string version of its corresponding Value. Since this describes all existing
  renderers, this renders them obsolete.
- Refactor the respective ValueHandler subclasses to make use of the formatters
  and new rendererer subclass.
2015-06-13 16:57:09 -04:00
Rene Gollent 7589a9affa Debugger: Extend value handler interface.
- Add new interface class TableCellValueEditor, which provides a controller
  for handling editing of table cell values, and corresponding listener
  notifications.

ValueHandler:
- Add new hook for requesting such an editor, given a corresponding
  value.
2015-06-13 16:56:54 -04:00
Rene Gollent d2a6418f63 Debugger: Cleanups, no functional change.
- Remove out-of-place accessor to type lookup info on ValueLoader.
  Instead, adjust CreateChildren() and CreateChildrenInRange() to take a
  TeamTypeInformation parameter. This can then be used by value nodes that
  need to be able to look up type information in order to properly
  publish their children, such as BList and BMessage. Refactor subclasses
  and callers accordingly
2015-06-07 21:40:05 -04:00
Rene Gollent 5ea6993dc2 Debugger: Fix edit mode redraw issue.
MemoryView:
- During edit mode, if navigating with the left or right arrow
  only resulted adjusting the focus nybble and not transitioning
  to another block, redraw wouldn't be triggered, leading to it appearing
  as if the keypress had no effect.
2015-06-07 21:39:52 -04:00
Rene Gollent 8a74210d80 Debugger: Fix uninitialized variable.
MemoryView:
- fTrackingMouse wasn't being initialized in the constructor, which would
  lead to the memory view sometimes thinking it was in mouse tracking mode
  immediately when opened.
2015-05-26 23:38:09 -04:00
Rene Gollent d281548a33 Debugger: Cleanups, no functional change.
- Add virtual hook to TeamMemory for retrieving area information
  from the target team.
- Implement said hook in DebuggerInterface.
- Adjust RetrieveMemoryBlockJob to use said hook to retrieve the
  writable state of the target block rather than calling
  get_memory_properties() directly.
2015-05-25 21:44:14 -04:00
Rene Gollent 03796a0cef Debugger: Add Inspector UI controls for edit mode.
InspectorWindow:
- Add buttons to control edit mode, and helper functions to maintain
  their state.
- Implement listener hook for memory change events, to track when
  requested memory writes are completed, and update the view accordingly.

Together with the previous batch of commits, this implements the first part
of #9708.
2015-05-23 16:54:18 -04:00
Rene Gollent 6ce909030d Debugger: Add edit mode support to MemoryView.
MemoryView:
- Add hooks and supporting status tracking members to enable edit mode.
  When editing is requested, we allocate a duplicate copy of the current
  block's data to perform edits in. Currently, editing is only supported from
  within the hex view, and when edit mode is enabled, the view is locked to
  8-bit hex mode in order to avoid any possible confusion with regards to
  source vs target endian orientation.
- Extend Draw() to determine whether to write data from the edit data store
  or the actual memory block. Also implement highlighting the current edit
  position caret when in edit mode, as well as highlighting bytes that have
  been changed compared to the block's original data.
2015-05-23 16:54:17 -04:00
Rene Gollent 76ada671ba Debugger: Extend MemoryView listener interface.
MemoryView::Listener:
- Add extra hooks for notifying listener of internal mode changes.
  Implement accordingly in InspectorWindow.
2015-05-23 16:54:16 -04:00
Rene Gollent 68e78ff841 Debugger: Add memory write support.
- Implements various support classes and functions that will be
  needed in order to marshal requests to write to memory in the
  target team.
2015-05-23 16:54:16 -04:00
Rene Gollent 5474c67270 Debugger: Add page protection indicator to inspector.
InspectorWindow:
- We now display a label indicating if the currently inspected block
  is writable or not, so the user knows whether it's possible to modify
  the contents.
2015-05-23 16:54:15 -04:00
Rene Gollent 82bf490fa6 Debugger: Fix MemoryView layout issues.
MemoryView:
- Implement {Min,Max,Preferred}Size() hooks. The default BView
  versions were causing the inspector to sometimes not be properly
  resizable after previous settings were restored.
2015-05-23 16:54:14 -04:00
Rene Gollent 40d8306053 Debugger: Fix inverted error check.
InspectorWindow:
- Fix inverted error check when retrieving settings. This was
  causing us to fail to successfully load/apply previously stored
  settings for the inspector.
2015-05-23 16:54:14 -04:00
Rene Gollent 22f13a09e1 Debugger: Fill in missing piece of CpuState.
CpuStateX86{-64}:
- Fully implement the BVariant version of SetRegisterValue().

Also fixes CID 1296160.
2015-04-29 17:03:23 -04:00
Rene Gollent 2f86484842 Debugger: Cleanups.
- Factor out RegistersView's SIMD output formatting functions into
  UiUtils helpers. Adjust RegistersView accordingly.
- Adjust DebugReportGenerator to detect SIMD registers and format
  them appropriately for report output using the aforementioned
  helpers.
2015-04-26 16:38:31 -04:00
Rene Gollent 88e499ca82 Debugger: Add SIMD format options.
RegisterTableModel:
- Add member for preferred SIMD unit format, and use it to decide
  what to divide up such registers as, rather than hardcoding 16 bit integer.

RegistersView:
- When right clicking on an SIMD register, display a format context menu
  allowing the user to decide what packed unit format to interpret the register
  data as, and adjust table model accordingly.
2015-04-26 16:38:31 -04:00
Rene Gollent 5fb2009931 Debugger: Restrict registers via CPU feature detection.
DebuggerInterface,Architecture{X86,X8664}:
- Add hook function for retrieving a feature flag mask for the target CPU,
  and corresponding implementation in Architecture-specific classes.

ArchitectureX86:
- Read CPU features on init, and use them to restrict the exposed set of
  registers such that the MMX and SSE registers will only be visible
  if the target CPU actually supports the respective instructions.
2015-04-26 16:38:30 -04:00
Rene Gollent 3127a22868 Debugger: Tweak UiUtils floating point format. 2015-04-26 16:38:29 -04:00
Rene Gollent b7c7c41749 Debugger: Add basic handling of SIMD to RegistersView.
- If an SIMD register is detected, retrieve its value and format
  it as an array of 16-bit hex values. This will be extended to
  allow other format choices in a future commit.
2015-04-26 16:38:29 -04:00
Rene Gollent a5fbc88f43 Debugger: Expose more x86{-64} registers.
ArchitectureX86{-64}:
- Implement helper functions for adding floating point and SIMD registers.
- Add st0-st7 and mm0-mm7 to the list of exposed x86{-64} registers,
  along with their DWARF unwind mappings.
- Add xmm0-xmm7 for x86, and xmm0-xmm15 for x86-64.

CpuStateX86{-64}:
- Implement helper functions for setting/retrieving floating point and SIMD
  register values.
- Fill in values for st*, mm* and xmm* from debug_cpu_state.
2015-04-26 16:38:28 -04:00
Rene Gollent 162224b5d2 Debugger: Add register format definition for SIMD. 2015-04-26 16:38:27 -04:00
Rene Gollent 2e82cb8dd6 x86: Update BePDF, Pe,Vision packages. Add libsanta package. 2015-04-13 22:28:32 -04:00
Rene Gollent 3cad498309 userlandfs: Fix debug build. 2015-04-04 23:18:57 -04:00
Rene Gollent 51427685e9 HaikuPorts_x86: Update haikuwebkit to 1.4.10. 2015-03-01 19:45:29 -05:00
Rene Gollent 9b14151f23 HaikuPorts_x86: Update haikuwebkit to 1.4.9. 2015-01-29 12:49:26 -05:00
Rene Gollent d229773736 Shortcuts: Automatic whitespace cleanup. 2015-01-23 22:18:25 -05:00
Rene Gollent d13b9014e8 Shortcuts: Fix #11777.
- Add missing B_AUTO_UPDATE_SIZE_LIMITS flag to window, otherwise it
  never recomputes its initial size in the absence of previously
  stored settings.
2015-01-23 22:17:05 -05:00
Rene Gollent f6099728e4 Fix #11775.
BitmapDrawingEngine:
- Check if fBitmap is NULL before releasing its reference. Since this is
  the case when a BitmapDrawingEngine is instantiated, this would lead to
  an app_server crash upon any attempt to make use of one.
2015-01-23 16:41:35 -05:00
Rene Gollent 6e9704175e kernel: Style fix. 2015-01-09 19:49:52 -05:00
Rene Gollent 7f10f053c5 x86: Package updates.
- Add package for ninja.
- Update haikuwebkit to 1.4.8.
2015-01-03 15:02:43 -05:00
Rene Gollent 4d9388f389 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.
2015-01-01 17:49:02 -05:00
Rene Gollent d21bcbb0ac Debugger: Extend TeamTypeInformation interface.
TeamTypeInformation:
- Add interface function to allow simply querying for whether a
  type is known to exist by a name + constraints, without actually
  requesting that it be instantiated, and implement in TeamDebugInfo.

GlobalTypeLookup:
- Add analogous type lookup function to the above, and implement in
  TeamDebugInfo.

{Specific,Debugger,Dwarf}ImageDebugInfo:
- Add function for type existence query, and implement in subclasses.
2015-01-01 17:49:01 -05:00
Rene Gollent 492a649b19 Debugger: Optimize type lookups.
DwarfImageDebugInfo:
- On initialization, we now walk the list of compilation units and
  build a hash table of all of their contained types. The table is then
  used by GetType() to quickly find the subset of DIEType objects that
  match the requested name, and then compare only those to the
  given constraints to find the best match.

For a more complex image such as libbe or Debugger itself, this reduces
the time for an uncached type lookup from around 50 msec to < 10 usec on
my i7.
2015-01-01 17:44:36 -05:00
Rene Gollent a146bd7784 Debugger: Expression evaluator optimization.
- When resolving an identifier, first attempt to match it against
  frame variable if applicable, and only attempt to look it up as a
  type name if the former comes up empty. The type lookup is
  significantly more expensive since if it doesn't match an already
  known type, it currently needs to search through all DIEs trying
  to find a candidate. This would significantly slow down expression
  evaluation involving identifier names, and was particularly noticeable
  for breakpoint condition processing.
2014-12-28 23:43:57 -05:00
Rene Gollent 6e724034a3 Debugger: ThreadHandler cleanup.
- When evaluating a breakpoint condition, there's no need to change
  the thread state unless the condition is actually met. This would
  lead to lots of unnecessary state switching and associated overhead
  in the GUI.
2014-12-28 23:43:57 -05:00
Rene Gollent 15852b070a Debugger: Fix tokenizer bug.
- When detecting a possible start of string literal, ensure that a
  terminator was actually found, otherwise simply consider it as a
  single character token. Otherwise, cases such as an apostrophe in
  a C-style comment that spanned a single line would result in us
  missing the token for the comment close, and highlighting all
  subsequent lines until such a token was encountered as comments.
2014-12-28 23:43:56 -05:00
Rene Gollent 0f45a48087 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.
2014-12-28 17:20:05 -05:00
Rene Gollent cf629b09f9 debug_server: Fix #11659.
- If we're asked to debug a team graphically, check if Debugger is already
  running. If so, send it a message asking it to debug the team rather than
  trying to invoke it by command line, as the latter will simply result in
  a B_SILENT_RELAUNCH message, and won't actually process the request properly.
2014-12-26 23:27:23 -05:00
Rene Gollent edf74e6ca8 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).
2014-12-26 22:45:01 -05:00
Rene Gollent c3f9f5550d Debugger: Minor visual tweak in VariablesView.
- Expression evaluation results are now highlighted as changed when
  they're first added, since they're immediately of interest, unlike
  uninitialized variables that're first coming into scope.
2014-12-16 16:57:17 -05:00
Rene Gollent 9dcef0489e 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.
2014-12-16 16:48:10 -05:00
Rene Gollent 40d79c0587 Debugger: Fix type value display in VariablesView.
- When retrieving the type to display for a given model node, ask its
  underlying value node for its corresponding type rather than relying
  on the one initially stored in the model, as the latter can change
  as a result of typecasts.
2014-12-12 16:59:28 -05:00