Commit Graph

5909 Commits

Author SHA1 Message Date
Rene Gollent
2c6fab1de6 Handle return value CPU states.
- DwarfStackFrameDebugInfo::CreateReturnValue() now takes a cpu state
  parameter. This is attached to the associated Variable object.

- ResolveValueNodeJob() now checks if the value node child it's dealing
  with is that of a variable. If so it pulls that CpuState for the
  ValueLoader's purposes rather than the current state. This gets return
  values for multiple function calls in the same statement working.
2013-03-29 21:11:22 -04:00
Rene Gollent
47ffc32bc0 Minor refactoring.
- Factor out a _HasExitedFrame() function.
- Reorder how/where return values are added a bit.
2013-03-29 21:11:21 -04:00
Rene Gollent
c07e2b1fe4 Add optional cpu state to Variable.
- Used to preserve the CPU state for variables representing return
  values, since they may potentially be retrieved from registers,
  and these might be overwritten later in the same statement.
2013-03-29 21:11:20 -04:00
Siarzhuk Zharski
15aa771390 Keep color control enabled after color scheme change
Fixes #9532
2013-03-29 16:26:32 +01:00
Siarzhuk Zharski
19bfeaa786 Support %e (cur.encoding) for Terminal titles
Optional parameter %e to indicate current tab view encoding in the
window title. It is not shown in case tab view encoding is default
UTF-8. Inspired by Sergei Reznikov. Thanks.
2013-03-29 16:26:00 +01:00
Siarzhuk Zharski
e0fcd62916 Code style fixes. No functional changes.
Fix for some code style issues pointed out by Axel. Thanks.
2013-03-29 14:10:46 +01:00
John Scipione
e13f5676a0 Cache app icons in BarInfo to make them load faster.
This turns an IO bound problem into a CPU bound problem. In my testing this
speeds up icon resizing dramatically although the CPU is quickly pegged at
100% trying to redraw the Deskbar if you whip the icon size slider back and
forth with a dozen or so apps open and soon the CPU can't keep up and Deskbar
lags behind.
2013-03-28 20:56:06 -04:00
Rene Gollent
c844f6e030 Style fixes. 2013-03-28 20:54:33 -04:00
Rene Gollent
8557931349 Add sanity check.
- The info list can in fact be NULL so we need to guard against that. This
  wouldn't currently get hit though, since the cases where the list isn't
  passed in are those where we only want a minimal frame anyways, so
  variable/return value creation wouldn't even be attempted.
2013-03-27 23:38:27 -04:00
Rene Gollent
4bc52e9f78 Remove no longer needed member. 2013-03-27 23:34:44 -04:00
Rene Gollent
76ed6d72a5 Refactoring to handle multiple return values.
- Replace use of address + CpuState pair in Thread,
  SpecificImageDebugInfo::CreateStackTrace() with a ReturnValueInfoList.
  Adjust all implementing subclasses and callers accordingly.

- DwarfImageDebugInfo::CreateReturnValue() -> CreateReturnValues().
  Now processes a list of return value information structures rather
  than just a single one. This means we can now handle multiple return
  values in a single statement. This still isn't entirely correct though,
  since, e.g. for functions whose return types fit in a register we need
  to either retrieve them immediately after function return, or store the
  CPU state at that point in time for later use in value retrieval,
  otherwise the return values will all be those of the last called function.
2013-03-27 23:27:49 -04:00
Rene Gollent
3fa429781c Add ReturnValueInfo class for storing function return information. 2013-03-27 23:27:48 -04:00
Matt Madia
5a6b854033 Add Cc: text field to mails shown when it's not empty.
Patch by Sean Healy 'jalopeura'. Fixes #2446.
2013-03-27 18:32:33 -04:00
Rene Gollent
2b41b37891 Build fix. 2013-03-26 23:30:35 -04:00
Rene Gollent
1efa0a42f6 Fix return value handling.
- In the case of position independent code, the initial call isn't to
  the function we want, but rather to a PLT slot which resolves the
  function's location. As such, find that slot and use it to determine
  the corresponding GOT offset for the function's real location.

Still need some further refactoring of return value handling to properly
handle the case of stepping over a single line that makes multiple calls,
but this fixes the basic case at least.
2013-03-26 18:50:45 -04:00
Rene Gollent
029fcc4ad6 Add CPU state at time of function call to Thread.
- When we detect that we're stepping over a function call, also store
  the CPU state at the time it occurred. This information is needed
  in order to correctly reconstruct target addresses later since some
  operands may be register-based.

- Add the aforementioned CPU state to CreateFrame()'s arguments and
  adjust implementations and callers accordingly.
