Commit graph

810 commits

Author SHA1 Message Date
Astraeus- 9971bb0b05 Profiler: Add horizontal_scrollbar height to initial_height
This prevents the scrollbar from covering the TimelineTrack
when there is one
2021-12-21 22:10:33 +01:00
Rok Povsic a3c732b8ae Profiler: Display tooltip when hovering over flamegraph bars 2021-12-20 11:31:47 +01:00
Rok Povsic d3a80b1a6e Profiler: Extract the bar label String into a private method 2021-12-20 11:31:47 +01:00
Astraeus- a961a51692 Profiler: Convert to try_create_default_icon
and sprinkle in some more TRY() statements
2021-12-18 23:36:59 +01:00
Astraeus- 8513aff1cd Playground: Convert to try_create_default_icon
and sprinkle in some more TRY() statements
2021-12-18 23:36:59 +01:00
Astraeus- 64a5f990b1 Inspector: Convert to try_create_default_icon 2021-12-18 23:36:59 +01:00
Jean-Baptiste Boric ee34340c6a UserspaceEmulator: Remove support for SC_select syscall 2021-12-12 21:48:50 +01:00
Jean-Baptiste Boric 012d8d7f74 UserspaceEmulator: Add support for SC_poll syscall 2021-12-12 21:48:50 +01:00
Jean-Baptiste Boric 493c958b9e UserspaceEmulator: Sort syscalls in alphabetic order 2021-12-12 21:48:50 +01:00
bugreport0 2b47e1233b Playground: Remove redundant pledge() 2021-12-11 23:06:56 +01:00
bugreport0 595ebe215b Inspector: Update pledge() idiom 2021-12-11 23:06:56 +01:00
Daniel Bertalan 4a81b33c07 Everywhere: Fix -Winconsistent-missing-override warnings from Clang
This option is already enabled when building Lagom, so let's enable it
for the main build too. We will no longer be surprised by Lagom Clang
CI builds failing while everything compiles locally.

Furthermore, the stronger `-Wsuggest-override` warning is enabled in
this commit, which enforces the use of the `override` keyword in all
classes, not just those which already have some methods marked as
`override`. This works with both GCC and Clang.
2021-12-11 13:14:15 -08:00
scwfri 8d0143a380 HackStudio+TextEditor: Persist EditingEngineType across editors
Persist EditingEngine mode in HackStudio and TextEditor when opening new
files or editing splits. Previously, the EditingEngine defaulted to a
RegularEditingEngine for a new Editor, even if Vim Emulation had been
selected in the existing Editor.
2021-12-09 21:31:06 +01:00
Ben Wiederhake aa5f130c84 Inspector: Remove unused includes
Found while working on something else.
2021-12-08 17:18:37 -08:00
Andreas Kling 971b3645ef LibIPC: Add IPC::take_over_accepted_client_from_system_server<Client>()
This is an encapsulation of the common work done by all of our
single-client IPC servers on startup:

    1. Create a Core::LocalSocket, taking over an accepted fd.
    2. Create an application-specific ClientConnection object,
       wrapping the socket.

It's not a huge change in terms of lines saved, but I do feel that it
improves expressiveness. :^)
2021-12-06 19:22:16 +01:00
Sam Atkins d2024f04bd Userland: Cast unused BackgroundAction::construct() results to void
User code does not need to keep this alive, so casting to void is safe.
But maybe a bit weird.
2021-12-05 15:31:03 +01:00
Daniel Bertalan 21acebd372 HackStudio: Fix cursor not jumping to column 1 in the embedded terminal
Normally, it's the TTY layer's job to translate '\n' into the separate
'\r' and '\n' control characters needed by the terminal to move the
cursor to the first column of the next line.
(see 5d80debc1f).

In HackStudio, we directly inject data into the TerminalWidget to
display command status. This means that this automatic translation
doesn't happen, so we need to explicitly give it the '\r' too.
2021-12-04 14:44:00 +03:30
Itamar c3c2fe153b LibCpp: Add "ignore invalid statements" option to Preprocessor
When we run the Preprocessor from the CppComprehensionEngine of
the language server, we don't want the preprocessor to crash if it
encounters an invalid preprocessor statement (for example, an #endif
statement without an accompanying previous #if statement).

To achieve this, this commit adds an "ignore_invalid_statements" flag
to the preprocessor which is set by the CppComprehensionEngine.

Fixes #11064.
2021-12-03 15:38:21 +01:00
Itamar 408f05bbb9 HackStudio: Decrease the maximal crash frequency of the server to 10 sec
The maximal crash frequency of the language server was previously 3
seconds, but in practice it was too high.
When working with larger projects the language server can get into a
"crash and respawn" loop that takes more than 3 seconds.

10 seconds seems like a reasonable threshold beyond which we no longer
attempt to respawn the server.
2021-12-03 15:38:21 +01:00
Itamar 28ff7d49ad HackStudio: Only send the content of open files to language server
When respawning the language server, we only need to send the content
of opened files to the server.

The on-disk content of files that are not currently open is up to
date, so the server can read them on its own.
2021-12-03 15:38:21 +01:00
Itamar 3e9a96f1d8 HackStudio: Add HackStudio::for_each_open_file 2021-12-03 15:38:21 +01:00
Andreas Kling 85eb0eaad0 CrashReporter+HackStudio: Let's call it "Debug in Hack Studio"
"Inspect in Hack Studio" was a bit vague.
2021-11-30 23:34:40 +01:00
Andreas Kling d3bd9f1f0c HackStudio: Scope the "delete file from project" action to tree view
Otherwise it triggers when trying to delete characters in the editor.
2021-11-30 23:34:40 +01:00
Andreas Kling cb9cac4e40 LibIPC+IPCCompiler+AK: Make IPC value decoders return ErrorOr<void>
This allows us to use TRY() in decoding helpers, leading to a nice
reduction in line count.
2021-11-28 23:14:19 +01:00
Brian Gianforcaro cf4fa936be Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
Brian Gianforcaro f807796380 UserspaceEmulator: Fix after add_positional_argument API change :^)
Get UE compiling again after the Vector<String> API was changed to
Vector<StringView>.
2021-11-26 16:47:39 -08:00
Federico Guerinoni 4a90729a3e HackStudio: Port to LibMain :^) 2021-11-26 11:13:59 -08:00
Ben Wiederhake 33079c8ab9 Kernel+UE+LibC: Remove unused dbgputch syscall
Everything uses the dbgputstr syscall anyway, so there is no need to
keep supporting it.
2021-11-24 22:56:39 +01:00
Andreas Kling b6f49924be LibDesktop: Make allowlist APIs return ErrorOr<void>
This makes it very smooth to use TRY() when setting up these lists,
as you can see in the rest of this commit. :^)
2021-11-24 00:25:23 +01:00
Andreas Kling 4a64bb80ea Inspector: Port to LibMain :^) 2021-11-24 00:25:23 +01:00
Andreas Kling 4283702fb8 Playground: Port to LibMain :^) 2021-11-24 00:25:23 +01:00
Andreas Kling dfca0def63 Profiler: Port to LibMain :^) 2021-11-24 00:25:23 +01:00
Andreas Kling 58fb3ebf66 LibCore+AK: Move MappedFile from AK to LibCore
MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
2021-11-23 11:33:36 +01:00
Andreas Kling c1a3968c66 LibCore: Make LocalSocket takeover mechanism return ErrorOr<T> 2021-11-23 11:33:36 +01:00
Andreas Kling 21a5fb0fa2 LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCore
With this change, System::foo() becomes Core::System::foo().

