summaryrefslogtreecommitdiff
path: root/Userland/DevTools
AgeCommit message (Collapse)Author
2021-09-11UserspaceEmulator: Ignore perf_event and perf_register_string syscallsAndreas Kling
We can just fail these with ENOSYS pending a full implementation.
2021-09-10HackStudio: Reuse TextDocument::is_modified()Karol Kosek
Previously, the modification tag in the editor file label was unset only after a file was saved. This commit will also unset the tag if you undo the stack (for example by hitting Ctrl+Z) to the last saved state.
2021-09-09HackStudio: Preserve the untitled filename text on file modificationKarol Kosek
Previously, the title of an unnamed file would just disappear from the editor label if you started typing.
2021-09-07UserspaceEmulator: Handle SO_ERROR in getsockoptHendiadyoin1
This makes GUI applications work again
2021-09-07LibELF: Use StringView to carry temporary strings in auxiliary vectorAndreas Kling
Let's not force clients to provide a String.
2021-09-06Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safeAli Mohammad Pur
2021-09-05Userland: Switch static_assert of type sizes to AK::AssertSizeBrian Gianforcaro
2021-09-04HackStudio: Drop files to the selected editorKarol Kosek
Previously, the files were opened in the current editor, instead of one that received a drop event.
2021-09-03AK: Rename create<T> => make_ref_counted<T>Andreas Kling
And also try_create<T> => try_make_ref_counted<T>. A global "create" was a bit much. The new name matches make<T> better, which we've used for making single-owner objects since forever.
2021-09-02LibCore+Userland: Implement Core::deferred_invokesin-ack
Core::deferred_invoke is a way of executing an action after previously queued events have been processed. It removes the requirement of having/being a Core::Object subclass in order to defer invocation through Core::Object::deferred_invoke. Core::Object::deferred_invoke now delegates to Core::deferred_invoke. The version with the Object& argument is still present but will be removed in the following commits. This commit additionally fixes a new places where the DeferredInvocationEvent was dispatched to the event loop directly, and replaces them with the Core::deferred_invoke equivalent.
2021-09-01Profiler: Minor static code analysis issues in FlameGraphViewBrian Gianforcaro
2021-09-01Profiler: Use = default for empty destructorBrian Gianforcaro
2021-09-01HackStudio: Fix typo in C++ file extension mapping codeBrian Gianforcaro
This looks like a copy past bug where we were checking "cc" twice instead of checking for the equivalent header extension. Found by Sonar Cloud.
2021-08-31Profiler: Add a flamegraph view for the stackNicholas Hollett
The flamegraph makes it easier to quickly spot expensive functions, based on the width of their bar.
2021-08-30Everywhere: Pass AK::Format TypeErasedFormatParams by referenceBrian Gianforcaro
This silences a overeager warning in sonar cloud, warning that slicing could occur with `VariadicFormatParams` which derives from `TypeErasedFormatParams`. Reference: https://sonarcloud.io/project/issues?id=SerenityOS_serenity&issues=AXuVPBO_k92xXUF3qWsm&open=AXuVPBO_k92xXUF3qWsm
2021-08-30HackStudio: Add "Go Back" and "Go Forward" navigation actionsItamar
These actions allow the user to move backwards & forwards between previous project locations they were at.
2021-08-30HackStudio: Optionally pass line & column to open_fileItamar
This makes it easier to open a file at a specific location.
2021-08-28UserspaceEmulator: Profiles are now expected to have a `strings` arrayBrian Gianforcaro
The kernel profiles were recently changed to have a `strings` array as part of the profile objects. The `ProfileViewer` now checks for that during startup and declares the profile invalid if the array is not present. The UserspaceEmulator doesn't use the API which the kernel exposed the string array for, so just fake it by always adding an empty array to the generated profiles.
2021-08-28UserspaceEmulator: Make generated profiles debugable with cli toolsBrian Gianforcaro
The fact that profiles are json on one giant line makes them very difficult to debug when things go wrong. Instead make sure to wrap each event or sample on a newline so you can easily grep/heap/tail the profile files.
2021-08-28Everywhere: Move all host tools into the Lagom/Tools subdirectoryAndrew Kaster
This allows us to remove all the add_subdirectory calls from the top level CMakeLists.txt that referred to targets linking LagomCore. Segregating the host tools and Serenity targets helps us get to a place where the main Serenity build can simply use a CMake toolchain file rather than swapping all the compiler/sysroot variables after building host libraries and tools.
2021-08-28StateMachineGenerator: Don't move() return value from actions()Andrew Kaster
With the proper warnings enabled, this gives a Wpessimizing-move warning
2021-08-26Terminal+LibVT: Use LibConfig instead of Core::ConfigFileAndreas Kling
2021-08-25HackStudio: Update the tree view cursor on editor change and 'Save as'Karol Kosek
The more important thing here is to update the tree view on 'Save As..', as we want to drop every connection from an old file. Updating the tree view on current editor change is just a cool small bonus. :^)
2021-08-25HackStudio: Add "New File" actions for different file extensionsMarco Cutecchia
Currently this supports the following file types: cpp, header, gml, js, css, html and plain files
2021-08-22HackStudio: Update every editor with matching filename on 'Save as...'Karol Kosek
Prior this change, if user had more than two copies of one file opened in a split view, then only the active editor was renamed, when the others had the same file contents changed. This change will set a new file name for every file. The is_null() check is for uncreated files, as they shouldn't be treated as the same single file.
2021-08-22HackStudio: Convert selected path to a relative path on 'Save as...'Karol Kosek
This makes the editor title a bit more consistent with the other files and removes duplicating the file name in the file history when reopening that file.
2021-08-22HackStudio: Warn about unsaved changes on opening different projectLennon Donaghy
2021-08-22HackStudio: Fix editor not marking file with unsaved changes as dirtyLennon Donaghy
The editor's on_change callback was being overwritten in HackStudioWidget.cpp in order to call update_gml_preview on every change. This stopped the original callback from being called and marking files as dirty when changed. Now we call update_gml_preview in a new callback within the editor wrapper, which is then called within the original on_change callback in the editor.
2021-08-22HackStudio: Fix GitWidget issues with switching between projectsLennon Donaghy
GitWidget no longer crashes upon trying to create a repository for a new project, and it correctly updates after opening a different project. A new method, change_repo, has been added to make this work, which changes m_repo_root and resets most of the widget's state in order to make this work.
2021-08-22HackStudio: Moved code closing project from open_project to own methodLennon Donaghy
Take the code which closes the current project out of open_project method and move it into its own method.
2021-08-22HackStudio: Call update_gml_preview() to reset when opening new projectLennon Donaghy
2021-08-22HackStudio: Make FindInFilesWidget reset when opening new projectLennon Donaghy
Add method to FindInFilesWidget which resets the model in order to clear the output when needed, and use this when a new project is opened.
2021-08-22HackStudio: Stop debugger when opening new projectLennon Donaghy
Moved code to stop the debugger in the HackStudioWidget destructor to a new method so that this can be called in both the destructor and when opening a new project.
2021-08-22HackStudio: Clear embedded terminal upon opening a different projectLennon Donaghy
2021-08-22HackStudio: Clear ToDo entries upon opening new projectLennon Donaghy
The ToDoEntries and ToDoEntriesWidget classes now have methods for clearing the entries, before entries would stay permanently, even after switching to a new project.
2021-08-22HackStudio: Move handle_external_file_deletion logic into own methodLennon Donaghy
Added a close_file_in_all_editors method to HackStudioWidget and moved the code from handle_external_file_deletion into it so that it can be reused elsewhere to close files.
2021-08-22Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to opennetworkException
This patch brings the ConfigFile helpers for opening lib, app and system configs more inline with the regular ConfigFile::open functions.
2021-08-21HackStudio: Fix ds => fs typo in fs changed check in RegistersModelLuke Wilde
The changed check for `fs` was accidentally comparing the current `ds` to the previous `fs`.
2021-08-20HackStudio: Update the window title after changing a file nameKarol Kosek
This is a very similar fix as the previous commit, but here it's due to my oversight when I was adding an 'Save as..' feature.
2021-08-20HackStudio: Update the window title after changing an active editorKarol Kosek
Prior this change, the window title was updated only when a new file has been opened, which means that it wasn't updated when user selected an already opened file in the split view. This change updates the title whenever the active editor changes. In addition, this title update logic has now its own function as it'll also be used in the next commit. :)
2021-08-19HackStudio: Fix "navigate to include"Itamar
This fixes an off-by-one error in the "navigate to include" feature of HackStudio.
2021-08-19LibCpp: Handle circular imports gracefullyItamar
This patch prevents CppComprehensionEngine from endlessly looping when there's a circular #include in the code. We now keep track of the set of currently processed files, and will not re-process a file if it already exists in this set. When we're done with processing a file it is removed from this set. The pragma once directive is not yet implemented, but regardless a mechanism that prevents #include loops even in the absence of pragma once is desired.
2021-08-18Profiler: Limit the initial size of the timeline containerAndreas Kling
If there are a lot of process timeline tracks, we don't want to make the window gigantic. So let's just put a limit on it.
2021-08-18Userland+LibGUI: Add shorthand versions of the Margins constructorsin-ack
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same margin on all edges, for example. The constructors follow CSS' style of specifying margins. The added constructors are: - Margins(int all): Sets the same margin on all edges. - Margins(int vertical, int horizontal): Sets the first argument to top and bottom margins, and the second argument to left and right margins. - Margins(int top, int vertical, int bottom): Sets the first argument to the top margin, the second argument to the left and right margins, and the third argument to the bottom margin.
2021-08-18Userland+LibGUI: Make Margins arguments match CSS orderingsin-ack
Previously the argument order for Margins was (left, top, right, bottom). To make it more familiar and closer to how CSS does it, the argument order is now (top, right, bottom, left).
2021-08-14UserspaceEmulator+LibC: Use sys$emuctl() to disable auditing in mallocDaniel Bertalan
It was fragile to use the address of the body of the memory management functions to disable memory auditing within them. Functions called from these did not get exempted from the audits, so in some cases UserspaceEmulator reported bogus heap buffer overflows. Memory auditing did not work at all on Clang because when querying the addresses, their offset was taken relative to the base of `.text` which is not the first segment in the `R/RX/RW(RELRO)/RW(non-RELRO)` layout produced by LLD. Similarly to when setting metadata about the allocations, we now use the `emuctl` system call to selectively suppress auditing when we reach these functions. This ensures that functions called from `malloc` are affected too, and no issues occur because of the inconsistency between Clang and GCC memory layouts.
2021-08-14UserspaceEmulator: Make call rm32 work with address on the stackDaniel Bertalan
Previously, we pushed the old `eip` on the stack before reading the new address, which made us jump to the wrong place if the destination was relative to the `esp`.
2021-08-14UserspaceEmulator: Prefix MmapRegions' name with '(UE)'Daniel Bertalan
When printing a backtrace, each library's base address is found by walking through all memory regions in the coredump, and selecting the address of the first region whose name begins with the library's soname. This is done to support the Clang toolchain, where .text is not at offset 0. However, because the libraries loaded by the emulated process used the same names, we could not distinguish those with the ones used by UserspaceEmulator, so the backtrace ended up being garbage. Using the libraries mapped by UE would not be a sufficient, as the running application could ask for other libraries too, and doing away with setting names would make debugging issues within UE code more difficult.
2021-08-14LibCpp: Understand preprocessor macro definition and invocationItamar
The preprocessor now understands when a function-like macro is defined, and can also parse calls to such macros. The actual evaluation of function-like macros will be done in a separate commit.
2021-08-14Profiler: Set the initial size of the timeline container to a snug fitAndreas Kling