Commit Graph

36977 Commits

Author SHA1 Message Date
Hendiadyoin1
5ee85aaa5d disasm: Print instruction bytes
This prints 7 instruction bytes per line, which is enough for most
x86-64 instructions (rex+opcode+mod/rm+imm32) and is also what
objdump uses.

Co-authored-by: Simon Wanner <skyrising@pvpctutorials.de>
2022-04-07 16:50:34 +02:00
Hendiadyoin1
6bb1505902 LibX86: Fix weird formatting in Interpreter.h 2022-04-07 16:50:34 +02:00
Timothy Flynn
1f2542247f LibUnicode: Upgrade to CLDR version 41.0.0
Release notes: https://cldr.unicode.org/index/downloads/cldr-41

Note that the HourCycleRegion enum now contains 272 entires, thus needs
to be bumped from u8 to u16.
2022-04-07 08:29:10 -04:00
Timothy Slater
6a4fdae575 HexEditor: Add Value Inspector
This adds a value inspector window to the Hex Editor. This window shows
the data at the current cursor position (or selection start if a range
is selected) interpreted as a variety of data types.

Currently supported values include 8, 16, 32, and 64 bit signed and
unsigned values as well as float and double.

The inspector can operate in both little endian and big endian modes.
This is switched between by options in the View menu.
2022-04-07 16:55:20 +04:30
Timothy Slater
604557c71b HexEditor: Add get_byte() method to HexEditor class 2022-04-07 16:55:20 +04:30
Timothy Slater
1b70c5f605 HexEditor: Add ability to set a selection range 2022-04-07 16:55:20 +04:30
Linus Groh
151eb8606d LibJS: Consistently call observable Temporal AOs with undefined options
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/6fa5b9d
2022-04-07 12:58:39 +01:00
Andreas Kling
85327e6b5d LibWeb: Fix broken AffineTransform::map() implementation
When opening canvas-rotate.html on my host machine, I noticed that
the rotation was going the other way.. :^)
2022-04-07 04:01:57 +02:00
Timothy Flynn
29b6c22384 LibJS: Reorder and reduce steps of InitializeDateTimeFormat
These are editorial changes in the Intl spec. See:
https://github.com/tc39/ecma402/commit/7d0326c
https://github.com/tc39/ecma402/commit/05a299b
https://github.com/tc39/ecma402/commit/8c24ea7
https://github.com/tc39/ecma402/commit/fd8dea9
2022-04-06 20:58:12 -04:00
Timothy Flynn
f3f3e3cdc3 LibJS: Remove outdated FIXME from String.prototype.localeCompare
This FIXME was addressed in 0975eba724.
2022-04-06 20:58:12 -04:00
Mattias Nilsson
45d73f8ef9 Ports: Added The One True AWK 2022-04-06 17:16:02 -07:00
Timothy Flynn
8a46794ff8 LibUnicode: Replace individual UCD file downloads with single UCD.zip
Instead of downloading nearly 20 files individually, we can download a
single .zip file similar to how we download a single CLDR .zip. This is
to reduce the number of connections/downloads to/from unicode.org.
2022-04-06 17:12:08 -07:00
kleines Filmröllchen
8545e2dec0 SystemMonitor: Default initialize all thread state variables
Having bogus values here when we just initialize the thread state with a
process can lead to all sorts of bad things down the line, like infinite
draws.
2022-04-06 22:41:54 +02:00
kleines Filmröllchen
bafaff61c9 SystemMonitor: Fallback to invalid model index if there's no main thread
In the process model we check the thread with tid=pid to figure out the
main thread of a process. This is used to construct the process view
tree with non-main threads listed as children of the process row.
However, there are sometimes circumstances where there is no main
thread, even though the process should have been removed from the
internal list by then. As a safe fallback, let's default to an invalid
model index if we can't figure out what the main thread of a process is.
2022-04-06 22:41:54 +02:00
Andreas Kling
0f6e1f7a32 LibWeb: Make BrowsingContext ask PageClient when it wants to be scrolled
BrowsingContext shouldn't be scrolling itself, instead it has to update
the layout (to ensure that we have current document metrics, and then
ask the PageClient nicely to scroll it.

This fixes an issue where BrowsingContext sometimes believed itself to
be scrolled, but OOPWV had a different idea.
2022-04-06 19:35:08 +02:00
Andreas Kling
06d97c892b LibWeb+Browser: Remove Web::WebViewHooks class
This was a mixin class that allowed sharing a set of hooks between
InProcessWebView and OutOfProcessWebView. Now that there is only OOPWV,
we don't need the mixin.
2022-04-06 19:35:08 +02:00
Andreas Kling
59e8dedea2 LibWeb: Remove the InProcessWebView widget
Let's simplify our offering by only having the OutOfProcessWebView.
2022-04-06 19:35:07 +02:00
Andreas Kling
e076f9997f HackStudio: Remove "evaluate expression" dialog
This was built on Web::InProcessWebView which is going to be removed.
Since this feature wasn't really used or maintained, let's just remove
it for now, and it can be resurrected on top of OutOfProcessWebView if
someone finds it useful enough to do that work.
2022-04-06 19:35:07 +02:00
Andreas Kling
81aa601637 Tests: Remove test-web
This was not used or maintained, and relied on InProcessWebView which we
need to get rid of.
2022-04-06 19:35:07 +02:00
Andreas Kling
1956c52c68 LibWeb: Remove unused HTML::parse_html_document() 2022-04-06 19:35:07 +02:00
Andreas Kling
0eae88f613 LibWeb: Use FrameLoader::load_html() when loading error pages
Use our existing helper function for parsing a HTML string and opening
it as the main content of the attached browsing context.
2022-04-06 19:35:07 +02:00
Karol Kosek
35934acbd3 Spreadsheet: Change paste action's enabled state on clipboard change
Previously, the paste action was always enabled and always assumed that
anything was selected, which led to a crash by clicking the paste action
right after the application startup.

This patch will automatically enable/disable the paste action depending
on whether a selection exists (it usually does, except on the app launch
and after adding a new tab) and if the clipboard mime type is a text/
group.

So no, you can't paste an image into the app anymore, even though this
mostly froze the app before...
2022-04-06 18:32:49 +02:00
Hendiadyoin1
7ba2e5e3e7 LibX86: Add CMPXCHG8B, RDRAND and RDSEED
With this we can run following script with no errors:
```sh
for /usr/lib/*.so {
    disasm "$it" > /dev/zero
}
```
2022-04-06 18:30:22 +02:00
Hendiadyoin1
688782efab UserspaceEmulator: Don't interpret SSE2 instructions as MMX ones
This is a huge FIXME right now, and should either be delegated to
SoftVPU or handled in these instructions.
2022-04-06 18:30:22 +02:00
Hendiadyoin1
3e3b677852 LibX86: Support SSE2 :^)
This allows disassembly of binaries with SSE2 instructions in them.
SSE2 also extends all MMX instructions without affecting the mnemonic,
therefore these are just directed to the same function for now.
The UserspaceEmulator does not know this as of
this commit.
2022-04-06 18:30:22 +02:00
Hendiadyoin1
5987f0a8f5 LibX86: Mark MMX instructions as SSE instructions
SSE2 expands on the same opcodes as MMX, so we have to mutate on prefix
here.
2022-04-06 18:30:22 +02:00
Hendiadyoin1
5c19cfa55a UserspaceEmulator: Truncate in CVTTSS2SI 2022-04-06 18:30:22 +02:00
Hendiadyoin1
fd2af972ed LibX86: Correct CVTSS2SI's register signature
This was annotated the wrong way around.
2022-04-06 18:30:22 +02:00
Jelle Raaijmakers
7826729ab2 Kernel: Track big lock blocked threads in separate list
When we lock a mutex, eventually `Thread::block` is invoked which could
in turn invoke `Process::big_lock().restore_exclusive_lock()`. This
would then try to add the current thread to a different blocked thread
list then the one in use for the original mutex being locked, and
because it's an intrusive list, the thread is removed from its original
list during the `.append()`. When the original mutex eventually
unblocks, we no longer have the thread in the intrusive blocked threads
list and we panic.