Since LibCore builds on other systems than SerenityOS, we now have to
make sure that wrappers work with just a standard C library underneath.
2021-11-23 11:33:36 +01:00
Andreas Kling c2b90bab9f LanguageServers/Shell: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Andreas Kling 54155f8c64 LanguageServers/Cpp: Port to LibMain :^) 2021-11-23 11:33:36 +01:00
Karol Kosek 5f3e9886f7 HackStudio: Disable the Rename action on insufficient permissions
This patch will disable the Rename action in the project Tree View
if a user does not have write access to the selected file directory.
2021-11-22 09:03:19 +01:00
Karol Kosek 0264d3de45 HackStudio: Remove noop when deciding whether to disable delete action
The iterator in has_permissions will just be equal to sections.end()
when there are no selected files.
2021-11-22 09:03:19 +01:00
Itamar 8316eb7306 HackStudio: Add option to inspect Coredump
This adds a --coredump <file> option to Hack Studio.

When used, Hack Studio will open the coredump and allow the user to
inspect it in the Debug tab.
2021-11-20 21:22:24 +00:00
Itamar ce726fe027 HackStudio: Improve backtrace accuracy
We now decrement the return address of the previous frame by one to get
the address of the call instruction and use this address in the
backtrace.

This results in more accurate source position information than what we
previously had when using the return address.
2021-11-20 21:22:24 +00:00
Itamar 94d68583fb HackStudio: Use ProcessInspector instead of DebugSession where possible 2021-11-20 21:22:24 +00:00
Andreas Kling 216e21a1fa AK: Convert AK::Format formatting helpers to returning ErrorOr<void>
This isn't a complete conversion to ErrorOr<void>, but a good chunk.
The end goal here is to propagate buffer allocation failures to the
caller, and allow the use of TRY() with formatting functions.
2021-11-17 00:21:13 +01:00
Andreas Kling 587f9af960 AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional)
Also add slightly richer parse errors now that we can include a string
literal with returned errors.

