1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 22:45:07 +00:00
Commit graph

11365 commits

Author SHA1 Message Date
thankyouverycool
19e883e45a WidgetGallery: Add more widgets
Adds combo and input boxes + more variation for existing widgets.
2020-07-18 16:27:57 +02:00
Nico Weber
b5565b478f System Monitor: Sort Address column in memory map numerically 2020-07-18 15:52:08 +02:00
Nico Weber
a98d960ad4 Taskbar: Use Name from .af file as tooltip
With this, System Monitor has "System Monitor" instead of
"SystemMonitor" as tooltip, matching the app's title bar
and menu bar title.

Same for File Manager and Text Editor.
2020-07-18 15:51:46 +02:00
Nico Weber
629410b3d6 TextEditor: Auto-select C++ syntax highlighting for more extensions 2020-07-18 15:19:58 +02:00
Andreas Kling
82c38f6fdf WindowServer: Decide on a window title before measuring its width
If we add "(Not responding)" to the title of an unresponsive window,
the title rect needs to be wider or we'll have text-on-stripes.

Thanks to @SharpOB for reporting this bug!
2020-07-18 01:50:24 +02:00
Andreas Kling
becbf36711 UserspaceEmulator: Fix XCHG_AX_reg16 overwriting entire EAX
This instruction should only write to the lower 16 bits (AX)
2020-07-18 00:25:02 +02:00
Andreas Kling
8959f9950a UserspaceEmulator: Simplify the STOSB/STOSW/STOSD instructions 2020-07-18 00:25:02 +02:00
Andreas Kling
79290696cf UserspaceEmulator: Simplify MOVSB/MOVSW/MOVSD instructions
Use the new loop instruction helpers.
2020-07-18 00:25:02 +02:00
Andreas Kling
f70f530722 UserspaceEmulator: Implement the SCASB/SCASW/SCASD instructions 2020-07-18 00:25:02 +02:00
Andreas Kling
41bbedc41d UserspaceEmulator: Implement the LODSB/LODSW/LODSD instructions
Look how nice they look with the new loop instruction helpers. :^)
2020-07-18 00:25:02 +02:00
Andreas Kling
c3441719ea UserspaceEmulator: Implement the JCXZ instruction 2020-07-18 00:25:02 +02:00
Andreas Kling
d321dc0a74 UserspaceEmulator: Fix too-wide accumulator used in 8/16 bit CMPXCHG 2020-07-18 00:25:02 +02:00
Andreas Kling
8ec8ec8b1c Kernel: Remove special-casing of sys$gettid() in syscall entry
We had a fast-path for the gettid syscall that was useful before
we started caching the thread ID in LibC. Just get rid of it. :^)
2020-07-18 00:25:02 +02:00
Andreas Kling
485d1faf09 UserspaceEmulator: Add helpers for making loop instructions generic
Use them to implement CMPSB/CMPSW/CMPSD.
2020-07-18 00:25:02 +02:00
Andreas Kling
28b6ba56aa UserspaceEmulator: Add the LOOP/LOOPZ/LOOPNZ instructions 2020-07-18 00:25:02 +02:00
Andreas Kling
af7a1eca0b UserspaceEmulator: Implement the XLAT instruction :^) 2020-07-18 00:25:02 +02:00
Andreas Kling
86a7820ad7 UserspaceEmulator: Add 16-bit PUSH/POP instructions 2020-07-18 00:25:02 +02:00
Andreas Kling
75500b449c UserspaceEmulator: Fix every line in backtraces showing EIP
Oops, we're supposed to show the return address for each frame, not the
current EIP every time. :^)
2020-07-18 00:25:02 +02:00
Andreas Kling
d153fbf44e UserspaceEmulator: Implement the BT/BTS/BTR/BTC instruction set 2020-07-18 00:25:02 +02:00
Andreas Kling
06669f3f0f UserspaceEmulator: Implement IMUL_RM8 and IMUL_RM32
These are both a little tricky since they produce a result wider than
the inputs.
2020-07-18 00:25:02 +02:00
Nullspeak
51b2b0d5e5 WindowServer: New title bar vars for themes
The theming system can now control title bar height, title button
size, title stripe color and the title text shadow color.
The implemented theme metrics system could be later extended to LibGUI
to allow themes to change widget padding, border width, etc.
2020-07-17 23:19:08 +02:00
AnotherTest
8e364b9780 Shell: Mark ForLoop as would_execute
This fixes #2825.
2020-07-17 23:18:15 +02:00
Florian Angermeier
c969b8390d Kernel: Make all 6 VirtualConsoles available via shortcut
Add all 6 shortcuts even if the switch between VirtualConsoles is
currently not available in the graphical console.

Also make the case statement more compact.
2020-07-17 00:36:50 +02:00
Florian Angermeier
d8fa8c5f82 Kernel: Ensure there are all VirtualConsoles properly initialized
It is possible to switch to VirtualConsoles 1 to 4 via the shortcut
ALT + [1-4]. Therefor the array of VirtualConsoles should be guaranteed
to be initialized.

Also add an constant for the maximum number of VirtualConsoles to
guarantee consistency.
2020-07-17 00:36:50 +02:00
Florian Angermeier
971a42a816 Kernel: Make the VirtualConsole index const unsigned instead of unsigned
const:
The index should not be modified in the constructor to avoid unexpected
behavior
2020-07-17 00:36:50 +02:00
Andreas Kling
df58ea808e UserspaceEmulator: Skip freed mallocations in reachability scan
Something being reachable from a freed mallocation doesn't make it
actually reachable.