2013-03-26 18:50:44 -04:00
Rene Gollent
04c919f9d6 Fix incorrect target address calculation for memory operands. 2013-03-26 18:50:44 -04:00
Siarzhuk Zharski
daebca78f8 More standard handling G0,G1,G2,G3 graph.char sets
Handling of graphic character sets G0-G3 is fixed and implemented in
more consistent, extensible way.
2013-03-25 10:34:10 +01:00
John Scipione
53ec5d1f33 Rebuild application menu bar less. Fixes #8539 (I hope)
Instead of destroying and rebuilding the application menu bar each time we
change state, create it at startup and then only update it from there on. This
means that bugs that rely on the app bar being constantly destroyed and rebuilt
will be much less likely to occur.

Unfortunatly, there is still one case where the application menu bar is being
destroyed and recreated and that is when you are switching between horizontal
and vertical mode, and that is because a menu bar cannot be altered from
B_ITEMS_IN_ROWS to B_ITEMS_IN_COLUMNS anywhere but in the constructor.

* Renamed fExpando to fExpandoMenuBar
* Updated TExpandoMenuBar to be more flexible after construction, the menu
  items are built in the new BuildItems() method. Also, don't pass the BarView
  object in at contruction, that can happen in AttachedToWindow(). Also, set
  fDeskbarMenuWidth just once at constructor, no reason to keep setting it over   and over again.
2013-03-23 14:59:09 -04:00
Axel Dörfler
bc4dd456f9 ActivityMonitor: fixed minor issue CID 609788.
* If the circular buffer was created with a size of zero, fBuffer would
  be freed without being initialized.
2013-03-19 00:56:47 +01:00
John Scipione
cf7c89ff4a Use the new Get* BMessage methods to simplify code.
Thanks Axel!
2013-03-18 11:48:58 -04:00
Siarzhuk Zharski
c7047b8fd2 Improve handling of mbyte chars in UTF8Char::IsSpace
* Switch UTF8Char's IsSpace, IsAlNum, ToLower functions to use
  system-wide BUnicodeChar service routines;
* Switch TermView::CharClassifier to use UTF8Char instead of
  raw char* string ponter. That reduces count of conversions
  and simplify code;

  Fixes #7423.
2013-03-17 16:45:49 +01:00
Siarzhuk Zharski
53953e3e68 Remove useless font style/family settings defaults
No need for PREF_HALF_FONT_FAMILY/_STYLE defaults to be defined explicitly,
these entries will be filled with corresponding params of the current system
fixed font if they are not available from the settings file.

Fixes #9531.
2013-03-17 16:45:44 +01:00
Siarzhuk Zharski
c2577509f9 Optimize SIGWINCH Shell notification
Fixes issue with missed SIGWINCH shell notification in case the
Terminal frame was resized by using any of "Settings"->"Window size"
menu items.

Fixes #9293 - original problem was pointed out by Ziusudra. Thank you!
2013-03-17 16:45:38 +01:00
Siarzhuk Zharski
1dd3b537c3 Fix Alternate/Normal screen's current attributes handling
Handle the current attributes of the TextBuffer consistently with other
Alt/Normal buffer sensitive variables. That fixes, for example, issues
with wrong background coloring of new lines in normal text buffer after
maximizing the terminal window running applications (like MC) performing
output onto alternate screen.
2013-03-17 16:45:29 +01:00
Siarzhuk Zharski
13d0439623 Terminal data flow debug capture improved
This modification moves the debug characters capture call directly into
the _NextParseChar(). That allows to capture all data flow without
missing things like OSC control sequences.
2013-03-17 16:45:23 +01:00
Siarzhuk Zharski
0ac0b4d4a6 Fix Terminal cursor Save/Restore behaviour
Yet another fix for the terminal cursor save/restore functionality.
Fixes wrong cursor positions observed in modern versions of the
Midnight Commander during switching between Alternate and Normal buffers.
2013-03-17 16:45:18 +01:00
Siarzhuk Zharski
15e83c4548 Omit Terminal Id title in case single app instance running
Hide the current index of Terminal window from it's title if only
ony instance of the Terminal application is running in the system.