This will allow us to use TRY() when working with JSON data.
2021-11-17 00:21:10 +01:00
Hendiadyoin1 1533123263 Profiler: Stop disassembly on invalid instructions 2021-11-16 00:49:48 +00:00
Hendiadyoin1 134f43ba12 Profiler: Don't try to disassemble empty buffers 2021-11-16 00:49:48 +00:00
Andreas Kling 8b1108e485 Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Tim Schumacher 80cb44afae Everywhere: Move shared library checks into a common function
While we're at it, unify the various different conditions that are
scattered accross the codebase.
2021-11-10 14:42:49 +01:00
Tim Schumacher d350d2dfce Emulator: Restrict library name check when querying symbols
Libraries in /usr/lib currently only end in .so, so no contains() is
needed for now.
2021-11-10 14:42:49 +01:00
Tim Schumacher 6c6381408f Emulator: Use existing queried library name in load check
We already asked the region about what its library name is, and we also
use that value when maybe constructing a path, so let's make the check
use that as well.
2021-11-10 14:42:49 +01:00
Tim Schumacher fc6f265155 Profiler: Use existing path split when mmapping libraries
We already extracted the `path` part of the segment name, so use that
for checking if the filename looks like a shared library.
2021-11-10 14:42:49 +01:00
Brendan Coles 1e48cd35a1 UserspaceEmulator: Add support for SC_uname and SC_sysconf syscalls 2021-11-08 16:30:32 -08:00
Andreas Kling fbe8f185b5 Profiler: Replace Result<T, E> use with ErrorOr<T> 2021-11-08 00:35:27 +01:00
Andreas Kling 4a2b718ba2 LibCore: Use ErrorOr<T> for Core::File::copy_file() 2021-11-08 00:35:27 +01:00
Andreas Kling c7e62d448c LibCore: Use ErrorOr<T> for Core::File::remove()
This function returns a subclass of Error, which is now possible.
2021-11-08 00:35:27 +01:00
Andreas Kling 0de33b3d6c LibGfx: Use ErrorOr<T> for Bitmap::try_create()
Another one that was used in a fajillion places.
2021-11-08 00:35:27 +01:00
Andreas Kling 235f39e449 LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()
This was used in a lot of places, so this patch makes liberal use of
ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-11-08 00:35:27 +01:00
Hendiadyoin1 2867d93115 UserspaceEmulator: Improve the MMX formatting on environment dump 2021-11-07 22:42:23 +00:00
Hendiadyoin1 83f50a1507 UserspaceEmulator: Raise an error on FPU stack underflow
Accessing an unset part of the FPU stack should not be a simple warning,
but should trigger the FPU exception mechanism.
2021-11-07 22:42:23 +00:00
Hendiadyoin1 0d6d780183 UserspaceEmulator: Remove some unnecessary casting 2021-11-07 22:42:23 +00:00
Hendiadyoin1 d759175767 UserspaceEmulator: Stop overriding flags in FCOMI
We no longer override the flags we just set. We now also unset of, af,
and sf after the comparison.
This fixes the asin function for LibM!
2021-11-07 22:42:23 +00:00
Hendiadyoin1 f2eff767a0 UserspaceEmulator: Fix typos in SoftFPU.[cpp|h] 2021-11-07 22:42:23 +00:00
Hendiadyoin1 74aba07b70 UserspaceEmulator: Align FPU-exception names with the manual 2021-11-07 22:42:23 +00:00
Hendiadyoin1 5d2a4bd18d UserspaceEmulator: Check the right flags in FCMOV
Also make FCMOVNB do an actual CMOV and not a copy of FILD_m32
2021-11-07 22:42:23 +00:00
Hendiadyoin1 8108aaca39 UserspaceEmulator: Correct FSCALES rounding
We were rounding the wrong way, FSCALE is supposed to trunc internally,
while we were flooring.
Now LibM exponentials and related tests work :^)
2021-11-07 22:42:23 +00:00
Hendiadyoin1 fa02b46295 UserspaceEmulator: Always set C1 when rounding 2021-11-07 22:42:23 +00:00
Hendiadyoin1 7214b08f81 UserspaceEmulator: Simplify the definition of the FPU register stack
Long doubles are always at least 80 bits wide in memory and it suffices
if we can address these 80 bits, to mark the long double as NAN at the
end of an MMX instruction, so the additional magic using conditional
types is unnecessary.
2021-11-07 22:42:23 +00:00
Hendiadyoin1 d06675e3e4 UserspaceEmulator: Use unsigned types for logical MMX shifting 2021-11-07 22:42:23 +00:00
Ben Wiederhake 3796d417e0 Demos+DevTools+Games: Fix visibility of Object-derivative constructors
Derivatives of Core::Object should be constructed through
ClassName::construct(), to avoid handling ref-counted objects with
refcount zero. Fixing the visibility means that misuses like this are
more difficult.
2021-11-02 22:56:53 +01:00
thislooksfun 8462234208 HackStudio: Don't close autocomplete after applying #include directories 2021-11-02 17:53:22 +01:00
thislooksfun d5baf1c1fa LibGUI: Allow autocomplete to stay open after applying
Previously the autocomplete box would always close after applying a
suggestion. This is the desired behavior in almost all cases, but there
are some situations (like autocompleting paths) where it would be nicer
to keep the autocomplete box open after applying the suggestion.
2021-11-02 17:53:22 +01:00
thislooksfun 81f00c0aa8 HackStudio: Remove unused #include
Found this while looking at who uses GUI::AutocompleteProvider.
2021-11-02 17:53:22 +01:00
thislooksfun 0be3f5b4ae HackStudio: Append a / when completing a directory 2021-11-02 17:53:22 +01:00
thislooksfun 8b3a2cdad9 HackStudio: Correctly handle nested paths
Previously the paths were concatinated incorrectly, so triggering
the autocomplete on `#include "foo/bar"` would never work. Now it
does. :^)
2021-11-02 17:53:22 +01:00
thislooksfun a6a71869d7 HackStudio: Handle autocomplete inside #include's <> and "" 2021-11-02 17:53:22 +01:00
thislooksfun f7f9d09e72 LibGUI: Remove GUI::AutocompleteProvider::Entry::kind
The only code using it was removed in the previous commit.
2021-11-02 17:53:22 +01:00
thislooksfun f699dbdc3f HackStudio+LibGUI: Handle #include quotes and brackets in the engine
Previously we had a special case in order to auto-append quotes or
angle brackets to #include statements. After the previous commit this
is no longer necessary.
2021-11-02 17:53:22 +01:00
thislooksfun a5b3c3f85f LibGUI: Allow completion suggestions to fill and display different text
There are times when it is nice to display one suggestion but fill
something different. This lays the groundwork for allowing
GMLAutocompleteProvider to automatically add ': ' to the end of
suggested properties, while keeping the ': ' suffix from cluttering up
the suggestion UI.
2021-11-02 17:53:22 +01:00
Ben Wiederhake 70c7861c33 UserspaceEmulator: Avoid special character in pseudo-identifier
In the generated HTML code, '#' gets interpreted as the beginning of a
shell comment, which throws the syntax highlighting off. Regardless,
spelling out the meaning of the '#' might make it more readable.
2021-11-01 21:12:58 +01:00
Ben Wiederhake b8f11b1bae Everywhere: Remove unused ArgsParser header
Found while trying to enumerate all programs that use ArgsParser.
2021-11-01 21:12:58 +01:00
Andreas Kling aff2b42f82 UserspaceEmulator: Fix inconsistent log formatting
Remove some extra { and } around the PID in log output that weren't used
consistently in all logging.
2021-10-31 21:07:29 +01:00
Daniel Bertalan b883652a83 Profiler: Cache parsed DWARF debug information in disassembly view
This changes browsing through disassembled functions in Profiler from a
painfully sluggish experience into quite a swift one. It's especially
true for profiling the kernel, as it has more than 10 megabytes of DWARF
data to churn through.
2021-10-31 16:54:02 +01:00
Daniel Bertalan 8e1f882ac9 Profiler: Load the actual kernel binary for disassembly
/boot/Kernel.debug only contains the symbol table and DWARF debug
information, and has its `.text` and other PT_LOAD segments stripped
out. When we try to parse its data as instructions, we get a crash from
within LibX86.