Thanks to Jonas Bengtsson for spotting this! :^)
2020-07-17 00:24:23 +02:00
Andreas Kling
b17d175379 UserspaceEmulator: Add the usleep() syscall 2020-07-16 21:38:01 +02:00
Andreas Kling
27aa2e5841 UserspaceEmulator: Reset malloc backtrace on mallocation reuse
If a previously-freed malloc chunk is reused, forget any old backtraces
and save a new malloc backtrace.
2020-07-16 20:55:41 +02:00
Andreas Kling
5f0d24cab2 LibGUI: Turn a heap-allocated event into a stack-allocated one 2020-07-16 20:46:44 +02:00
Andreas Kling
6d27915f4b LibCore: Turns some heap-allocated events into stack-allocated ones 2020-07-16 20:46:44 +02:00
Andreas Kling
869a3e2cf3 LibC: Notify UserspaceEmulator about BigAllocationBlock mallocs
We were forgetting to inform UE about these, which caused it to believe
subsequent calls to free() were invalid.
2020-07-16 20:46:44 +02:00
Tom
f591157eb8 WindowServer: Fix picking new active window after destroy
We need to mark windows as destroyed and not consider them
when picking a new active window. Fixes lost focus after
closing some windows.
2020-07-16 19:47:11 +02:00
Tom
603c17262c WindowServer: Fix traversing modal stack
When walking the modal window stack upwards, we need to check if
the top modal window is still a descendant of the window that
the parent is blocked by. Fixes not all windows being brought to
the front when trying to active a parent in the middle of the
modal window stack.
2020-07-16 19:47:11 +02:00
Andreas Kling
e50874621a UserspaceEmulator: Don't scan text segment for malloc leaks
There will be no (true positive) malloc addresses in the text segment.
2020-07-16 19:27:03 +02:00
Andreas Kling
3dc1c80958 UserspaceEmulator: Print the number of bytes leaked on exit :^) 2020-07-16 19:21:45 +02:00
Andreas Kling
c13da77e85 UserspaceEmulator: Add TLS regions to reachability checking 2020-07-16 19:21:45 +02:00
Andreas Kling
1dcc21d32e UserspaceEmulator: Include malloc/free backtraces in UAF logs :^)
When catching a use-after-free, we now also print out the backtraces
for where the memory was allocated, and for where it was freed.

This will be extremely helpful for debugging.
2020-07-16 19:21:45 +02:00
Andreas Kling
dd68370efc UserspaceEmulator: Put the memory reachability logging behind a macro 2020-07-16 19:21:45 +02:00
Andreas Kling
441918be7e UserspaceEmulator: Capture backtraces of malloc/free events
This lets us show backtraces for each leaked mallocation in the leak
report at the end. :^)
2020-07-16 19:21:45 +02:00
Andreas Kling
f6584bfc36 UserspaceEmulator: Implement very basic leak checking :^)
Upon exit, the emulator will now print a leak report of any malloc
allocations that are still live and don't have pointers to their base
address anywhere in either another live mallocation, or in one of the
non-malloc-block memory regions.

Note that the malloc-block memory region check is not fully functional
and this will work even better once we get that fixed.

This is pretty cool. :^)
2020-07-16 19:21:45 +02:00
Andreas Kling
7e13244238 UserspaceEmulator: Add ways to check if a Region is stack/mmap 2020-07-16 19:21:45 +02:00
Andreas Kling
9f1221c785 UserspaceEmulator: Implement the ROL/ROR/RCL/RCR instructions 2020-07-16 19:21:45 +02:00
Andreas Kling
897af8b4f7 UserspaceEmulator: Implement more SHLD/SHRD variants 2020-07-16 19:21:45 +02:00
Andreas Kling
db1929e3ff UserspaceEmulator: Make the shift/rotate instructions more generic 2020-07-16 19:21:45 +02:00
stelar7
d871301fd9 LibGfx: Set correct frame type on JPEG images 2020-07-16 17:52:54 +02:00
Nico Weber
c2565ef55e Userland: Add a "seq" utility
It's useful with the newly added for loops in Shell.

SerenityOS's printf() doesn't seem to print decimals for
doubles correctly, so this doesn't print the right output for
fractional numbers yet.
2020-07-16 17:52:18 +02:00
Tom
65a11fb5f9 LibGUI: Add InputBox::show with required parent window argument
Similar to MessageBox::show, this encourages passing in a window.
2020-07-16 16:10:21 +02:00
Tom
27bd2eab22 LibWeb: Require parent window argument for MessageBox
Since the vast majority of message boxes should be modal, require
the parent window to be passed in, which can be nullptr for the
rare case that they don't. By it being the first argument, the
default arguments also don't need to be explicitly stated in most
cases, and it encourages passing in a parent window handle.

Fix up several message boxes that should have been modal.
2020-07-16 16:10:21 +02:00
Tom
6568765e8f LibGUI: Add parent window argument to FilePicker functions
Since FilePicker almost always should be modal, add the parent
window as mandatory first argument.
2020-07-16 16:10:21 +02:00
Tom
9844088964 LibGUI: Clear previous main widget's window 2020-07-16 16:10:21 +02:00