Commit Graph

46997 Commits

Author SHA1 Message Date
John Scipione
1e6e124cb4 BView: Style fixes only, no functional change intended
Motivated by inconsistancies found while documenting BView.

Update copyright year, alphabetize

Variable names normalized:
* pt => point
* r => rect
* p => pattern
* c => color
* msg => message
* a, b and pt0, pt1 => start, end
* r, g, b, a => red, green, blue, alpha

A couple of white spaces fixes.

A couple of !pointer => pointer == NULL fixes.

GetPreferredSize params => _width and _height to indicate out params.
2013-06-28 22:59:17 -04:00
John Scipione
dd84193fa4 Begin filling out the detailed description 2013-06-28 20:28:45 -04:00
John Scipione
1126023668 Fill out the constructor docs. 2013-06-28 20:28:43 -04:00
John Scipione
2891821fde Fill out the BView docs
* Fill out the Input related method descriptions and also some other updates
  to method and variable descriptions.
* Document Graphics State Methods and a bunch of Drawing Related Methods
* Add a bunch more drawing method descriptions.
* Fill out the rest of the methods of the BView class.
2013-06-28 20:28:32 -04:00
Rene Gollent
77ea49f4f2 Adjust debug API to address some x86-64 concerns.
- The argument buffer contained in the debug_{pre,post}_syscall message structures wasn't large enough to accomodate all
arguments for some syscalls on x86-64, which could potentially have led to kernel memory corruption when using syscall
tracing via the debug API. As such, enlarge it to accomodate 64-bit platforms as well.