We now load the actual /boot/Kernel binary when we want to disassemble
kernel functions.
2021-10-31 16:54:02 +01:00
Daniel Bertalan 80b660132c Profiler: Share the mapped kernel between Profile and DisassemblyModel
There is no point in keeping around a separate MappedFile object for
/boot/Kernel.debug for each DisassemblyModel we create and re-parsing
the kernel image multiple times. This will significantly speed up
browsing through profile entries from the kernel in disassembly view.
2021-10-31 16:54:02 +01:00
Marco Cutecchia 3428e2a76c HackStudio: Add 'Show Dotfiles' option 2021-10-29 22:40:11 +02:00
Filiph Sandström d6a0726302 Everywhere: Rename left/right-click to primary/secondary
This resolves #10641.
2021-10-27 22:05:58 +03:00
Liav A 8554952690 Kernel + WindowServer: Re-define the interface to framebuffer devices
We create a base class called GenericFramebufferDevice, which defines
all the virtual functions that must be implemented by a
FramebufferDevice. Then, we make the VirtIO FramebufferDevice and other
FramebufferDevice implementations inherit from it.
The most important consequence of rearranging the classes is that we now
have one IOCTL method, so all drivers should be committed to not
override the IOCTL method or make their own IOCTLs of FramebufferDevice.
All graphical IOCTLs are known to all FramebufferDevices, and it's up to
the specific implementation whether to support them or discard them (so
we require extensive usage of KResult and KResultOr, together with
virtual characteristic functions).
As a result, the interface is much cleaner and understandable to read.
2021-10-27 07:57:44 +03:00
Daniel Bertalan ac1cac286b Profiler: Fix disassembling objects with a non-zero .text vaddr
Previously, we assumed that the `.text` segment was loaded at vaddr 0 in
shared object, which is not the case with `-z separate-code` enabled.
Because we didn't do the right calculations to translate an address from
a performance event into its value within the ELF file, Profiler would
try to disassemble out-of-bounds memory locations, leading to a crash.

This commit also changes `LibraryMetadata` to apply to a loaded library
as a whole, not just to one of its segments (like .text or .data). This
lets us simplify the interface, as we no longer have to worry about
`text_base`.

Fixes #10628
2021-10-25 12:14:26 +02:00
Daniel Bertalan 15a14d3d21 LibX86: Take load base address into consideration during disassembly
Since our executables are position-independent, the address values
extraced from processes don't correspond to their values within the ELF
file. We have to offset the absolute addresses by the load base address
to get the relative symbol that we need for disassembly.
2021-10-25 12:14:26 +02:00
Daniel Bertalan 7c27ba1240 Profiler: Subtract the kernel's base address when searching for symbols
Now that the kernel is compiled as a PIE, all addresses are relative to
the loaded base address, so Symbolication::kernel_base has to be
subtracted off from the absolute addresses if we want to symbolicate
them.
2021-10-25 12:14:26 +02:00
Idan Horowitz 87bd98fe8e Profiler: Handle profiles with more kernel samples than user samples
Previously we assumed there were less kernel samples than user samples,
by implicitly using the kernel histogram size for indicies to the user
histogram. Such a profile can be reproduced by profiling a very short
lived program like true: `profile -c true`
2021-10-24 23:04:47 +02:00
Idan Horowitz db68a52e23 Profiler: Use profile length in ms as histogram column count directly
Beforehand we were dividing the frame width by the profile length in ms
and then dividing the frame width by the result once more, which is
equivalent to (but slower) just using the length in ms directly, aside
from the case in which the profile is less than 1 ms long, in which
case this would trigger undefined behaviour due to the division by zero
2021-10-24 23:04:47 +02:00
Daniel Bertalan 0a748de1a0 UE: Properly align stack for signal handlers
This issue was also present in the kernel, the description of which is
provided in an identically titled commit.

Note that this couldn't have affected any programs running in
UserspaceEmulator as we don't support SSE instructions, and don't seem
to raise faults under any conditions.
2021-10-24 21:54:51 +02:00
Andreas Kling 398c181c79 LibJS: Rename PropertyName to PropertyKey
Let's use the same name as the spec. :^)
2021-10-24 17:18:07 +02:00
Sam Atkins 79522db5d0 HackStudio: Add syntax-highlighting for CSS files 2021-10-23 19:07:44 +02:00
Hediadyoin1 3ad6d87a45 LibX86: Add SSE support
This only adds the decodeing support for SSE, not SSE2, etc.
may contain traces of SSE2.
2021-10-17 13:06:23 -07:00
Hediadyoin1 bce3bf9f1e UserspaceEmulator: Handle PerfEvent syscalls
We only froward String setting and FlagPost creation for now, due to the
other performance events being nonsensical to forward.
We also record these signposts in the optionally generated profile.
2021-10-06 17:35:29 +00:00
Hendiadyoin1 045461b7cb UserspaceEmulator: Use only the base name for the profile name 2021-10-06 17:35:29 +00:00
Marco Cutecchia 3c5e07fa1c HackStudio: Save editor's font in configs 2021-10-06 17:14:40 +02:00
Marco Cutecchia 423c2e44c9 HackStudio: Add option to change the editor's font 2021-10-06 17:14:40 +02:00
Andreas Kling 0264ae23bc LibWeb: Make CSS layout lazier
Instead of doing layout synchronously whenever something changes,
we now use a basic event loop timer to defer and coalesce relayouts.

If you did something that requires a relayout of the page, make sure
to call Document::set_needs_layout() and it will get coalesced with all
the other layout updates.

There's lots of room for improvement here, but this already makes many
web pages significantly snappier. :^)

Also, note that this exposes a number of layout bugs where we have been
relying on multiple relayouts to calculate the correct dimensions for
things. Now that we only do a single layout in many cases, these kind of
problems are much more noticeable. That should also make them easier to
figure out and fix. :^)
2021-10-06 17:14:22 +02:00
Tim Schumacher 7af7fc8c16 Everywhere: Fix more Copyright header inconsistencies 2021-10-04 11:10:09 +01:00
Nico Weber 6c9bc18a79 Userland: Fix typos 2021-10-01 01:18:52 +01:00
Linus Groh e5409c6ead LibJS: Convert internal_set() to ThrowCompletionOr 2021-09-29 23:49:53 +01:00
Linus Groh 6c2b974db2 LibJS: Convert internal_get() to ThrowCompletionOr 2021-09-29 23:49:53 +01:00
Marco Cutecchia 194dc8b25d HackStudio: Support renaming files from the tree view 2021-09-27 01:20:48 +02:00
thankyouverycool 92fffc3abc LibGUI: Rename CallOnChange => AllowCallback and implement elsewhere
This is a helpful option to prevent unwanted side effects, distinguish
between user and programmatic input, etc. Sliders and SpinBoxes were
implementing it idiosyncratically, so let's generalize the API and
give Buttons and TextEditors the same ability.
2021-09-22 21:35:42 +02:00
Itamar a27716846f HackStudio: Make sure Window is destroyed before Application object
We previously stored the Window object in a global RefPtr (for no
apparent reason).

