* Adjust package_repo create command to check if each given package
exists before adding it to the repository writer and fail with
an appropriate message when it does not.
- Due to a slight oversight during optimization refactoring, the length
of the FDE's call frame instructions would sometimes be computed
incorrectly, leading us to overflow past the end of the instructions,
and fail to unwind the frame correctly if the address in question fell
at the end. Fixes a regression introduced in commit
d390ebee9e.
f9ac1e93fb didn't take
into account that the superblock gets written back
from places other than Initialize(), resulting in
unbootable volumes.
Now the first sector will only be erased if the volume
is being initialized.
* When writing the superblock, because it's at sector 1,
sector 0 doesn't get erased. As a result, if an
existing file system was present, identifying details
in sector 0 could cause the partition identifying code
to detect an old file system instead.
Fixes#11136.
- When saving our view state, only save a new set of values if a stack
frame clear is pending. Otherwise, check if there is a previously
existing view state, and take over its values. This ensures that we
correctly remember our previous values when the user is simply switching
stack frames while in a stopped state.
I have at least one CD which does that. There is no problem in handling
it since CP-1252 is a superset of ISO-8859-15.
Also fix the possible buffer overflow in the CD-Text handling, which
could corrupt the stack in case a track title decodes to more than 256
bytes. Now it is properly truncated on a character boundary.
Put more information on a single line. This makes it easier to keep
track of things when debugging higher level parts of the disk stack
(partitionning and file systems).
* When opening documents without be:caret_position,
StyledEdit would place the cursor at the end of
the file. _LoadAttrs() intended to set it to the
beginning; however, a check for an existing BRect
for positioning the window would return early,
preventing the caret position to be set.
Fixes#11463
- Pass address size to DwarfManager, and subsequently DwarfFile's Load()
method, as that information is needed in order to parse the frame
information correctly early on.
- When initially loading debug information, also do a quick pass through
.{debug,eh}_frame, and build a lookup table of offsets. This is then
used later when actual unwinding is requested in order to quickly find
the corresponding FDE/CIE. Should noticeably improve performance when
stepping through code, especially for larger/more complex executable images.
Implements #8613.
In newer versions of udis86, the ud_t.mnemonic field is deprecated,
and one must now call ud_insn_mnemonic() to retrieve that information.
This was causing Debugger to not correctly identify subroutine calls
and jump instructions, which broke the stepping code in various fun
ways.
If the requested read was more than 32 frames, and reading them all at
once failed, we would try to read by chunk of 8 frames. But if the
original frame count was not a multiple of 8 we would not adjust the
count for the last read.
Unfortunately I could still panic the system after fixing this, so it is
not *the* cdda bug.
The new udis makes it possible to hook a symbol lookup function, so we
can get symbol names and offsets instead of raw addresses in call and
jump instrucitons.
In two cases:
* Out of memory and strdup on fName failed. Nothing would be
initialized (mostly harmless: InitCheck would detect this)
* There are no frames in the track: the wav header would be left
uninitialized, and this would be readable from userland (bad thing, but
needs a specifically crafted malicious CD to happen).
I had a KDL when trying to read an audio CD which apparently uses this
as a copy protection scheme.
I don't know if this is the right place to do this, the KDL would happen
further down when the intel partitionning system or bfs would try to
read data from the disk at offset -2048.
This looks better and is what we want here. The difference is subtle,
just a few pixels on the left and right side of the tabview where it now
properly joins the window border.
* As 104Mhz is stores as 10400 on atombios,
and 104000 everywhere else... this conversion
was going the wrong direction.
* Shrink the stored value to 10Khz units to properly
compare to the AtomBIOS value
The rightmost part of the UI actually depends on which tab is selected
on the leftside. Intercept the tab change in the Show method, and
display the correct data.
Fixes#11400.
* The menu items now only set the values for the current window without
saving,
* The settings in the preference window are persistent,
* The "save as defaults" menu item is removed.
Fixes#5030.
I already made this patch in Heidi's clone of BToolbar. Adding it here
allows me to drop Heidi's version altogether.
I also relicensed the header file at the permission of Stephan. The .cpp
file still lists him as author and copyright holder.
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
* The pointer mdt should point to the start of the contents of the
master data table. As defined in struct ATOM_MASTER_DATA_TABLE,
the content begins 4 bytes after the beginning of the table
(which in turn is ctx->data_table bytes from the start of the
AtomBIOS). The wrong parantheses in the cast moved the pointer
somewhere else completely.
* That this apparently worked on many cards is because the mdt
pointer in this function is used just to make sure that the
following dereference is not a NULL-pointer access.
The actual dereference is then done using the CU16() and CU8()
macros which do the casts correctly. However, it only worked when
the wrong pointer plus index lead to some byte which was, by
chance, not zero. For many chips, this was the case.
* For the AtomBIOS of a Radeon HD7850M (Heathrow Pro) it didn't work
out though and the driver couldn't parse tables. With this fix, it
now works on such chips as well.
* Also, fix the same problem in code for master command table.
VariablesView:
- Check to ensure the stack frame actually does have a function
object associated with it before attempting to use it, as this
isn't always the case.
It's now possible to configure the serial port through scripting:
hey SerialConnect set databits to 8
hey SerialConnect set parity to even
etc.
More useful is the ability to connect and disconnect from the port:
hey SerialConnect get port # returns "usb0"
hey SerialConnect set port to usb0
hey SerialConnect delete port
This allows a script to automatically disconnect SerialConnect, do
something with the serial port, and then reconnect SerialConnect. This
can be used for example to run a bootloader and update a firmware
through the same serial port used for debugging, something that's not
easily possible on other systems.
InspectorWindow:
- Inherit from Team::Listener and implement hook for thread state
change events.
- On thread state change, if the new state is stopped, and we have
an active block, release it, and ask to re-inspect.
- Factor out helper function for updating the active block.
- Always ensure the MemoryView is updated when we change blocks.
MemoryView:
- Clean up acquisition of target memory block.
This ensures that the block data is kept up to date when stepping
through code with an inspector window open.
Team:
- Remove expression evaluation event / listener hook. This doesn't
really belong to the Team anyways.
UserInterfaceListener:
- ExpressionEvaluationRequested() now takes an ExpressionInfo object
rather than the individual subcomponents.
ExpressionEvaluationJob:
- Notification of expression evaluation completion is now handled
via the info object's listener interface rather than the Team.
Others:
- Adjust all users of expressions to set themselves up as
ExpressionInfo::Listener subclasses, and consequently add themselves
to the respective info object when requesting evaluation. This
significantly simplifies various things, and also ensures that no
one accidentally gets notified of an expression they didn't actually
ask for, which could occur with the previous Team-based listener
interface. Make all other required adjustments for new interface
usage.
No functional change intended.
VariablesView:
- The view now keeps a mapping of a list of expressions associated
with functions.
- Add actions for adding/removing expressions to variables context menu.
- When setting up to show a new stack frame, also add corresponding expression
nodes and request their evaluation.
- Extend VariablesView::Listener interface to also encompass expression
evaluation requests.
- Don't add context actions for expression nodes.
TeamWindow:
- Implement VariablesView::Listener expression evaluation hook and forward
responses along.
- For expressions we need a Type object to represent their result
type. However, this doesn't need to map to an actual DwarfType,
as we won't need e.g. location and storage format information to
read it out of the target team, so instead derive a simple subclass
representing the appropriate result type.
- Since expression value nodes need to be handled quite differently from
other value nodes, and aren't specifically tied to variable object
instances, create distinct implementing subclasses ExpressionValueNode{Child}
to represent them.
- Add class ExpressionInfo to encapsulate the expression string and result type
of a particular expression instance.
- Add class ExpressionValues to map expression result values correlating to a
function, thread and expression for later use in highlighting changes.
Currently find display adapters and attached displays but nothing more.
I would like it to publish adapters and displays in dev tree, so that
you can open and control the adapter (get firmware, boot display) and
the adapter itself would have child devices for displays (brightness ..).
However that part could use some review, and since my time is limited it
is better to make it availble for others to work on as well.
* Make the buttons pixel-perfect clones of Mac OS 9
* Fix missing drawing of top border when inactive
* Some colors and size tweaks to be closer the Mac OS 9
Remaining problems:
* Does not work well for windows with no tab (eg alerts)
* Still missing the resize knob
* Does not show stack and tile
* Does not show command+opt resize/move highlights
The empty window that would show when no MIDI devices are found would
confuse Haiku users. This was not a problem on the BeBox or older PCs
where a sound card with MPU401 port was standard, so there would always
be something to show.
Fixes#9977.
* Make it possible to extract more useful data from the certificate
* Also get the OpenSSL error message when a certificate can't be
validated. Send it to the verification failure callback so it can be
shown to the user.
Translators are now allowed to use the layout API, but this doesn't work
well when they are used in a non-layout aware window (the view ends up
with a size of 0x0 or some arbitrary size set with
SetExplicitPreferredSize).
To avoid this, detect the case where the translator settings are the
single child of a non-layout window, and force the window to become
layouted.
Fixes#7754.
CliContext/CommandLineUserInterface:
- Process the debug report event asynchronously. The missing lock that
was fixed in commit 5ac34e5a78 highlighted
a problem in how the CLI was handling the case where it was intended to
exit immediately after saving a report, since it issued the quit request
directly from the report event handler. This resulted in locking issues,
as the team debugger would then attempt to tear itself down, during which
it needs to acquire the team lock. However, that was already being held
by the thread in which the CLI was initiating the quit, resulting in a
deadlock.
While the partitioning system does publish partitions as block
devices and report their size in stat(), the old BeOS-style
drivers have no means of reporting it this way.
So we fall back to ioctl(B_GET_GEOMETRY) to find out the size.
This avoids having to copy the strings.
For now we disregard argv[] as it is not remapped before
being used in add_stage2_driver_settings() and is not used
by the linux entry point.
This makes the overo loader panic at the same place as
the beagle xm one now, even though it fails to display
anything with the default RAM size since we allocate
the framebuffer beyond 128MB...
VariablesView::ModelNode:
- Only check if a variable's value has changed if we actually have a
valid previous value to compare against. Otherwise, e.g. variables
that just came into scope but haven't yet been initialized would
show up as changed, while their value is, at that point completely
uninteresting.
This is an external library so it should not be modified. It should be
moved to src/libs to make this clear, or even better, be outsourced as a
package.
Show the summary instead of the version. The layout still sucks, but I will
have to implement some kind of row/flow BLayout to get what I initially had
in mind. Another TODO is to highlight the clicked item somehow.
* Rework existing package listener mechanism to report any interesting
changes. Listen for prominence changes in addition to package state.
* Add featured packages to the FeaturedPackagesView when their prominence
is retrived, and also in _AdoptModel().
* In _AdoptModel(), show the featured packages view when no search filters
are active and installed packages are not shown either. Otherwise show
the list of all packages matching the current filtering.
...into MessagePackageListener and OnePackageMessagePackageListener.
The first one doesn't know which package(s) it's listening to. But it
can filter the change notifications now and only react to certain changes.
The second one knows which package it's listening to.
* Always include last caller and lock value on both UP and MP path.
* Change lock value printing to hex format, as 0xdeadbeef is more
obvious than its decimal counterpart.
TableCellValueRenderer{Utils}:
- The rendering calls now take a boolean indicating if the value
being rendered differs from its previous state. This is taken
into account by rendering it in a different color to indicate
the change. Adjust all implementing subclasses accordingly.
VariablesView::ModelNode:
- Now stores the previous value of the corresponding value node,
and can be queried if its value has changed. Used by renderers.
VariablesView::_{Add,Apply}ViewStateDescendentInfos():
- When walking the model, also store/restore the values of nodes in the
history.
In summation of all the above changes, when stepping through a function,
we now display values that have changed since the last step, or that have
appeared for the first time in a different color.
- When using variable values in an expression, we weren't ensuring
that the resulting value type matched up with the requested
type for the expression, leading to unpredictable results in some
cases.
While the NetBSD entry point is handy as we can use a single uImage
with all 3 blobs, it bypasses U-Boot's own patching of the FDT since
it's not visible to it, so we won't get the RAM size and other things
through it.
CreateThreadEvent::DoDPC() missed a reference release to balance the
acquired reference before queuing the DPC, resulting in the
CreateThreadEvent objects being leaked.
This also removes the destructor that tried to cancel the DPC. Since
the class is reference counted and only destroyed when the DPC has
run and released the last reference, this didn't make much sense.
For cases where a BMessage is passed by area, the remote team id needs
to be passed into BMessage::_SendMessage() so it can transfer the area
to the target team. It falls back to detecting the port owner if said
information is missing. However, since the input_server owns the port
in this situation, the remote team needs to be specified explicitly.
Add the app_server team id to the input acquire message, so input_server
gets the needed info.
As messages that exceed the pass by area threshold are rather rare in
general and shouldn't happen at all in this situation, this does not
fix any immediate problem.
When a message is passed by area, the sender is supposed to transfer
area ownership to the target team. If the area is not mapped within
the current team, accessing the area address would be invalid.
Also mark the area as read-only so accidental writes to the area would
become obvious.
When a message is passed by area, any modification to the message must
first trigger a copy of the message content. The success of this
operation was not checked however, possibly leading to later reallocs
on non-heap memory.
The signal to the team/thread is only actually sent in a deferred
procedure. To ensure that the team/thread stays valid between the DPC
being queued and it actually running, we need to acquire a reference.
Fixes#11390, where the DPC was run after the team was already
destroyed.
* X and Y coordinates of hot point were swapped for 1-bit cursors
* Prefer color cursor over 1-bit one if possible
* Adjust the XOR/AND masks for 1-bit cursors to what the hardware
expects
* Handle switching etween hardware and software cursor.
Patch by Looncraz and Ziusudra, fixes#9261.
This introduces InterruptController and HardwareTimer classes to
handle the SoC specific implementations of timers and ints for
the ARM platform.
These could be improved and moved to a more 'generic' level once
we're confident they are 'good enough'.
NOTE: The OMAP timer implementation is fully untested and probably
completely non-functional....
If we find an FDT (either from uImage or otherwise) we make sure
we map it after mmu_init() and use kernel_args to pass it to the
kernel (so it is available at all times there).
This isn't really a bus_manager yet, but just minimal support so
we can get rid of hardcoded ARM SoC support from the core kernel
code.
Needs lots of work, like proper handling of #address-cells and
the like. Also, generic attribute handling, device_manager
integration, and I could go on for hours ;)
- Draw conditional breakpoints in a different color from regular
ones for easy visual differentiation.
- Right clicking on an existing breakpoint marker now brings up the
condition editing window.
- Ask the architecture for a stack trace directly, as we only
need the top frame.
- Properly update thread state before we go into condition
evaluation. Otherwise, other parts of the debugger potentially
wouldn't notice that we had continued execution in the case
where the condition evaluates to false, and would indicate a
program stop at the breakpoint erroneously.
* On UEFI, pages are allocated top-down; previously,
VM would fail to allocate early pages due to
running into pages allocated at the top and
assume it had run out of pages to map.
Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
* Use Unicode block drawing characters to provide sub-character accuracy
* Also display the download progress percentage as a number
When downloading big packages this helps seeing that the bar continues
moving and that the download is not stalled.
ThreadHandler:
- When a breakpoint event is hit, we now check if there is an
associated UserBreakpoint with a condition attached. If so,
we schedule an evaluation request, and only stop the thread if
that one evaluates to true (or if evaluation fails in some way).
This implements #9713.
General:
- Add message codes for requesting breakpoint configuration.
UserInterfaceListener/TeamDebugger:
- Add/implement hooks for requesting breakpoint condition changes.
BreakpointsView:
- Add button to request editing the currently selected breakpoint's
condition.
TeamWindow:
- Handle request to show breakpoint edit window.
BreakpointEditWindow:
- Implement simple radio-based UI for modifying the current breakpoint's
condition.
Still missing: Actually handling/evaluating the breakpoint conditions in
the ThreadHandler when the breakpoint is hit.