Solve this by making the big lock mutex special and giving it its own
blocked thread list. Because the process big lock is temporary and is
being actively removed from e.g. syscalls, it's a matter of time before
we can also remove the fix introduced by this commit.

Fixes issue #9401.
2022-04-06 18:27:19 +02:00
Andreas Kling
be26818448 LibWeb: Rename compute_intrinsic_height() => calculate_auto_height()
Change "compute" to "calculate" to make clearer that this is unrelated
to the CSS "computed height" concept.

Change "intrinsic" to "auto" to make clearer that this is not the same
as the intrinsic min-content and max-content sizing calculations.
2022-04-06 14:43:00 +02:00
Andreas Kling
922509c1a5 LibWeb: Remove incorrect comment from FFC flex item cross sizing 2022-04-06 14:43:00 +02:00
Sam Atkins
c0ca6e470f AK+Userland: Rename Array::front/back to first/last
This is the name that is used for every other collection type so let's
be consistent.
2022-04-06 14:31:52 +02:00
sin-ack
359365a06a InspectorServer: Defer removal of InspectableProcess from table
This prevents a crash when the inspected process closes the socket (i.e.
when the app is exited). This crash was caused by the InspectableProcess
removing itself from the global process table within a callback Function
that is stored as part of the InspectableProcess.
2022-04-06 13:04:03 +02:00
kleines Filmröllchen
600596fbae SystemMonitor: Keep current process selection expanded if needed
This is a hack until persistent model indices work.
2022-04-06 12:47:50 +02:00
kleines Filmröllchen
0a61b45b64 SystemMonitor: Display processes and their threads in a tree :^)
This shows all non-main threads as children of the process they belong
to. We also show the TID as that is important to distinguish the
different threads in one process.