This led to a use-after-free bug in the Window's destructor when
HackStudio was exited via the Quit action (Exiting by closing the
window did not trigger this bug).
2021-09-18 16:45:50 +02:00
Ali Mohammad Pur 44cc6e1662 Profiler: Make the ProfileModel searchable
Note that this only searches the items at the same level as the selected
index.
2021-09-14 21:33:15 +04:30
Karol Kosek 6c5fb2ca63 HackStudio: Remove an old file from the vectors in 'Save as...' action
If you saved a file under a different name and then went back to
the first file, then you had the same TextDocument buffer, and therefore
the same changes to the file as in the new one.
2021-09-12 22:10:48 +02:00
Karol Kosek d811ad921c HackStudio: Rename Project::get_file() to Project::create_file()
The function no longer looks for the already opened files, so let's
emphasize that by renaming it to `create_file`. :^)
2021-09-12 22:10:48 +02:00
Karol Kosek 4a1974b174 HackStudio: Remove storing a vector of opened files in Project class
It looks to me like this has the same purpose as m_open_files
in the HackStudioWidget, so removing it shouldn't change anything.
2021-09-12 22:10:48 +02:00
Karol Kosek c0709c4447 Playground: Ask to save file contents on quit action
Prior this change, activating the action instantly closed the program.
2021-09-12 16:30:25 +02:00
Idan Horowitz 6704961c82 AK: Replace the mutable String::replace API with an immutable version
This removes the awkward String::replace API which was the only String
API which mutated the String and replaces it with a new immutable
version that returns a new String with the replacements applied. This
also fixes a couple of UAFs that were caused by the use of this API.

As an optimization an equivalent StringView::replace API was also added
to remove an unnecessary String allocations in the format of:
`String { view }.replace(...);`
2021-09-11 20:36:43 +03:00
Andreas Kling 2116fb5be9 UserspaceEmulator: Ignore perf_event and perf_register_string syscalls
We can just fail these with ENOSYS pending a full implementation.
2021-09-11 02:13:52 +02:00
Karol Kosek cf71805aa8 HackStudio: Reuse TextDocument::is_modified()
Previously, the modification tag in the editor file label was unset only
after a file was saved.

This commit will also unset the tag if you undo the stack (for example
by hitting Ctrl+Z) to the last saved state.
2021-09-10 00:00:53 +02:00
Karol Kosek eb5320023a HackStudio: Preserve the untitled filename text on file modification
Previously, the title of an unnamed file would just disappear from
the editor label if you started typing.
2021-09-09 02:33:18 +02:00
Hendiadyoin1 93ce8fc985 UserspaceEmulator: Handle SO_ERROR in getsockopt
This makes GUI applications work again
2021-09-07 21:26:21 +00:00
Andreas Kling 226383f45b LibELF: Use StringView to carry temporary strings in auxiliary vector
Let's not force clients to provide a String.
2021-09-07 13:53:14 +02:00
Ali Mohammad Pur 97e97bccab Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
Brian Gianforcaro 3e45c3ed90 Userland: Switch static_assert of type sizes to AK::AssertSize 2021-09-05 20:08:57 +02:00
Karol Kosek dcc9db48c5 HackStudio: Drop files to the selected editor
Previously, the files were opened in the current editor, instead of one
that received a drop event.
2021-09-04 21:48:27 +02:00
Andreas Kling eaf88cc78a AK: Rename create<T> => make_ref_counted<T>
And also try_create<T> => try_make_ref_counted<T>.

A global "create" was a bit much. The new name matches make<T> better,
which we've used for making single-owner objects since forever.
2021-09-03 02:36:09 +02:00
sin-ack e9121f8b1f LibCore+Userland: Implement Core::deferred_invoke
Core::deferred_invoke is a way of executing an action after previously
queued events have been processed. It removes the requirement of
having/being a Core::Object subclass in order to defer invocation
through Core::Object::deferred_invoke.

Core::Object::deferred_invoke now delegates to Core::deferred_invoke.
The version with the Object& argument is still present but will be
removed in the following commits.

This commit additionally fixes a new places where the
DeferredInvocationEvent was dispatched to the event loop directly, and
replaces them with the Core::deferred_invoke equivalent.
2021-09-02 03:47:47 +04:30
Brian Gianforcaro 4de0f68486 Profiler: Minor static code analysis issues in FlameGraphView 2021-09-01 18:06:14 +02:00
Brian Gianforcaro 16f0248ca2 Profiler: Use = default for empty destructor 2021-09-01 18:06:14 +02:00
Brian Gianforcaro 511822c9fe HackStudio: Fix typo in C++ file extension mapping code
This looks like a copy past bug where we were checking "cc" twice
instead of checking for the equivalent header extension.

Found by Sonar Cloud.
2021-09-01 18:06:14 +02:00
Nicholas Hollett 0d98bba167 Profiler: Add a flamegraph view for the stack
The flamegraph makes it easier to quickly spot expensive functions,
based on the width of their bar.
2021-08-31 12:40:51 +02:00
Brian Gianforcaro f0b3aa0331 Everywhere: Pass AK::Format TypeErasedFormatParams by reference
This silences a overeager warning in sonar cloud, warning that
slicing could occur with `VariadicFormatParams` which derives from
`TypeErasedFormatParams`.

Reference:
https://sonarcloud.io/project/issues?id=SerenityOS_serenity&issues=AXuVPBO_k92xXUF3qWsm&open=AXuVPBO_k92xXUF3qWsm
2021-08-30 15:50:00 +04:30
Itamar 11832544e5 HackStudio: Add "Go Back" and "Go Forward" navigation actions
These actions allow the user to move backwards & forwards between
previous project locations they were at.
2021-08-30 12:44:26 +02:00
Itamar 8fc9ec942e HackStudio: Optionally pass line & column to open_file
This makes it easier to open a file at a specific location.
2021-08-30 12:44:26 +02:00
Brian Gianforcaro ad1051089c UserspaceEmulator: Profiles are now expected to have a strings array
The kernel profiles were recently changed to have a `strings` array
as part of the profile objects. The `ProfileViewer` now checks for
that during startup and declares the profile invalid if the array
is not present.

