Commit Graph

383 Commits

Author SHA1 Message Date
Andreas Kling
a1e7aa330c HackStudio: Don't use an OOB TextRange when looking for hovered text
We could going +1 past the end of a TextDocumentLine here. This caused
us to crash in the brave new world, so we could find it. :^)
2020-05-18 20:44:31 +02:00
Andreas Kling
cd29844632 LibIPC: Allow opt-in UTF-8 validation on message parameters
You can now mark String message parameters with the [UTF8] attribute.
This will cause the generated decoder to perform UTF-8 validation and
reject the message if the given parameter is not a valid UTF-8 string.

This frees up the receiving side from having to do this validation at
a higher level.
2020-05-16 14:13:09 +02:00
Sergey Bugaev
b8fef58c0c ProfileViewer: Fix opening the kernel image
The kernel image is now at /boot/Kernel (not /boot/kernel), so adjust
the paths accordingly.
2020-05-15 17:41:54 +02:00
Sergey Bugaev
450a2a0f9c Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-14 20:15:18 +02:00
Andreas Kling
977863ea07 LibGUI: Include keyboard modifier state with button on_click calls
This will allow you us to implement special behavior when Ctrl+clicking
a button.
2020-05-12 20:31:16 +02:00
Andreas Kling
413ab652c8 LibIPC+IPCCompiler: Templatize encoding/decoding of Optional<T>
This was the last one! IPCCompiler no longer has any type-specific
encoding/decoding logic! :^)
2020-05-12 19:04:05 +02:00
Andreas Kling
fbda28248a LibGfx+IPCCompiler: Add IPC encoders for Color and ShareableBitmap 2020-05-12 19:04:03 +02:00
Andreas Kling
3775983dfe LibIPC+LibGfx: Templatize IPC encoding as well as decoding
Now most classes dictate how they are serialized and deserialized when
transmitted across LibIPC sockets. This also makes the IPC compiler
a bit simpler. :^)
2020-05-12 18:49:24 +02:00
Andreas Kling
18ff75e67b HackStudio: Don't crash when navigating backtrace with up/down keys
It's up to BacktraceModel::index() to validate its inputs.
2020-05-12 15:09:54 +02:00
Linus Groh
358694567f Meta: Add script to enforce license headers & run it on Travis 2020-05-09 23:55:58 +02:00
Itamar
2acce56ac1 HackStudio: Update variables view based on the selected backtrace frame 2020-05-09 23:41:08 +02:00
Itamar
1fb62df02a HackStudio: Show a backtrace in the debug information tab 2020-05-09 23:41:08 +02:00
Itamar
b9f0f402f4 HackStudio: Reorganize debugger-related files
The debugger's files are now placed under HackStudio/Debugger
2020-05-09 23:41:08 +02:00
Andreas Kling
f596b12a04 LibVT+Terminal: Support hyperlinks in the terminal :^)
We now support basic hyperlinking in the terminal with <OSC>;8;;URL<ST>
Links are opened via LaunchServer on Ctrl+LeftMouse.
2020-05-09 16:16:16 +02:00
Itamar
14ee090f25 HackStudio: Support variable inspection in nested scopes 2020-05-08 12:16:10 +02:00
Itamar
f0cbaf453c HackStudio: Close the debug tab when debugged program exits 2020-05-08 12:16:10 +02:00
Itamar
b931771d24 HackStudio: Gracefully handle unfound source files 2020-05-07 23:32:11 +02:00
Linus Groh
8d01fd9863 HackStudio: Apply INI syntax highlighter when opening a .ini file 2020-05-07 22:04:56 +02:00
Linus Groh
520d464865 HackStudio: Rename ProjectType::{Javascript -> JavaScript} 2020-05-07 22:04:56 +02:00
Linus Groh
9dbab2d05e Misc: Replace "String(string_view)" with "string_view.to_string()"
StringView::to_string() was added in 917ccb1 but not actually used
anywhere yet.
2020-05-06 19:28:59 +02:00
Itamar
3dd0f755d0 HackStudio: Show local variables in the debugger
We now have a Debug Information tab, which displays the variables in
the current scope in a tree view.
2020-05-05 11:01:36 +02:00
Itamar
09ac22b37f HackStudio: Take scrolling into consideration when painting breakpoints
Also, we now scroll to the currently executed line when execution is
paused in the debugger.
2020-05-05 11:01:36 +02:00
Andreas Kling
e09b83c60c LibTextCodec: Start fleshing out a simple text codec library
We're starting with a very basic decoding API and only ISO-8859-1 and
UTF-8 decoding (and UTF-8 decoding is really a no-op since String is
expected to be UTF-8.)
2020-05-03 23:01:58 +02:00
Andreas Kling
78943f031e LibIPC: Add a simple IPC::Dictionary type (String key -> String value) 2020-05-03 23:01:58 +02:00
AnotherTest
6fcb6baa69 IPCCompiler: Add support for Optional<T> (so long as T is trivial) 2020-05-03 12:59:26 +02:00
Andreas Kling
a726fda546 IPCCompiler: Add support for Vector<i32>
It would be a lot nicer to support arbitrary Vector<T> but for now I'm
only adding Vector<i32> since I need it for something..
2020-05-02 01:29:55 +02:00
Andreas Kling
ea204ef05b LibMarkdown: Drop MD prefixes and move into "Markdown" namespace :^) 2020-04-28 21:04:25 +02:00
Andreas Kling
cba9550f1c HackStudio: Toolbar icon overhaul 2020-04-25 14:17:02 +02:00
Itamar
74f41d5f98 HackStudio: Add cpp debugger
The HackStudio debugger integrates with LibDebug to provide
source-level debugging.