Fixes #65

:skeleyak:
2022-04-06 12:47:50 +02:00
kleines Filmröllchen
cd5ed44f64 LibGUI: Don't stringify non-textlike data in TreeView's tree column
This would previously cause silly things like [GUI::Icon] to appear if a
non-textlike column was used as the tree column (like, in this example,
an icon column). Let's just not write anything instead.
2022-04-06 12:47:50 +02:00
kleines Filmröllchen
0e71c6a7de SystemMonitor: Pass the correct parent when checking for selected values
This will cause trouble later when the row is not enough to identify a
selection.
2022-04-06 12:47:50 +02:00
kleines Filmröllchen
9df21a1385 SystemMonitor: Move TID to the front in ProcessModel
This will look much nicer once we enable that column.
2022-04-06 12:47:50 +02:00
kleines Filmröllchen
4e8cb0508f LibGUI: Add is_toggled getter for TreeView
This has safer fallbacks than toggle_index, because we want to be able
to call it on indices that don't have children.
2022-04-06 12:47:50 +02:00
kleines Filmröllchen
d813bf77ee LibGUI: Associate model index metadata directly with the model index
This was using internal_data beforehand, which relies on the internal
data to be distinct for different model indices. That's not the case for
example for SortingProxyModel. Using the model index directly makes tree
expansion work properly when using a tree table widget with a
SortingProxyModel.
2022-04-06 12:47:50 +02:00
kleines Filmröllchen
fc6ffbc006 LibGUI: Register many properties of AbstractView 2022-04-06 12:47:50 +02:00
kleines Filmröllchen
68a758304a LibGUI: Register should_fill_selected_rows for GML in TreeView 2022-04-06 12:47:50 +02:00
kleines Filmröllchen
b34b939a03 LibGUI: Delegate the tree column in SortingProxyModel
This was never properly delegated to the source model, so the tree
column would just always be zero.
2022-04-06 12:47:50 +02:00
kleines Filmröllchen
7b145d810a AK: Add const version of Vector::first_matching 2022-04-06 12:47:50 +02:00
kleines Filmröllchen
ff8ca811c7 AK: Add find_first_index to NonnullPtrVector that strips smart pointer
When we want to use the find_first_index that base Vector provides, we
need to provide an element of the real contained type. That's impossible
for OwnPtr, however, and even with RefPtr there might be instances where
we have a raw reference to the object we want to find, but no smart
pointer. Therefore, overloading this function (with an identical body,
the magic is done by the find_index templatization) with `T const&` as a
parameter allows there use cases.
2022-04-06 12:47:50 +02:00
kleines Filmröllchen
67b5aea2f9 LibGUI: Register AbstractTableView.column_headers_visible
This was used before by SystemMonitor but not actually registered.
2022-04-06 12:47:50 +02:00
kleines Filmröllchen
bfb587f29d LibGUI: Implement column_headers_visible in AbstractTableView
This was declared but not defined. :yakfusion:
2022-04-06 12:47:50 +02:00
Andreas Kling
33887917e4 LibWeb: Determine intrinsic flex container size from content-size
When running the min-content and max-content sizing algorithms and the
target box creates a flex formatting context, we don't need to measure
its children.

FFC has already assigned the content_width and content_height values,
so we just need to pick those up from the container's formatting state.
2022-04-06 11:58:32 +02:00
sin-ack
8214a935ab LibCore+Base: Hide empty options sections in manpages 2022-04-06 11:39:08 +02:00
sin-ack
cbc89632b9 LibCore+Base: Add way to hide ArgsParser opt.s from specific usage texts
This adds the ability to hide certain options from certain help texts.
`--complete` is always hidden, whereas `--help` and `--version` are
hidden from Markdown help text only.
Note that in all cases these three options are hidden from the short
usage line.
2022-04-06 11:39:08 +02:00