The UserspaceEmulator doesn't use the API which the kernel exposed
the string array for, so just fake it by always adding an empty array
to the generated profiles.
2021-08-28 20:03:08 +02:00
Brian Gianforcaro e00c871f65 UserspaceEmulator: Make generated profiles debugable with cli tools
The fact that profiles are json on one giant line makes them very
difficult to debug when things go wrong. Instead make sure to wrap
each event or sample on a newline so you can easily grep/heap/tail
the profile files.
2021-08-28 20:03:08 +02:00
Andrew Kaster 63956b36d0 Everywhere: Move all host tools into the Lagom/Tools subdirectory
This allows us to remove all the add_subdirectory calls from the top
level CMakeLists.txt that referred to targets linking LagomCore.

Segregating the host tools and Serenity targets helps us get to a place
where the main Serenity build can simply use a CMake toolchain file
rather than swapping all the compiler/sysroot variables after building
host libraries and tools.
2021-08-28 08:44:17 +01:00
Andrew Kaster fb15cdcc10 StateMachineGenerator: Don't move() return value from actions()
With the proper warnings enabled, this gives a Wpessimizing-move warning
2021-08-28 08:44:17 +01:00
Andreas Kling 82d8cd2b87 Terminal+LibVT: Use LibConfig instead of Core::ConfigFile 2021-08-26 00:54:27 +02:00
Karol Kosek a230524c46 HackStudio: Update the tree view cursor on editor change and 'Save as'
The more important thing here is to update the tree view
on 'Save As..', as we want to drop every connection from an old file.

Updating the tree view on current editor change is just a cool small
bonus. :^)
2021-08-25 17:42:54 +02:00
Marco Cutecchia d1f936e3d0 HackStudio: Add "New File" actions for different file extensions
Currently this supports the following file types: cpp, header, gml,
js, css, html and plain files
2021-08-25 12:12:15 +02:00
Karol Kosek 8d3304f853 HackStudio: Update every editor with matching filename on 'Save as...'
Prior this change, if user had more than two copies of one file opened
in a split view, then only the active editor was renamed,
when the others had the same file contents changed.

This change will set a new file name for every file.

The is_null() check is for uncreated files, as they shouldn't be
treated as the same single file.
2021-08-22 23:41:53 +02:00
Karol Kosek 90396f5b08 HackStudio: Convert selected path to a relative path on 'Save as...'
This makes the editor title a bit more consistent with the other files
and removes duplicating the file name in the file history
when reopening that file.
2021-08-22 23:41:53 +02:00
Lennon Donaghy 283d8d3928 HackStudio: Warn about unsaved changes on opening different project 2021-08-22 10:30:06 +02:00
Lennon Donaghy 82b88c6e16 HackStudio: Fix editor not marking file with unsaved changes as dirty
The editor's on_change callback was being overwritten in
HackStudioWidget.cpp in order to call update_gml_preview on every
change. This stopped the original callback from being called and marking
files as dirty when changed.

Now we call update_gml_preview in a new callback within the editor
wrapper, which is then called within the original on_change callback
in the editor.
2021-08-22 10:30:06 +02:00
Lennon Donaghy d454c63bde HackStudio: Fix GitWidget issues with switching between projects
GitWidget no longer crashes upon trying to create a repository for a new
project, and it correctly updates after opening a different project. A
new method, change_repo, has been added to make this work, which changes
m_repo_root and resets most of the widget's state in order to make this
work.
2021-08-22 10:30:06 +02:00
Lennon Donaghy d9c295de46 HackStudio: Moved code closing project from open_project to own method
Take the code which closes the current project out of open_project
method and move it into its own method.
2021-08-22 10:30:06 +02:00
Lennon Donaghy 3ce96134b5 HackStudio: Call update_gml_preview() to reset when opening new project 2021-08-22 10:30:06 +02:00
Lennon Donaghy 5ca888132d HackStudio: Make FindInFilesWidget reset when opening new project
Add method to FindInFilesWidget which resets the model in order to
clear the output when needed, and use this when a new project is opened.
2021-08-22 10:30:06 +02:00
Lennon Donaghy ff2a1ee8b0 HackStudio: Stop debugger when opening new project
Moved code to stop the debugger in the HackStudioWidget destructor to
a new method so that this can be called in both the destructor and when
opening a new project.
2021-08-22 10:30:06 +02:00
Lennon Donaghy 971a5a70d1 HackStudio: Clear embedded terminal upon opening a different project 2021-08-22 10:30:06 +02:00
Lennon Donaghy 6076deae1d HackStudio: Clear ToDo entries upon opening new project
The ToDoEntries and ToDoEntriesWidget classes now have methods for
clearing the entries, before entries would stay permanently, even after
switching to a new project.
2021-08-22 10:30:06 +02:00
Lennon Donaghy d48bd49002 HackStudio: Move handle_external_file_deletion logic into own method
Added a close_file_in_all_editors method to HackStudioWidget and moved
the code from handle_external_file_deletion into it so that it can be
reused elsewhere to close files.
2021-08-22 10:30:06 +02:00
networkException acde7d12b0 Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to open
This patch brings the ConfigFile helpers for opening lib, app and system
configs more inline with the regular ConfigFile::open functions.
2021-08-22 01:32:25 +02:00
Luke Wilde 4ab8939670 HackStudio: Fix ds => fs typo in fs changed check in RegistersModel
The changed check for `fs` was accidentally comparing the current `ds`
to the previous `fs`.
2021-08-21 08:41:27 +02:00
Karol Kosek 947b61c1de HackStudio: Update the window title after changing a file name
This is a very similar fix as the previous commit, but here it's
due to my oversight when I was adding an 'Save as..' feature.
2021-08-20 11:47:00 +02:00
Karol Kosek 6e64988396 HackStudio: Update the window title after changing an active editor
Prior this change, the window title was updated only when a new file
has been opened, which means that it wasn't updated when user selected
an already opened file in the split view.

This change updates the title whenever the active editor changes.
In addition, this title update logic has now its own function
as it'll also be used in the next commit. :)
2021-08-20 11:47:00 +02:00
Itamar 43392c567e HackStudio: Fix "navigate to include"
This fixes an off-by-one error in the "navigate to include" feature
of HackStudio.
2021-08-19 17:20:37 +02:00
Itamar 9ae98bc81b LibCpp: Handle circular imports gracefully
This patch prevents CppComprehensionEngine from endlessly looping when
there's a circular #include in the code.

We now keep track of the set of currently processed files, and will not
re-process a file if it already exists in this set.
When we're done with processing a file it is removed from this set.

