Age | Commit message (Collapse) | Author |
|
This isn't a complete conversion to ErrorOr<void>, but a good chunk.
The end goal here is to propagate buffer allocation failures to the
caller, and allow the use of TRY() with formatting functions.
|
|
Also add slightly richer parse errors now that we can include a string
literal with returned errors.
This will allow us to use TRY() when working with JSON data.
|
|
|
|
|
|
|
|
While we're at it, unify the various different conditions that are
scattered accross the codebase.
|
|
Libraries in /usr/lib currently only end in .so, so no contains() is
needed for now.
|
|
We already asked the region about what its library name is, and we also
use that value when maybe constructing a path, so let's make the check
use that as well.
|
|
We already extracted the `path` part of the segment name, so use that
for checking if the filename looks like a shared library.
|
|
|
|
|
|
|
|
This function returns a subclass of Error, which is now possible.
|
|
Another one that was used in a fajillion places.
|
|
This was used in a lot of places, so this patch makes liberal use of
ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
|
|
|
|
Accessing an unset part of the FPU stack should not be a simple warning,
but should trigger the FPU exception mechanism.
|
|
|
|
We no longer override the flags we just set. We now also unset of, af,
and sf after the comparison.
This fixes the asin function for LibM!
|
|
|
|
|
|
Also make FCMOVNB do an actual CMOV and not a copy of FILD_m32
|
|
We were rounding the wrong way, FSCALE is supposed to trunc internally,
while we were flooring.
Now LibM exponentials and related tests work :^)
|
|
|
|
Long doubles are always at least 80 bits wide in memory and it suffices
if we can address these 80 bits, to mark the long double as NAN at the
end of an MMX instruction, so the additional magic using conditional
types is unnecessary.
|
|
|
|
Derivatives of Core::Object should be constructed through
ClassName::construct(), to avoid handling ref-counted objects with
refcount zero. Fixing the visibility means that misuses like this are
more difficult.
|
|
|
|
Previously the autocomplete box would always close after applying a
suggestion. This is the desired behavior in almost all cases, but there
are some situations (like autocompleting paths) where it would be nicer
to keep the autocomplete box open after applying the suggestion.
|
|
Found this while looking at who uses GUI::AutocompleteProvider.
|
|
|
|
Previously the paths were concatinated incorrectly, so triggering
the autocomplete on `#include "foo/bar"` would never work. Now it
does. :^)
|
|
|
|
The only code using it was removed in the previous commit.
|
|
Previously we had a special case in order to auto-append quotes or
angle brackets to #include statements. After the previous commit this
is no longer necessary.
|
|
There are times when it is nice to display one suggestion but fill
something different. This lays the groundwork for allowing
GMLAutocompleteProvider to automatically add ': ' to the end of
suggested properties, while keeping the ': ' suffix from cluttering up
the suggestion UI.
|
|
In the generated HTML code, '#' gets interpreted as the beginning of a
shell comment, which throws the syntax highlighting off. Regardless,
spelling out the meaning of the '#' might make it more readable.
|
|
Found while trying to enumerate all programs that use ArgsParser.
|
|
Remove some extra { and } around the PID in log output that weren't used
consistently in all logging.
|
|
This changes browsing through disassembled functions in Profiler from a
painfully sluggish experience into quite a swift one. It's especially
true for profiling the kernel, as it has more than 10 megabytes of DWARF
data to churn through.
|
|
/boot/Kernel.debug only contains the symbol table and DWARF debug
information, and has its `.text` and other PT_LOAD segments stripped
out. When we try to parse its data as instructions, we get a crash from
within LibX86.
We now load the actual /boot/Kernel binary when we want to disassemble
kernel functions.
|
|
There is no point in keeping around a separate MappedFile object for
/boot/Kernel.debug for each DisassemblyModel we create and re-parsing
the kernel image multiple times. This will significantly speed up
browsing through profile entries from the kernel in disassembly view.
|
|
|
|
This resolves #10641.
|
|
We create a base class called GenericFramebufferDevice, which defines
all the virtual functions that must be implemented by a
FramebufferDevice. Then, we make the VirtIO FramebufferDevice and other
FramebufferDevice implementations inherit from it.
The most important consequence of rearranging the classes is that we now
have one IOCTL method, so all drivers should be committed to not
override the IOCTL method or make their own IOCTLs of FramebufferDevice.
All graphical IOCTLs are known to all FramebufferDevices, and it's up to
the specific implementation whether to support them or discard them (so
we require extensive usage of KResult and KResultOr, together with
virtual characteristic functions).
As a result, the interface is much cleaner and understandable to read.
|
|
Previously, we assumed that the `.text` segment was loaded at vaddr 0 in
shared object, which is not the case with `-z separate-code` enabled.
Because we didn't do the right calculations to translate an address from
a performance event into its value within the ELF file, Profiler would
try to disassemble out-of-bounds memory locations, leading to a crash.
This commit also changes `LibraryMetadata` to apply to a loaded library
as a whole, not just to one of its segments (like .text or .data). This
lets us simplify the interface, as we no longer have to worry about
`text_base`.
Fixes #10628
|
|
Since our executables are position-independent, the address values
extraced from processes don't correspond to their values within the ELF
file. We have to offset the absolute addresses by the load base address
to get the relative symbol that we need for disassembly.
|
|
Now that the kernel is compiled as a PIE, all addresses are relative to
the loaded base address, so Symbolication::kernel_base has to be
subtracted off from the absolute addresses if we want to symbolicate
them.
|
|
Previously we assumed there were less kernel samples than user samples,
by implicitly using the kernel histogram size for indicies to the user
histogram. Such a profile can be reproduced by profiling a very short
lived program like true: `profile -c true`
|
|
Beforehand we were dividing the frame width by the profile length in ms
and then dividing the frame width by the result once more, which is
equivalent to (but slower) just using the length in ms directly, aside
from the case in which the profile is less than 1 ms long, in which
case this would trigger undefined behaviour due to the division by zero
|