summaryrefslogtreecommitdiff
path: root/Userland/DevTools
AgeCommit message (Collapse)Author
2021-12-23Kernel+UE+LibC: Store address as void* in SC_m{re,}map_paramsDaniel Bertalan
Most other syscalls pass address arguments as `void*` instead of `uintptr_t`, so let's do that here too. Besides improving consistency, this commit makes `strace` correctly pretty-print these arguments in hex.
2021-12-23Kernel+UE: Add MAP_FIXED_NOREPLACE mmap() flagDaniel Bertalan
This feature was introduced in version 4.17 of the Linux kernel, and while it's not specified by POSIX, I think it will be a nice addition to our system. MAP_FIXED_NOREPLACE provides a less error-prone alternative to MAP_FIXED: while regular fixed mappings would cause any intersecting ranges to be unmapped, MAP_FIXED_NOREPLACE returns EEXIST instead. This ensures that we don't corrupt our process's address space if something is already at the requested address. Note that the more portable way to do this is to use regular MAP_ANONYMOUS, and check afterwards whether the returned address matches what we wanted. This, however, has a large performance impact on programs like Wine which try to reserve large portions of the address space at once, as the non-matching addresses have to be unmapped separately.
2021-12-23UserspaceEmulator: Replace intersecting ranges if MAP_FIXED is specifiedDaniel Bertalan
This commit changes UserspaceEmulator to match the behavior that the kernel has since ce1bf37.
2021-12-23Profiler: Use AK::any_of for process filtrationHendiadyoin1
Equivalent to std::ranges::any_of as clang-tidy suggests.
2021-12-23Profiler: Always use FlyString const&'s in ProfileNode constructionHendiadyoin1
No need to copy and move them around, just to pass them as a `String const&` to the constructor. We still end up copying it to a normal String in the end though...
2021-12-23Profiler: Remove one else-after-returnHendiadyoin1
2021-12-23Profiler: Don't return constant copies of GUI::ModelIndexHendiadyoin1
2021-12-23Profiler: Add some implied auto qualifiersHendiadyoin1
2021-12-23UserspaceEmulator: Return ValueAndShadowReference& on operator=Hendiadyoin1
This is what normal assign operators do and what clang-tidy expects form us.
2021-12-23UserspaceEmulator: Avoid copies of non trivial types on invocationsHendiadyoin1
These include AK::String and X86::Instruction
2021-12-23UserspaceEmulator: Remove redundant private specifier in SoftCPU.hHendiadyoin1
2021-12-23UserspaceEmulator: Remove some else-after-returnsHendiadyoin1
2021-12-23UserspaceEmulator: Add some implied auto qualifiersHendiadyoin1
2021-12-22HackStudio: Attach debuggee to "Console" terminal tabItamar
Previously the debuggee process used the same tty of the HackStudio process. We now set things up so the debuggee gets attached to the TerminalWrapper in the "Console" tab.
2021-12-22HackStudio: Separate master & slave PTY setup in TerminalWrapperItamar
Previously the setup for both the master and slave pseudoterminals was done in TerminalWrapper::run_command. This commit separates the relevant logic into TerminalWrapper::setup_master_pseudoterminal and TerminalWrapper::setup_slave_pseudoterminal.
2021-12-22HackStudio: Rename "Build" tab to "Console"Itamar
The TerminalWrapper in this tab is not only used for displaying build output, so "Console" would be a better name.
2021-12-22Kernel: Move userspace virtual address range base to 0x10000Idan Horowitz
Now that the shared bottom 2 MiB virtual address mappings are gone userspace can use lower virtual addresses.
2021-12-21AK+Everywhere: Replace __builtin bit functionsNick Johnson
In order to reduce our reliance on __builtin_{ffs, clz, ctz, popcount}, this commit removes all calls to these functions and replaces them with the equivalent functions in AK/BuiltinWrappers.h.
2021-12-21Profiler: Add horizontal_scrollbar height to initial_heightAstraeus-
This prevents the scrollbar from covering the TimelineTrack when there is one
2021-12-20Profiler: Display tooltip when hovering over flamegraph barsRok Povsic
2021-12-20Profiler: Extract the bar label String into a private methodRok Povsic
2021-12-18Profiler: Convert to try_create_default_iconAstraeus-
and sprinkle in some more TRY() statements
2021-12-18Playground: Convert to try_create_default_iconAstraeus-
and sprinkle in some more TRY() statements
2021-12-18Inspector: Convert to try_create_default_iconAstraeus-
2021-12-12UserspaceEmulator: Remove support for SC_select syscallJean-Baptiste Boric
2021-12-12UserspaceEmulator: Add support for SC_poll syscallJean-Baptiste Boric
2021-12-12UserspaceEmulator: Sort syscalls in alphabetic orderJean-Baptiste Boric
2021-12-11Playground: Remove redundant pledge()bugreport0
2021-12-11Inspector: Update pledge() idiombugreport0
2021-12-11Everywhere: Fix -Winconsistent-missing-override warnings from ClangDaniel Bertalan
This option is already enabled when building Lagom, so let's enable it for the main build too. We will no longer be surprised by Lagom Clang CI builds failing while everything compiles locally. Furthermore, the stronger `-Wsuggest-override` warning is enabled in this commit, which enforces the use of the `override` keyword in all classes, not just those which already have some methods marked as `override`. This works with both GCC and Clang.
2021-12-09HackStudio+TextEditor: Persist EditingEngineType across editorsscwfri
Persist EditingEngine mode in HackStudio and TextEditor when opening new files or editing splits. Previously, the EditingEngine defaulted to a RegularEditingEngine for a new Editor, even if Vim Emulation had been selected in the existing Editor.
2021-12-08Inspector: Remove unused includesBen Wiederhake
Found while working on something else.
2021-12-06LibIPC: Add IPC::take_over_accepted_client_from_system_server<Client>()Andreas Kling
This is an encapsulation of the common work done by all of our single-client IPC servers on startup: 1. Create a Core::LocalSocket, taking over an accepted fd. 2. Create an application-specific ClientConnection object, wrapping the socket. It's not a huge change in terms of lines saved, but I do feel that it improves expressiveness. :^)
2021-12-05Userland: Cast unused BackgroundAction::construct() results to voidSam Atkins
User code does not need to keep this alive, so casting to void is safe. But maybe a bit weird.
2021-12-04HackStudio: Fix cursor not jumping to column 1 in the embedded terminalDaniel Bertalan
Normally, it's the TTY layer's job to translate '\n' into the separate '\r' and '\n' control characters needed by the terminal to move the cursor to the first column of the next line. (see 5d80debc1f891cacb155aa7eaaad51a9a3325ec9). In HackStudio, we directly inject data into the TerminalWidget to display command status. This means that this automatic translation doesn't happen, so we need to explicitly give it the '\r' too.
2021-12-03LibCpp: Add "ignore invalid statements" option to PreprocessorItamar
When we run the Preprocessor from the CppComprehensionEngine of the language server, we don't want the preprocessor to crash if it encounters an invalid preprocessor statement (for example, an #endif statement without an accompanying previous #if statement). To achieve this, this commit adds an "ignore_invalid_statements" flag to the preprocessor which is set by the CppComprehensionEngine. Fixes #11064.
2021-12-03HackStudio: Decrease the maximal crash frequency of the server to 10 secItamar
The maximal crash frequency of the language server was previously 3 seconds, but in practice it was too high. When working with larger projects the language server can get into a "crash and respawn" loop that takes more than 3 seconds. 10 seconds seems like a reasonable threshold beyond which we no longer attempt to respawn the server.
2021-12-03HackStudio: Only send the content of open files to language serverItamar
When respawning the language server, we only need to send the content of opened files to the server. The on-disk content of files that are not currently open is up to date, so the server can read them on its own.
2021-12-03HackStudio: Add HackStudio::for_each_open_fileItamar
2021-11-30CrashReporter+HackStudio: Let's call it "Debug in Hack Studio"Andreas Kling
"Inspect in Hack Studio" was a bit vague.
2021-11-30HackStudio: Scope the "delete file from project" action to tree viewAndreas Kling
Otherwise it triggers when trying to delete characters in the editor.
2021-11-28LibIPC+IPCCompiler+AK: Make IPC value decoders return ErrorOr<void>Andreas Kling
This allows us to use TRY() in decoding helpers, leading to a nice reduction in line count.
2021-11-28Everywhere: Use default execpromises argument for Core::System::pledgeBrian Gianforcaro
2021-11-26UserspaceEmulator: Fix after add_positional_argument API change :^)Brian Gianforcaro
Get UE compiling again after the Vector<String> API was changed to Vector<StringView>.
2021-11-26HackStudio: Port to LibMain :^)Federico Guerinoni
2021-11-24Kernel+UE+LibC: Remove unused dbgputch syscallBen Wiederhake
Everything uses the dbgputstr syscall anyway, so there is no need to keep supporting it.
2021-11-24LibDesktop: Make allowlist APIs return ErrorOr<void>Andreas Kling
This makes it very smooth to use TRY() when setting up these lists, as you can see in the rest of this commit. :^)
2021-11-24Inspector: Port to LibMain :^)Andreas Kling
2021-11-24Playground: Port to LibMain :^)Andreas Kling
2021-11-24Profiler: Port to LibMain :^)Andreas Kling