summaryrefslogtreecommitdiff
path: root/Userland/DevTools
AgeCommit message (Collapse)Author
2021-11-17AK: Convert AK::Format formatting helpers to returning ErrorOr<void>Andreas Kling
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.
2021-11-17AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional)Andreas Kling
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.
2021-11-16Profiler: Stop disassembly on invalid instructionsHendiadyoin1
2021-11-16Profiler: Don't try to disassemble empty buffersHendiadyoin1
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-11-10Everywhere: Move shared library checks into a common functionTim Schumacher
While we're at it, unify the various different conditions that are scattered accross the codebase.
2021-11-10Emulator: Restrict library name check when querying symbolsTim Schumacher
Libraries in /usr/lib currently only end in .so, so no contains() is needed for now.
2021-11-10Emulator: Use existing queried library name in load checkTim Schumacher
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.
2021-11-10Profiler: Use existing path split when mmapping librariesTim Schumacher
We already extracted the `path` part of the segment name, so use that for checking if the filename looks like a shared library.
2021-11-08UserspaceEmulator: Add support for SC_uname and SC_sysconf syscallsBrendan Coles
2021-11-08Profiler: Replace Result<T, E> use with ErrorOr<T>Andreas Kling
2021-11-08LibCore: Use ErrorOr<T> for Core::File::copy_file()Andreas Kling
2021-11-08LibCore: Use ErrorOr<T> for Core::File::remove()Andreas Kling
This function returns a subclass of Error, which is now possible.
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_create()Andreas Kling
Another one that was used in a fajillion places.
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()Andreas Kling
This was used in a lot of places, so this patch makes liberal use of ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-11-07UserspaceEmulator: Improve the MMX formatting on environment dumpHendiadyoin1
2021-11-07UserspaceEmulator: Raise an error on FPU stack underflowHendiadyoin1
Accessing an unset part of the FPU stack should not be a simple warning, but should trigger the FPU exception mechanism.
2021-11-07UserspaceEmulator: Remove some unnecessary castingHendiadyoin1
2021-11-07UserspaceEmulator: Stop overriding flags in FCOMIHendiadyoin1
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!
2021-11-07UserspaceEmulator: Fix typos in SoftFPU.[cpp|h]Hendiadyoin1
2021-11-07UserspaceEmulator: Align FPU-exception names with the manualHendiadyoin1
2021-11-07UserspaceEmulator: Check the right flags in FCMOVHendiadyoin1
Also make FCMOVNB do an actual CMOV and not a copy of FILD_m32
2021-11-07UserspaceEmulator: Correct FSCALES roundingHendiadyoin1
We were rounding the wrong way, FSCALE is supposed to trunc internally, while we were flooring. Now LibM exponentials and related tests work :^)
2021-11-07UserspaceEmulator: Always set C1 when roundingHendiadyoin1
2021-11-07UserspaceEmulator: Simplify the definition of the FPU register stackHendiadyoin1
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.
2021-11-07UserspaceEmulator: Use unsigned types for logical MMX shiftingHendiadyoin1
2021-11-02Demos+DevTools+Games: Fix visibility of Object-derivative constructorsBen Wiederhake
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.
2021-11-02HackStudio: Don't close autocomplete after applying #include directoriesthislooksfun
2021-11-02LibGUI: Allow autocomplete to stay open after applyingthislooksfun
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.
2021-11-02HackStudio: Remove unused #includethislooksfun
Found this while looking at who uses GUI::AutocompleteProvider.
2021-11-02HackStudio: Append a / when completing a directorythislooksfun
2021-11-02HackStudio: Correctly handle nested pathsthislooksfun
Previously the paths were concatinated incorrectly, so triggering the autocomplete on `#include "foo/bar"` would never work. Now it does. :^)
2021-11-02HackStudio: Handle autocomplete inside #include's <> and ""thislooksfun
2021-11-02LibGUI: Remove GUI::AutocompleteProvider::Entry::kindthislooksfun
The only code using it was removed in the previous commit.
2021-11-02HackStudio+LibGUI: Handle #include quotes and brackets in the enginethislooksfun
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.
2021-11-02LibGUI: Allow completion suggestions to fill and display different textthislooksfun
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.
2021-11-01UserspaceEmulator: Avoid special character in pseudo-identifierBen Wiederhake
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.
2021-11-01Everywhere: Remove unused ArgsParser headerBen Wiederhake
Found while trying to enumerate all programs that use ArgsParser.
2021-10-31UserspaceEmulator: Fix inconsistent log formattingAndreas Kling
Remove some extra { and } around the PID in log output that weren't used consistently in all logging.
2021-10-31Profiler: Cache parsed DWARF debug information in disassembly viewDaniel Bertalan
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.
2021-10-31Profiler: Load the actual kernel binary for disassemblyDaniel Bertalan
/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.
2021-10-31Profiler: Share the mapped kernel between Profile and DisassemblyModelDaniel Bertalan
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.
2021-10-29HackStudio: Add 'Show Dotfiles' optionMarco Cutecchia
2021-10-27Everywhere: Rename left/right-click to primary/secondaryFiliph Sandström
This resolves #10641.
2021-10-27Kernel + WindowServer: Re-define the interface to framebuffer devicesLiav A
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.
2021-10-25Profiler: Fix disassembling objects with a non-zero `.text` vaddrDaniel Bertalan
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
2021-10-25LibX86: Take load base address into consideration during disassemblyDaniel Bertalan
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.
2021-10-25Profiler: Subtract the kernel's base address when searching for symbolsDaniel Bertalan
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.
2021-10-24Profiler: Handle profiles with more kernel samples than user samplesIdan Horowitz
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`
2021-10-24Profiler: Use profile length in ms as histogram column count directlyIdan Horowitz
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