Fixes #9530.
2013-03-17 16:45:12 +01:00
Siarzhuk Zharski
ef60154123 Handle font style on loading default Terminal preferences
Fix the PrefHandler::_ConfirmFont to take into account not only the
font family but the font style too. This improves the popup menu
checkmark synchronization in the Preferences View. This problem can
be reproduced on very first start of application without previously
stored Terminal settings. Default family/style for this case is
currently defined as "Courier 19BT"/"Regular" but default fixed
font has correspondently "DejaVu Sans Mono"/"Book". Previous version
of _ConfirmFont() process only the family and left the style in default
"Regular" one. So opening Preferences View and attempting to set the
checkmark on corresponding family/style menuitem was usually failed.
2013-03-17 16:45:06 +01:00
John Scipione
163a2afd4f Use the single parameter version of SetInsets()
While I'm at it, I can reduce the LayoutBuilder indent by 1.
2013-03-16 16:11:12 -04:00
John Scipione
c0778509d2 Copy pasta error, double checked this time 2013-03-16 11:55:27 -04:00
John Scipione
4c45b1d99e Perform settings checking again partially reverting 43917ef.
Also storedSettings to prefs as it is shorter, easier to read the code.
2013-03-16 11:30:42 -04:00
John Scipione
4307b2e057 Diskprobe open window layout fixes 2013-03-16 08:59:28 -04:00
John Scipione
d3a0b2dccf Deskbar prefs i18n updates. Fixes #8562
* AddGlue() to the Menu box to make it expand with wider translations.
* Order checkboxes vertically to better accomidate wider translations.
2013-03-16 08:12:50 -04:00
John Scipione
5bfc9c7091 Save and load prefs window position to and from a file. 2013-03-15 21:44:59 -04:00
John Scipione
f49eecb564 Use horizontal strut instead of insets 2013-03-15 21:35:02 -04:00
John Scipione
a3f512d524 Rename Recent items back to Menu and tweak to make fit.
* Put the Open in Tracker... button back in Menu.
* Put the window checkboxes in 2 columns.
* Use vertical struts instead of insets for spacing in a couple places.
2013-03-15 21:35:01 -04:00
John Scipione
a601c3f172 Add 'Open menu in Tracker' button at bottom 2013-03-15 21:35:00 -04:00
John Scipione
633232da4c Reorder buttons.
Defaults then Revert both on left like Tracker and Locale and other preflets.
2013-03-15 21:34:59 -04:00
John Scipione
43917ef2e0 Refactor settings so that defaults get set in 1 place.
* Move desk_settings and clock_settings struct to a new header entitled
  'BarSettings.h' so it can be included in BarApp.h and PreferencesWindow.h.
* Refactor desk_settings to only include used, or at least relevant settings,
  some cruft had built up over time.
* Refactor the InitSettings() method, all the B_OK checking wasn't working so
  I removed it. Defaults get set up to and if the corresponding setting is
  found in the settings file it is replaced, else, it is not.
* Reorder the struct and code so it goes in the order that the settings appear:
  applications, then recent items, then window settings.
* Simplify the preferences window revert and defaults code based on using the
  prebuild desk_settings structs in BarApp instead of creating our own and
  copying. All initial setup is in the constructor.
2013-03-15 21:34:58 -04:00
John Scipione
cb42238603 Destroy prefs window on close once again 2013-03-15 21:34:57 -04:00
John Scipione
1ec3d37252 Rename 'Sort running applications' to 'Sort applications by name' 2013-03-15 21:34:56 -04:00
John Scipione
cb0602cf81 Implement Revert and Default buttons in Deskbar prefs 2013-03-15 21:34:36 -04:00
John Scipione
93a58e5028 Reformat Deskbar prefs all in one with no tabs 2013-03-15 21:33:59 -04:00
Ziusudra
41130d1c52 Terminal: Fixed small code duplication
SetTermSize(BRect) already contains all the code calling SetTermSize(int, int).
Partially fixes #9293.
2013-03-15 15:15:43 +00:00
Ziusudra
9f726b367b Terminal:Add ACS symbols supported by xterm-256color
More ACS (also known line drawing) symbols should be supported by
xterm-256color terminal emulator.
Partially fixes #9293.
2013-03-15 15:15:19 +00:00
Siarzhuk Zharski
5b41331f11 CodeStyle fixes, some refactoring and cleanup
* Clear some codestyle issues catched by checker script;
* Rename RestartDebugCapture to more consistent StartStopDebugCapture;
* Updated Copyrights and authors lists, some occurences of the raw MIT
  licence text replaced with "under the terms of MIT licence" reference;
* Fixes for x86_64 build.

This is cumulative cleanup commit for series of Terminal refactoring
changes I have introduced last time. No significant functional changes.
2013-03-14 07:44:52 +00:00
Siarzhuk Zharski
fe25686978 Move colors table from TermView to TerminalBuffer
* ColorsTable moved to TerminalBuffer to let easy lookup of table
  during parsing of control sequences;
* Default Palette initialized from now in TermApp and preserved
  from modifying by applications;
2013-03-14 07:44:50 +00:00
Siarzhuk Zharski
bbfd23abd5 Use native bold style drawing (+ switchable emulation)
Use native bold font for rendering characters with corresponding
attribute set. Possibility for switching to R5-like bold characters
emulation is also implemented. This one uses uses the left-down shadow
in B_OP_BLEND drawing mode instead of the rigth-down one as previously.
2013-03-14 07:44:48 +00:00
Siarzhuk Zharski
6d30b376e9 Support for underline and ibeam terminal cursor styles
* Add support for underline and i-beam cursor shapes. No corresponding
  UI configuration in preferences view ATM because preferences are waiting
  for refactoring and we need some eggs for this Easters. ;-)
* Add handling of VT520/xterm specific DECSCUSR control sequences
  allowing applications to modify the style and blinking state of the
  cursor. May be utilized, for example, by console version of vim;
* Implement cursor blinking/hiding on DECSET/DECRST commands.
2013-03-14 07:44:47 +00:00