The pragma once directive is not yet implemented, but regardless a
mechanism that prevents #include loops even in the absence of
pragma once is desired.
2021-08-19 17:20:37 +02:00
Andreas Kling 4eb198baf3 Profiler: Limit the initial size of the timeline container
If there are a lot of process timeline tracks, we don't want to make the
window gigantic. So let's just put a limit on it.
2021-08-18 13:06:27 +02:00
sin-ack e11d177618 Userland+LibGUI: Add shorthand versions of the Margins constructor
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same
margin on all edges, for example. The constructors follow CSS' style of
specifying margins. The added constructors are:

- Margins(int all): Sets the same margin on all edges.
- Margins(int vertical, int horizontal): Sets the first argument to top
  and bottom margins, and the second argument to left and right margins.
- Margins(int top, int vertical, int bottom): Sets the first argument to
  the top margin, the second argument to the left and right margins,
  and the third argument to the bottom margin.
2021-08-18 10:30:50 +02:00
sin-ack 9c9a5c55cb Userland+LibGUI: Make Margins arguments match CSS ordering
Previously the argument order for Margins was (left, top, right,
bottom). To make it more familiar and closer to how CSS does it, the
argument order is now (top, right, bottom, left).
2021-08-18 10:30:50 +02:00
Daniel Bertalan 87ef2718bc UserspaceEmulator+LibC: Use sys$emuctl() to disable auditing in malloc
It was fragile to use the address of the body of the memory management
functions to disable memory auditing within them. Functions called from
these did not get exempted from the audits, so in some cases
UserspaceEmulator reported bogus heap buffer overflows.

Memory auditing did not work at all on Clang because when querying the
addresses, their offset was taken relative to the base of `.text` which
is not the first segment in the `R/RX/RW(RELRO)/RW(non-RELRO)` layout
produced by LLD.

Similarly to when setting metadata about the allocations, we now use the
`emuctl` system call to selectively suppress auditing when we reach
these functions. This ensures that functions called from `malloc` are
affected too, and no issues occur because of the inconsistency between
Clang and GCC memory layouts.
2021-08-14 18:42:14 +02:00
Daniel Bertalan 09cef25e92 UserspaceEmulator: Make call rm32 work with address on the stack
Previously, we pushed the old `eip` on the stack before reading the new
address, which made us jump to the wrong place if the destination was
relative to the `esp`.
2021-08-14 18:42:14 +02:00
Daniel Bertalan bfe5509a28 UserspaceEmulator: Prefix MmapRegions' name with '(UE)'
When printing a backtrace, each library's base address is found by
walking through all memory regions in the coredump, and selecting the
address of the first region whose name begins with the library's soname.
This is done to support the Clang toolchain, where .text is not at
offset 0.

However, because the libraries loaded by the emulated process used the
same names, we could not distinguish those with the ones used by
UserspaceEmulator, so the backtrace ended up being garbage.

Using the libraries mapped by UE would not be a sufficient, as the
running application could ask for other libraries too, and doing away
with setting names would make debugging issues within UE code more
difficult.
2021-08-14 18:42:14 +02:00
Itamar 8505fcb8ae LibCpp: Understand preprocessor macro definition and invocation
The preprocessor now understands when a function-like macro is defined,
and can also parse calls to such macros.

The actual evaluation of function-like macros will be done in a
separate commit.
2021-08-14 12:40:55 +02:00
Andreas Kling 0d21a1307e Profiler: Set the initial size of the timeline container to a snug fit 2021-08-14 01:28:26 +02:00
Andreas Kling 8f590cbeb8 Profiler: Add a "Signposts" tab next to the "Samples" tab
This tab provides a filtered listing of all the signpost events in the
currently selected time range.
2021-08-14 01:28:26 +02:00
Andreas Kling 9a334ebb3a Profiler: Don't lose sight of timeline tracks when zooming out
Update the track sizes before repositioning them. This ensures that they
always remain visible in the timeline container.
2021-08-14 01:28:26 +02:00
Andreas Kling 3cc5308ddc Profiler: Don't include signposts in the samples list 2021-08-14 01:28:26 +02:00
Andreas Kling 2da817615e Profiler: Store signposts in the main event stream
Instead of keeping a separate Vector<Event> for signposts, let them live
in the main event stream. For fast iteration, we instead keep a cache of
the signpost event indices.
2021-08-14 01:28:26 +02:00
Andreas Kling f5db92448d Profiler: Use AK::Variant for type-specific data in Profile::Event
Each event has a different set of data depending on the event type.
2021-08-14 01:28:26 +02:00
Andreas Kling 7abf58ecaf Profiler: Store event type as enum
Also check for the most common event type (sample) first instead of
leaving it as the fallback. This avoids a lot of string comparisons
while parsing profiles.
2021-08-13 03:06:07 +02:00
Andreas Kling 5a2ccbffc5 Profiler: Remove "Signpost " prefix from timeline tooltips 2021-08-13 03:03:53 +02:00
Andreas Kling 00603d9fd0 Revert "HackStudio: Remove noop code when opening the project"
This reverts commit 012fc3f923.
2021-08-12 20:56:54 +02:00
Jean-Baptiste Boric 2084289162 Userland: Fix PATH environment variable ordering 2021-08-12 18:56:30 +02:00
Karol Kosek 012fc3f923 HackStudio: Remove noop code when opening the project
28b1e66b51 made that
the m_all_editor_wrappers vector is cleared everytime a project path
is changed (the m_project if check is just for the app launch --
the vector is empty there anyway), making the code never execute.
2021-08-12 18:55:58 +02:00
Karol Kosek a2cb5c862d HackStudio: Show the 'Save as...' dialog when saving uncreated file
Previously when user wanted to save an uncreated file, the program
would just quietly ignore the save request, without giving any message.
This can be seen when creating a new editor in split view mode.
2021-08-12 18:54:57 +02:00
Karol Kosek 8516b9532e HackStudio: Add 'Save as...' action
Not adding it to the toolbar, because it has the same icon as
a typical 'Save' action.
2021-08-12 18:54:57 +02:00
Karol Kosek 8a4bb581a2 HackStudio: Show text editor after starting the application
The user can now start typing text instead of creating a file first.

