summaryrefslogtreecommitdiff
path: root/DevTools
AgeCommit message (Collapse)Author
2020-09-24UserspaceEmulator: Use Core::ArgsParserMaciej Zygmanowski
2020-09-23UserspaceEmulator+LibX86: Clean up some obnoxious template spamAndreas Kling
Don't require clients to templatize modrm().read{8,16,32,64}() with the ValueWithShadow type when we can figure it out automatically. The main complication here is that ValueWithShadow is a UE concept while the MemoryOrRegisterReference inlines exist at the lower LibX86 layer and so doesn't have direct access to those types. But that's nothing we can't solve with some simple template trickery. :^)
2020-09-23UserspaceEmulator: Fix off-by-one in code cache accessNico Weber
m_cached_code_end points at the first invalid byte, so we need to update the cache if the last byte we want to read points at the end or past it. Previously we updated the cache 1 byte prematurely in read16, read32, read64 (but not in read8). Noticed by reading the code (the code looked different from read8() and the other 3). I didn't find anything that actually hit this case.
2020-09-23UserspaceEmulator+LibX86: Add support for 64-bit memory reads and writes (#3584)Nico Weber
This is useful for reading and writing doubles for #3329. It is also useful for emulating 64-bit binaries. MemoryOrRegisterReference assumes that 64-bit values are always memory references since that's enough for fpu support. If we ever want to emulate 64-bit binaries, that part will need minor updating.
2020-09-21HackStudio: Add auto-complete capability to the EditorItamar
2020-09-21HackStudio: Add AutoCompleteBoxItamar
Can be used to display the list of autocomplete suggestions and apply a suggestion that was chosen by the user.
2020-09-21HackStudio: Basic C++ autocomplete logicItamar
CppAutoComplete gets a string of code and a position within it, and returns a Vector of auto-complete suggestions that are relevant for the given position. Currently, it's very naive - it uses our CppLexer to find identifiers in the code which the auto-complete target is a prefix of.
2020-09-21LibIPC: Use InputMemoryStream instead of BufferStream.asynts
2020-09-19HackStudio: Move bulk of GUI logic into HackStudioWidgetItamar
Previously, the GUI logic of HackStudio was all stuffed into main(), and it started getting a bit out of hand :)
2020-09-19UserspaceEmulator: Support all msg_iovlens in recvmsg and sendmsgNico Weber
The kernel doesn't support msg_iovlens != 1 yet and nothing passes an amount != 1, but if anyone ever adds support for this they won't have to worry about ue at least.
2020-09-18HackStudio: Only refresh Git widget on save if initializedItamar
2020-09-17Kernel+LibC+UserspaceEmulator: Add SO_TIMESTAMP, and cmsg definitionsNico Weber
When SO_TIMESTAMP is set as an option on a SOCK_DGRAM socket, then recvmsg() will return a SCM_TIMESTAMP control message that contains a struct timeval with the system time that was current when the socket was received.
2020-09-17Kernel+LibC+UserspaceEmulator: Mostly add recvmsg(), sendmsg()Nico Weber
The implementation only supports a single iovec for now. Some might say having more than one iovec is the main point of recvmsg() and sendmsg(), but I'm interested in the control message bits.
2020-09-16Userland: Use find_executable_in_path in UserspaceEmulator.asynts
2020-09-15UsespaceEmulator: Fix minor bugs in recvfrom() interceptionNico Weber
* Pass the correct source address for copying tine addr_length. Previously, this was broken when addr_length was non-nullptr. * Copy min(sizeof(address), address_length) bytes into address, instead of sizeof(address), which might be larger than the user buffer. * Use sockaddr_storage instead of sockaddr_un. In practice they're both the same size, but this is what sockaddr_storage is for. With this (in particular, the first fix), `ue /bin/ntpquery` actually gets past the recvfrom() call :^)
2020-09-15UserspaceEmulator: Intercept sendto()Nico Weber
With this, `ue /bin/ntpquery` can be used to test sendto() and recvfrom() in ue. (It eventually hits an unimplemented FILD_RM64, but not before doing emulated network i/o and printing response details.)
2020-09-15HackStudio: Refresh the Git widget state on file saveItamar
2020-09-15HackStudio: View unstaged diffs in files with DiffViewerItamar
2020-09-15HackStudio: Add functionality to GitRepo objectItamar
Added functionality for: - Original files contents (without the current changes) - Unstaged diffs - Checking whether a file is tracked
2020-09-15HackStudio: Add DiffViewer widgetItamar
This widget presents a diff in a nice graphical way, side by side.
2020-09-15HackStudio: Make the actions tab visible when using the form editorItamar
Previously, the strucutre of the HackStudio widgets made it so the actions tab would be hidden when the "edit mode" was something other than EditMode::Text (for example, when using the form editor).
2020-09-15HackStudio: Fix "Add new Editor" actionItamar
2020-09-15HackStudio: Add "commit" and "refresh" actions to Git widgetItamar
2020-09-15HackStudio: Add basic Git integrationItamar
This adds a "Git" tab to Hackstudio. Currently has support for staging and unstaging files.
2020-09-13HackStudio: Tighten some unnecessarily broad lambda capturesAndreas Kling
2020-09-13Kernel: Make copy_to/from_user safe and remove unnecessary checksTom
Since the CPU already does almost all necessary validation steps for us, we don't really need to attempt to do this. Doing it ourselves doesn't really work very reliably, because we'd have to account for other processors modifying virtual memory, and we'd have to account for e.g. pages not being able to be allocated due to insufficient resources. So change the copy_to/from_user (and associated helper functions) to use the new safe_memcpy, which will return whether it succeeded or not. The only manual validation step needed (which the CPU can't perform for us) is making sure the pointers provided by user mode aren't pointing to kernel mappings. To make it easier to read/write from/to either kernel or user mode data add the UserOrKernelBuffer helper class, which will internally either use copy_from/to_user or directly memcpy, or pass the data through directly using a temporary buffer on the stack. Last but not least we need to keep syscall params trivial as we need to copy them from/to user mode using copy_from/to_user.
2020-09-12HackStudio: Reduce debug spamBen Wiederhake
2020-09-11HackStudio: Use widget override cursorsAndreas Kling
2020-09-11LibGUI+WindowServer: Rename window "override cursor" to just "cursor"Andreas Kling
Let's just say each window has a cursor, there's not really overriding going on.
2020-09-10LibGfx: Move StandardCursor enum to LibGfxAndreas Kling
This enum existed both in LibGUI and WindowServer which was silly and error-prone.
2020-09-09Kernel+LibC+UE: Introduce SIGINFO (generated with ^T)Andreas Kling
This signal is ignored by default, but can be caught to implement state reporting a la BSD. :^)
2020-08-31DevTools+Apps: Set correct icons for ThemeEditor and VisualBuilderthankyouverycool
VB appears deprecated in favor of HackStudio, but until it's officially gone-no app left behind!
2020-08-30UserspaceEmulator: Emulate two FPU instructions!Nico Weber
2020-08-30HackStudio: Highlight register changes, minor disassembly view fixLuke
Also adds shortcuts for step in (F11), step out (Shift-F11) and step over (F10).
2020-08-30Kernel+LibC+UE: Implement sleep() via sys$clock_nanosleep()Andreas Kling
This doesn't need to be its own syscall either. :^)
2020-08-30Kernel+LibC+UE: Implement usleep() via sys$clock_nanosleep()Andreas Kling
This doesn't need to be its own syscall. Thanks @BenWiederhake for the idea. :^)
2020-08-30VisualBuilder: Avoid unnecessary lambdaBen Wiederhake
2020-08-30HackStudio: Mark default action in context menuBen Wiederhake
2020-08-30IPCCompiler: Unbreak building with extra debug macrosBen Wiederhake
2020-08-28HackStudio: Mark compilation-unit-only functions as staticBen Wiederhake
2020-08-27Base: Rename icon subdirectories by explicit app namethankyouverycool
Renames widgets/ to hackstudio/, vbwidgets/ to visualbuilder/ and paintbrush/ to pixelpaint/.
2020-08-27Base: Move 16x16 common icons to /res/icons/16x16/thankyouverycool
Drops the '16' suffix from filenames. Resizes inconsistent audio-volume icons to intended size.
2020-08-27Base: Create /res/icons/serenity for misc. sized system iconsthankyouverycool
2020-08-27Meta: Force semi-colon after MAKE_AK_NONXXXABLE()Ben Wiederhake
Before, we had about these occurrence counts: COPY: 13 without, 33 with MOVE: 12 without, 28 with Clearly, 'with' was the preferred way. However, this introduced double-semicolons all over the place, and caused some warnings to trigger. This patch *forces* the usage of a semi-colon when calling the macro, by removing the semi-colon within the macro. (And thus also gets rid of the double-semicolon.)
2020-08-26Base+HackStudio: Rename project file extensions to .hspthankyouverycool
More concise in Views and consistent with other extensions.
2020-08-26LibGUI+HackStudio: Associate new icons with their extensionsthankyouverycool
2020-08-26LibGUI: Move table view headers into their own widgetAndreas Kling
This patch introduces the HeaderView class, which is a widget that implements the column headers of TableView and TreeView. This greatly simplifies event management in the view implementations and also makes it much easier to eventually implement row headers.
2020-08-25HackStudio: Add a registers view for the current function in debug modeLuke
2020-08-25HackStudio: Add a disassembly view for the current function in debug modeLuke
2020-08-25LibDebug: Move everything into the "Debug" namespaceLuke