- Adjust TeamDebugger/SyscallInfo to discriminate the target architecture and read the arguments when trapping console
output. Gets the latter working on x86-64.
2013-06-28 18:59:38 -04:00
Rene Gollent
277945a648 Add support for auto-scrolling.
- If the console output is currently at the bottom, any new output will automatically be scrolled into view. Otherwise,
its current position will be maintained.
2013-06-28 18:59:36 -04:00
Rene Gollent
b8b4219f26 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.
2013-06-28 18:59:35 -04:00
Rene Gollent
7910d8b89c Adjust BCheckBox::MaxSize.
Previously BCheckBox returned unlimited width for its max size. This
became problematic if one wanted to put a checkbox in any kind of
horizontal layout with other controls, since they would expand to use as
much space as possible. This is also in contrast to other controls such
as BButton, which simply return the max to be the same as the preferred.
As such, adjust BCheckBox to do the same.
2013-06-28 18:49:34 -04:00
Rene Gollent
fe448830c9 TeamDebugger: Implement post syscall event handling.
We now watch for file write syscalls in the target team. If they
constitute a write to either stdout or stderr, we attempt to capture the
output, and notify interested listeners accordingly.
2013-06-28 18:49:32 -04:00
Rene Gollent
d692e338d4 Extend Team's listener interface.
Add hooks for sending and listening for console output events.
2013-06-28 18:49:30 -04:00
Rene Gollent
4dc355e9a9 Adjust debug_utils functions.
The functions in question now return an error rather than simply calling
exit() directly when they fail, as this behavior wasn't acceptable for
e.g. Debugger. Adjusted all calling apps accordingly.
2013-06-28 18:49:28 -04:00
Rene Gollent
23f48a24d0 Add event class for the post-syscall debug message. 2013-06-28 18:49:26 -04:00
Rene Gollent
d08227bb68 Add SyscallInfoEvent model class. 2013-06-28 18:49:24 -04:00
Ingo Weinhold
c143884fdf Use incorrect use of BPathMonitor in input/midi/net server
The B_ENTRY_* constants aren't valid watch flags.
2013-06-27 21:57:44 +02:00
Ingo Weinhold
04382d496e BPathMonitor: rewrite
This resolves all issues the test suite uncovered. It should also deal
with hard links correctly, though that hasn't been tested. Still
unsupported are:
* changes due to mounting/unmounting a volume,
* tracking of symlinks in the path components.
2013-06-27 21:57:44 +02:00
Ingo Weinhold
cc4d194aeb Add test suite for BPathMonitor
749 / 1504 tests fail
2013-06-27 21:57:43 +02:00
Ingo Weinhold
8c974aa800 node monitor: add TODO regarding the syscalls 2013-06-27 21:57:43 +02:00
Ingo Weinhold
0d603ac65c Fix node monitoring slot accounting for stop_watching()
NodeMonitorService::RemoveUserListeners() didn't decrement
io_context::num_monitors when removing a listener, so limit checks
would be off afterwards.
2013-06-27 21:57:43 +02:00
Ingo Weinhold
1eda8517f1 BOpenHashTable: Add IsEmpty() 2013-06-27 21:57:43 +02:00
Ingo Weinhold
3e8daeb7bc Add BMessenger::HashValue() 2013-06-27 21:57:42 +02:00
Ingo Weinhold
cb4a05cfdf Missed B_WATCH_FOLDERS_ONLY occurrence 2013-06-27 21:57:42 +02:00
Ingo Weinhold
38afe232de BPathMonitor: pass BMessenger by reference 2013-06-27 21:57:42 +02:00
Ingo Weinhold
7b198d812e B_WATCH_FOLDERS_ONLY -> B_WATCH_DIRECTORIES_ONLY
Stick to the nomenclature generally used in the public API.
2013-06-27 21:57:42 +02:00
Ingo Weinhold
8d572c9264 Add class NotOwningEntryRef
A entry_ref subclass that avoids cloning the entry name.
2013-06-27 21:57:41 +02:00
Ingo Weinhold
3209bc40c5 BPathMonitor: PathHandler::_NotifyTarget(): simplify
* Add optional entry_ref return parameter to _HasFile().
* Simplify _NotifyTarget() by using _HasDirectory() and _HasFile().
2013-06-27 21:57:41 +02:00
Ingo Weinhold
ddd775f5ac BPoseView::FSNotification(): fix issue in debug build 2013-06-27 21:57:41 +02:00
Ingo Weinhold
77ca66cdb7 BPathMonitor: make the node watching mechanism configurable
Add inner class BWatchingInterface and method SetWatchingInterface().
This abstracts the calls to watch_node() and stop_watching(), thus
making it possible to use the path monitor in Tracker.
2013-06-27 21:57:41 +02:00
Ingo Weinhold
ad1875fd70 BPathMonitor: use pthread_once for initialization 2013-06-27 21:57:40 +02:00
Ingo Weinhold
6ca95bd813 PathMonitor.cpp: some style cleanup 2013-06-27 21:57:40 +02:00
Ingo Weinhold
62b0b64124 BStringList::Add(): fix ref counting problem
Handle the case that the private data of the given string is not
shareable.
2013-06-27 21:57:40 +02:00
Ingo Weinhold
5fa3519dec BString::Private: Add IsShareable() 2013-06-27 21:57:40 +02:00
Ingo Weinhold
2752612bc6 BMergedDirectory::GetNextDirents(): fix end-of-list return value 2013-06-27 21:57:40 +02:00
Ingo Weinhold
535207ae9a BPoseView::AddPosesTask(): fix count checks
In case GetNextDirents() returned an error, the wrong blocks were
executed.
2013-06-27 21:57:39 +02:00
Ingo Weinhold
105511275e Move PUuid from shared to support 2013-06-27 21:57:39 +02:00
John Scipione
91a5e06148 ExpressionParser: Fix parse exception string
The main point of this commit is to fix this line:

temp << (char)type << "' got '" << token.string << "'";

which gets printed when DeskCalc encounters a parse error.

Specifically the (char)type part needed fixing.

This code would try to print the char equivalent of a token which got
converted to lower ascii character between 0 and 15. This would at
best result in a newline and never anything helpful.

I took the germ of idea and expanded upon it reassigning the TOKENs to the
numeric values of the printable characters they represent where applicable.
For instance TOKEN_STAR now has a value of 42 which is ascii for '*'. By
using implicit char -> int conversion the numeric value is avoided in the code.

So now (char)type will, in many cases get you the equivalent ascii char
represented by that type. Those that don't such as TOKEN_IDENTIFIER and
TOKEN_CONSTANT are special cased.

