Andrew Kaster
827e375297
LibELF: Validate the mapped file in DynamicLoader constructor
...
ELF::DynamicLoader now validates the ELF header and the program headers
in its constructor. The requested program interpreter from the
PT_INTERP program header is now avaiable via a getter. The dynamic
loader program will want to check that this matches its name, for extra
shenanigans checking.
2020-04-11 22:41:05 +02:00
Andrew Kaster
61acca223f
LibELF: Move validation methods to their own file
...
These validate_elf_* methods really had no business being static
methods of ELF::Image. Now that the ELF namespace exists, it makes
sense to just move them to be free functions in the namespace.
2020-04-11 22:41:05 +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
Brendan Coles
6b0f47683c
LibWeb: Prevent http:// URLs loading scripts sourced from file:// URLs
...
Fixes #1616
2020-04-11 21:10:50 +02:00
Andreas Kling
17b8857dc0
LibVT: Shift+Tab should generate ESC[Z
...
Fixes #1751 .
2020-04-11 21:09:47 +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
b7ff3b5ad1
Kernel: Include the current instruction pointer in profile samples
...
We were missing the innermost instruction pointer when sampling.
This makes the instruction-level profile info a lot cooler! :^)
2020-04-11 21:04:45 +02:00
Linus Groh
c106451daf
LibLine: Cycle backward through suggestions using Shift+Tab
2020-04-11 20:42:17 +02:00
Andrew Kaster
f809231718
LibELF: Return false instead of assert on unrecognized program header
2020-04-11 19:32:28 +02:00
Andreas Kling
c199b0e1aa
LibGUI: Fill whole TableView cells with custom background color
...
This was easier than I expected. :^)
2020-04-11 19:20:40 +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
3a65e9107e
LibGUI: Respect Model::Role::BackgroundColor
...
This implementation is very gappy, but the basic feature allows us to
highlight cells with a custom background color.
2020-04-11 18:56:15 +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
5b91d848a7
LibELF: Add a find_symbol() API that finds a Symbol for an address
...
Also add ELFImage::Symbol::raw_data() to get a StringView containing
the entire symbol contents.
2020-04-11 18:45:17 +02:00
Linus Groh
31d0dbe2a0
js: Stylize TokenType::{Throw,Switch,Case}
2020-04-11 17:15:40 +02:00
AnotherTest
2fdce695d6
LibLine: Display suggestions and cycle between them
...
With extra color (tm)
This commit also patches the users of LibLine to properly use the new
API
2020-04-11 17:15:19 +02:00
AnotherTest
b59a391a78
LibLine: Ask for cursor position once and handle the rest internally
...
Prior to this, writing to stdin while a display refresh was happening
corrupted the input and displayed garbage.
2020-04-11 17:15:19 +02:00
Andreas Kling
c993c7e3dc
AK: String::contains() should say no if needle or haystack is null
2020-04-11 14:33:05 +02:00
AnotherTest
70da0e3fb5
Userland: Add primitive autocomplete to the JS repl
...
This patch adds primitive support for autocompletion in the JS repl,
it only supports completing global names and properties on variables :^)
2020-04-11 14:29:25 +02:00
AnotherTest
586aa3b1de
Userland: Install LibLine's signal handlers in the JS repl
2020-04-11 14:29:25 +02:00
AnotherTest
f946d6ce79
LibLine: Properly handle window resize by not spamming DSRs
...
We have all the information necessary to find our new origin when a
window size change occurs.
2020-04-11 14:29:25 +02:00
AnotherTest
173c65660a
LibLine: Properly show and cleanup suggestions
...
Prior to this, we would display them and never clean then up.
2020-04-11 14:29:25 +02:00
Brendan Coles
502299919a
IRCClient: Add channel member context menus for common CTCP requests
...
Add menu items for CTCP: USERINFO, FINGER, TIME, VERSION, CLIENTINFO
2020-04-11 14:26:36 +02:00
Linus Groh
3b21c4aa56
LibJS: Add console.trace()
2020-04-11 14:10:42 +02:00
Linus Groh
eece424694
LibJS: Make Function and CallFrame aware of their function name
2020-04-11 14:10:42 +02:00
Andreas Kling
4eceea7c62
LibX86: When there are multiple REPZ/REPNZ prefixes, the last one wins
2020-04-11 14:05:10 +02:00
Andreas Kling
1924112d7d
LibX86: Tolerate invalid segment register indices when disassembling
...
While #6 and #7 are not valid segment register, they can still be
encoded in otherwise-valid instructions, so let's tolerate it.
2020-04-11 14:00:20 +02:00
Andreas Kling
d7d7a32d47
LibX86: Disassemble unknown opcodes as "db %#02x"
2020-04-11 13:57:28 +02:00
Andreas Kling
95df0847c5
LibX86: Decode PADDB, PADDW and PADDD
2020-04-11 13:57:20 +02:00
Andreas Kling
16455e91db
LibX86: Don't choke on invalid LOCK prefixes for now
...
This might be interesting information later, but I'm not sure how to
encode it at the moment.
2020-04-11 13:53:12 +02:00
Andreas Kling
f115416db3
LibX86: Fix backwards arguments to ENTER imm16,imm8
2020-04-11 13:51:00 +02:00
Andreas Kling
cf7d042e0f
LibX86: Add 8-bit CMPXCHG and allow LOCK CMPXCHG
2020-04-11 13:46:30 +02:00
Andreas Kling
2ce38d4699
LibX86: Support decoding basic MMX instructions like MOVQ
2020-04-11 13:42:18 +02:00
Andreas Kling
e5cde0082a
LibX86: Run the instruction decoder in 32-bit mode by default
...
Let's assume a 32-bit execution environment unless otherwise specified.
2020-04-11 13:24:55 +02:00
Andreas Kling
8f503da93f
LibX86: Remove some unnecessary stuff from Disassembler.h
2020-04-11 13:23:52 +02:00
Andreas Kling
32d83fdee4
LibX86: Add an X86 instruction decoder library + basic disassembler
...
This will be very useful for developer tools like ProfileView, and also
for future tools like debuggers and such. :^)
2020-04-11 13:16:17 +02:00
Brian Gianforcaro
7cc7d303e3
Kernel: Add $SERENITY_KERNEL_CUSTOM_{CXXFLAGS/LDFLAGS} for build customization
...
I normally want to build with debug symbols for the kernel so I can use
a debugger. Add a hook to allow me to do so, but to impact no-one else.
2020-04-11 10:03:19 +02:00
Linus Groh
54fc972a72
MenuApplets: Support memory usage and custom colors in ResourceGraph
...
The ResourceGraph menu applet now supports a few command line options:
--cpu / -C to display a CPU usage graph
--memory / -M to display a memory usage graph
--name / -n to set a name which is used to order applets
--color / -c to set the graph color (supports anything
Gfx::Color::from_string() understands)
The SystemServer.ini and WindowServer.ini config files have been updated
to spawn and show two ResourceGraph menu applets, one for CPU usage
(green) and one for memory usage (cyan) - this matches the colors in the
SystemMonitor graphs.
2020-04-11 10:03:12 +02:00
Linus Groh
b46a8d7335
MenuApplets: Rename CPUGraph to ResourceGraph
...
The plan is to extend what currently is known as "CPUGraph" and let the
SystemServer spawn multiple instances of it - which then can show memory
or network usages as well :^)
Simply renaming the applet is the first step.
2020-04-11 10:03:12 +02:00
Liav A
ea58563970
Kernel: Instantiate network adapters in their own detect() methods
...
This commit is one step forward for pluggable driver modules.
Instead of creating instances of network adapter classes, we let
their detect() methods to figure out if there are existing devices
to initialize.
2020-04-11 10:02:31 +02:00
Liav A
65f939b55c
Kernel: Keep records of PCI::Address & PCI::ID pairs for enumeration
2020-04-11 10:02:31 +02:00
Liav A
688dd9ea66
Kernel: Simplify a message in PATAChannel::create()
2020-04-11 10:02:31 +02:00
Liav A
e9df6189f4
Kernel: Assert if we try to initialize VMWareBackdoor more than once
2020-04-11 10:02:31 +02:00
4ourbit
02c9f4c951
LibJS: Improve Object.defineProperty test
2020-04-10 23:33:02 +02:00
Linus Groh
31505dde7e
LibJS: Add String.prototype.pad{Start,End}()
2020-04-10 16:37:04 +02:00
Linus Groh
7636dee2cb
LibJS: Remove assert function from Object.defineProperty() test
2020-04-10 16:37:04 +02:00
Andreas Kling
dec352dacd
Kernel: Ignore zero-length PROGBITS sections in sys$module_load()
2020-04-10 16:36:01 +02:00
Andreas Kling
0fea525373
LibJS: Key shape transitions on both property name and attributes
...
This allows us to cache forward transitions that reconfigure existing
properties as well, leading to better shape reuse.
2020-04-10 16:33:44 +02:00