The user can set breakpoints at various positions in the source code,
and then run the program in debug mode.

When the program is stopped, the current execution position is
displayed, and the user can insert/remove breakpoints, continue
execution, or single step the program.
2020-04-25 13:16:46 +02:00
Itamar
393560d8a2 HackStudio: GUI support for setting breakpoints on source code lines 2020-04-25 13:16:46 +02:00
Andreas Kling
0af5e0b9f8 Applications: Tweak main layout spacing and background 2020-04-23 18:30:59 +02:00
Andreas Kling
ab336e895f LibGUI: Add a ToolBarContainer widget and put most ToolBars in one
This mimics the Explorer toolbar container from Windows 2000 and looks
pretty neat! :^)
2020-04-23 17:44:49 +02:00
Andreas Kling
705cee528a LibGUI: Make it easier to create checkable GUI::Actions
This patch adds GUI::Action::create_checkable() helpers that work just
like the existing create() helpers, but the actions become checkable(!)

Clients are no longer required to manage the checked state of their
actions manually, but instead they will be checked/unchecked as needed
by GUI::Action itself before the activation hook is fired.
2020-04-21 17:21:28 +02:00
Andreas Kling
52a250cb61 LibGUI: Make MenuBar a Core::Object
This makes it show up in Inspector with all the menus inside it. :^)
2020-04-21 16:19:18 +02:00
Itamar
edaa9c06d9 LibELF: Make ELF::Loader RefCounted 2020-04-20 17:25:50 +02:00
Emanuel Sprung
bf00e33a04 ProfileViewer: Make the invert menu item visible again :^) 2020-04-18 18:01:00 +02:00
Andreas Kling
264726b2d6 ProfileViewer: Switching to percent mode should take effect immediately 2020-04-12 15:23:24 +02:00
Andreas Kling
477bacddad ProfileViewer: Symbolicate the disassembled instructions
Instead of "call 0x0811d6ac", we now say "call 0x0811d6ac <malloc>" :^)
2020-04-12 14:20:04 +02:00
Andreas Kling
8e4751a963 LibGUI: Add a way for models to update without invalidating indexes
This is really just a workaround to keep SystemMonitor's process table
working right wrt selection retention during resorts (while also doing
full index invalidation on things like ProfileViewer inversion.)

It's starting to feel like the model abstraction is not super great
and we'll need a better approach if we want to actually build some more
dynamic functionality into our views.
2020-04-12 12:03:33 +02:00
Andreas Kling
c596ef3c0e ProfileViewer: Put the tree and disasembly views in a vertical splitter 2020-04-12 10:57:44 +02:00
Andreas Kling
8aab8faf30 ProfileViewer: Open /boot/kernel for disassembly if possible
If you have access to /boot/kernel, you can see the disassembly of
kernel code in ProfileViewer. This is really useful! :^)
2020-04-11 23:37:11 +02:00
Andreas Kling
dccfff8c19 ProfileViewer: Don't crash when we can't disassemble something 2020-04-11 23:15:33 +02:00
Andrew Kaster
21b5909dc6 LibELF: Move ELF classes into namespace ELF
This is for consistency with other namespace changes that were made
a while back to the other libraries :)
2020-04-11 22:41:05 +02:00
Andreas Kling
8dd96ad143 ProfileViewer: Color code the instruction rows by sample percentage
We now "heat color" the instruction-level samples so you can get a nice
visual picture of where time is spent in functions. :^)
2020-04-11 21:04:45 +02:00
Andreas Kling
a4006e19d7 ProfileViewer: Don't skip the innermost frame when loading profiles
We were skipping the innermost frame as a workaround for the kernel
putting garbage data there. Now that the kernel puts the instruction
poiner there, we can load the frame normally! :^)
2020-04-11 21:04:45 +02:00
Andreas Kling
2b7220b093 ProfileViewer: Remove debug spam during disassembly 2020-04-11 18:58:17 +02:00
Andreas Kling
68ddbc0084 ProfileViewer: Highlight instructions with >0 samples in yellow 2020-04-11 18:56:50 +02:00
Andreas Kling
69583f07e0 ProfileViewer: Add an instruction-level sample viewer
When you select a function in the profile tree, we will now display
a per-instruction breakdown of aggregated samples in that function.

This allows us to look much closer at what our code is doing! :^)
2020-04-11 18:46:11 +02:00
Andreas Kling
f813041f67 ProfileViewer: Remove nonsense no-op 2020-04-07 21:29:30 +02:00
Andreas Kling
992d8e450c ProfileViewer: Remove an unnecessary call to String::format() 2020-04-07 16:41:00 +02:00