Once the TOKEN's values correspond to their ASCII equivalents some other
simplifications became possible interchanging the TOKEN and the character
it represents.
2013-06-26 19:21:09 -04:00
John Scipione
51f758db3f DeskCalc: Style fix, add space around binary op 2013-06-26 19:19:31 -04:00
John Scipione
31650fd465 DeskCalc: Limit precision of large magnitude results
This targets a problem where a numbers with large numbers of non-decimal
significant digits took a long time to round after converting to scientific
notation because they are rounded one character a time.

To solve this, after converting to scientific notation lop off everything
after 40 characters greatly reducing the amount of further rounding
needed.

An example I used to test this was to calculate 10,000! which gives
a result with 35660 significant non-decimal digits (aka a lot). By loping
off numbers after 40 characters before rounding to fit the operation goes
from ~10 seconds to complete to under a second.

I chose 40 as a max as it is large enough to ensure that the result will
get rounded with some leeway provided for font width variations.
Worse-case scenario is the result is off by 1 in the last place.

Numbers with large numbers of significant decimal digits get rounded
by MAPM so aren't a problem.
2013-06-26 19:19:21 -04:00
John Scipione
f9d2a8cb25 DeskCalc: Remove extra FrameResized() call.
BView::ResizeTo() calls FrameResized() which resolves to the virtual
FrameResized() method in CalcView. So, FrameResized() was
getting called twice.
2013-06-26 18:10:54 -04:00
John Scipione
d81cbcf359 DeskCalc: tiny whitespace style fix 2013-06-26 18:08:23 -04:00
Jérôme Duval
a83b0c51c0 pci: memory behind bridge wasn't padded correctly. 2013-06-26 22:27:56 +02:00
Jérôme Duval
b9a31d3e18 xhci: 64bit fixes.
* some coding style fixes.
* adjustments to make use of phys_addr_t where needed.
2013-06-26 21:45:06 +02:00
Jérôme Duval
691f8e5a27 ehci: initializes fItdEntries and fSitdEntries. 2013-06-26 21:45:03 +02:00
Rene Gollent
54574eda59 Correct locking error. 2013-06-25 20:35:09 -04:00
Rene Gollent
bbbe023af3 InspectorWindow: slight behaviorial tweak in failure case.
Don't release the reference to the current block until we get the
notification that the next block has been retrieved. Otherwise, the
previous/next block buttons would cease to work if the requested block
failed to be retrieved.
2013-06-25 18:03:49 -04:00
Rene Gollent
b906e10a5d Fix crash in InspectorWindow.
- In the case where retrieval of a memory block failed, InspectorWindow
didn't handle the notification. Consequently, it never removed itself as
a listener from the failed block, nor did it release its reference for
it. Consequently, if one attempted to retrieve data from the same block
again, walking the listener list would crash due to the already-deleted
entry in the list.

- The success case had the same problem with regards to not removing its
listener, but was masked by virtue of the inspector currently being the
only user of the memory block manager, so in the latter case the blocks
would be properly released/destroyed and the aforementioned walk would
never occur.

- Adjust locking a bit to ensure that manipulating the listener list
always happens with the team lock held.

- Style fixes.
2013-06-25 17:42:06 -04:00
Rene Gollent
2214cb57ee 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.
2013-06-25 17:00:54 -04:00
Jérôme Duval
8a690c4914 acpi: fixed namespace dump, last written data weren't displayed.
* added a copyright header.
* fixed includes order.
* don't return early on B_BAD_SEM_ID as it means the writer has finished,
but there can be data to read.
* free resources in acpi_namespace_free() instead of acpi_namespace_close().
2013-06-25 18:11:41 +02:00
Alexander von Gluck IV
eb6f09d2fc route: Add preferred prefix formats per protocol
* As per mailing list discussions
2013-06-24 18:54:24 -05:00
Alexander von Gluck IV
2e8bac6bce route: Update Next Hop to Gateway as per ML 2013-06-24 18:28:07 -05:00
Alexander von Gluck IV
4dff02682c Revert "debuganalyzer: Fix double free. CID 992566"
This reverts commit ea27e95f48.

* AnEvilYak pointed out that this was a false positive as
  BObjectList can optionally delete on remove.
* I'll add a penny to the bitcoin bad commit jar :)
2013-06-24 16:29:04 -05:00