When asked to clear the current stack trace, delay actually doing so
by .25 seconds. If the stack trace is set to a new one in the meantime,
the operation is aborted so we don't reset the trace twice.
Thanks Ingo for the suggestion.
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.
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.
* 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.
- 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.
- 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.
- 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.
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.
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.
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.
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.
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.
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.
- 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.
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.
* 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().
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 :)
* The config space is larger than 255, we need to use an uint16 to access
offsets superior or equal to 256. The current API only proposes an uint8 for this.
This change switches the offset parameter to the uint16 type. Axel hinted that
the used values are the same with such a change (the doc says sign extended to 2 or
4 bytes).
I checked with GCC2 and it's indeed the case when inspecting the memory.
With GCC4, instructions are the same on function call.
* prints info about extended capabilities.
* struct pci_module_info and struct pci_device_module_info are extended with
pci_find_extended_capability().
- 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.
Now takes an optional boolean parameter to indicate that disassembly is
explicitly being requested. Adjust TeamDebugger and LoadSourceCodeJob's
implementations accordingly.
* pci-acpi.cpp is based on the bootloader bios_ia32/acpi.cpp. The ACPI module
has already a dependency on the PCI module. Using pci-acpi.cpp eases the simple
task of finding the PCIe base address to map the config space.
* pci_read_config and pci_write_config in pci_controller.h were using an uint8
for offsets in the config space. Switched to uint16 to enable access to the extended
config space (0x100 and upper). Added a check for these offsets in
pci_mech[1|2]_[read|write]_config() for x86 and other platforms as these mechanisms
don't support a priori the extended config space.