This also enables drag-and-dropping a file as soon as the application
starts.
2021-08-12 18:54:25 +02:00
Andreas Kling 1e90a3a542 Kernel: Make sys$perf_register_string() generate the string ID's
Making userspace provide a global string ID was silly, and made the API
extremely difficult to use correctly in a global profiling context.

Instead, simply make the kernel do the string ID allocation for us.
This also allows us to convert the string storage to a Vector in the
kernel (and an array in the JSON profile data.)
2021-08-12 00:03:39 +02:00
Andreas Kling 3ed6c137df Profiler: Parse and render signpost strings
The first perf_event argument to a PERF_EVENT_SIGNPOST is now
interpreted as a string ID (in the profile strings set.)

This allows us to generate signposts with custom strings. :^)
2021-08-12 00:03:39 +02:00
Andreas Kling 00b11d7577 Profiler: Parse and paint profile signpost events :^)
Signposts generated by perf_event(PERF_EVENT_SIGNPOST) now show up in
profile timelines, and if you hover them you get a tooltip with the two
arguments passed with the event.
2021-08-12 00:03:38 +02:00
Karol Kosek b1bc5532e7 HackStudio: Make "Open project" action open in the current project path
Prior this change, the action opened a File Picker
in user home directory.

Changing the startup path to a project path might make correcting
the path or switching between different projects a bit faster,
as you don't have to go through the subdirectories all over again.
It's also the path that's showed in the project tree view.
2021-08-11 01:50:33 +02:00
Ali Mohammad Pur 3ad2f1bfd1 Profiler: Disassemble the entire function if the symbol is a function
Previously the view would've cut off at the last instruction that was
hit in the profile, which is not the right behaviour for functions.
2021-08-10 23:19:33 +02:00
sin-ack b6ef12bd26 Profiler: Use SelectionBehavior::SelectRows
Profiler uses the TreeView in a tabular fashion, and so should set the
selection behavior appropriately.
2021-08-10 21:56:47 +02:00
Andreas Kling 02f9ffeb7f UserspaceEmulator: Fail sys$map_time_page() with ENOSYS for now
This allows LibC to fall back to sys$clock_gettime() until we can
add support for the kernel time page to UserspaceEmulator.
2021-08-10 19:21:16 +02:00
Andreas Kling fa64ab26a4 Kernel+UserspaceEmulator: Remove unused sys$gettimeofday()
Now that LibC uses clock_gettime() to implement gettimeofday(), we can
get rid of this entire syscall. :^)
2021-08-10 13:01:39 +02:00
Ali Mohammad Pur 369e3da6a2 UserspaceEmulator: Move all the profiling details into the Emulator
Them being in the global namespace doesn't have a lot of fans, it seems.
2021-08-10 05:13:44 +04:30
Ali Mohammad Pur 2128ae4ab0 Profiler: Disassemble the containing function for non-function symbols
This can happen if the symbol is part of a switch-case, and not
a function, which would previously have made the disassembly view
appear empty.
Now we disassemble the containing function, starting at the given label
and continuing up until the last captured instruction.
2021-08-10 05:13:44 +04:30
Ali Mohammad Pur 4bef63fa6a Profiler: Show the symbol address in object file 2021-08-10 05:13:44 +04:30
Ali Mohammad Pur 64ccf2196c UserspaceEmulator+LibC: Add support for Region-of-Interest profiling 2021-08-10 05:13:44 +04:30
Tobias Christiansen 2a77abf85e Everywhere: Use tobyase@serenityos.org for my copyright headers 2021-08-09 21:43:05 +02:00
Daniel Bertalan e9dd9d1f2c UserspaceEmulator: Use for_each_region_of_type in find_text_region
Since we now have this helper template, we can make our code cleaner.
2021-08-08 10:55:36 +02:00
Daniel Bertalan c1d6637dc7 UserspaceEmulator: Make symbolication work when .text isn't the first
... segment

This happens with binaries build with Clang or with a custom linker
script. If this is the case, offsets should be calculated not from the
base address of `.text`, but from the first section loaded for the
library.

This commit moves all UserspaceEmulator symbolication into a common
helper function and fixes a FIXME.
2021-08-08 10:55:36 +02:00
Daniel Bertalan 980f314a03 UserspaceEmulator: Fix typo in a method name
Changes `load_library_from_adress` to `load_library_from_address`.
2021-08-08 10:55:36 +02:00
Itamar 9da9398bf0 LibCpp: Do macro substitution in the preprocessor instead of the parser
After this change, the parser is completely separated from preprocessor
concepts.
2021-08-07 21:24:11 +02:00
Itamar 0c4dc00f01 LibCpp: Import definitions from headers while processing
When the preprocessor encounters an #include statement it now adds
the preprocessor definitions that exist in the included header to its
own set of definitions.

We previously only aggregated the definitions from headers after
processing the source, which was less correct. (For example, there
could be an #ifdef that depends on a definition from another header).
2021-08-07 21:24:11 +02:00
Itamar 4673a517f6 LibCpp: Do lexing in the Preprocessor
We now call Preprocessor::process_and_lex() and pass the result to the
parser.

Doing the lexing in the preprocessor will allow us to maintain the
original position information of tokens after substituting definitions.
2021-08-07 21:24:11 +02:00
sin-ack 16ac3bbfd7 LibGUI+Applications: Rename Model::is_valid to is_within_range
The previous name did not describe what the function checked, and was
easy to confuse with ModelIndex::is_valid.
2021-08-06 21:03:53 +02:00
sin-ack ca2c81251a Everywhere: Replace Model::update() with Model::invalidate()
Most of the models were just calling did_update anyway, which is
pointless since it can be unified to the base Model class. Instead, code
calling update() will now call invalidate(), which functions identically
and is more obvious in what it does.

Additionally, a default implementation is provided, which removes the
need to add empty implementations of update() for each model subclass.

Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
2021-08-06 19:14:31 +02:00
Ali Mohammad Pur 5d3b452897 Profiler: Display source location information in the disassembly view
With this, we can now have some amount of source-level profiling
information :^)
2021-08-06 01:14:03 +02:00
Ali Mohammad Pur c4437e19bd LibDebug+Everywhere: Make DebugInfo not own the ELF image
This is required to avoid copying the image where otherwise a reference
would be enough.
2021-08-06 01:14:03 +02:00