Andreas Kling
67bc5e0bbd
DynamicLoader: Pass MAP_FIXED to mmap() where applicable
...
Otherwise the kernel is free to allocate a different address.
2021-01-27 21:14:42 +01:00
Andreas Kling
adcc1c1eff
LibELF: Cache the DynamicObject in DynamicLoader
...
This avoids reparsing the same dynamic library file multiple times.
2021-01-25 18:57:06 +01:00
Andreas Kling
41d8734288
LibELF: Use Optional<SymbolLookupResult> as a return type
...
Instead of storing a "found" state inside the result object.
2021-01-25 18:57:06 +01:00
Andreas Kling
a5de46684b
LibELF: Convert String::format() to String::formatted()
2021-01-25 18:57:06 +01:00
Andreas Kling
c5e52be5d4
LibELF: Convert dbgprintf() in DynamicObject class to dbgln()
2021-01-25 18:57:06 +01:00
Andreas Kling
98e4e2aae3
LibELF: Convert dbgprintf() in DynamicLinker class to dbgln()
2021-01-25 18:57:06 +01:00
Andreas Kling
e9fd81b964
LibELF: Convert dbgprintf() in DynamicLoader class to dbgln()
2021-01-25 18:57:06 +01:00
asynts
eea72b9b5c
Everywhere: Hook up remaining debug macros to Debug.h.
2021-01-25 09:47:36 +01:00
asynts
acdcf59a33
Everywhere: Remove unnecessary debug comments.
...
It would be tempting to uncomment these statements, but that won't work
with the new changes.
This was done with the following commands:
find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/#define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/#define/ { toggle = 1 }' {} \;
find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec awk -i inplace '$0 !~ /\/\/ #define/ { if (!toggle) { print; } else { toggle = !toggle } } ; $0 ~/\/\/ #define/ { toggle = 1 }' {} \;
2021-01-25 09:47:36 +01:00
Ben Wiederhake
67cda61b7f
Libraries: Add missing headers
...
A C++ source file containing just
#include <LibFoo/Bar.h>
should always compile cleanly.
This patch adds missing header inclusions that could have caused weird error
messages if they were used in a different context. Also, this confused QtCreator.
2021-01-22 21:49:54 +01:00
Ben Wiederhake
58f25092c7
Meta: Fix silly copyright line
2021-01-22 11:28:07 +01:00
Linus Groh
678919e9c1
Kernel: Set "pledge_violation" coredump metadata in REQUIRE_PROMISE()
...
Similar to LibC storing an assertion message before aborting, process
death by pledge violation now sets a "pledge_violation" key with the
respective pledge name as value in its coredump metadata, which the
CrashReporter will then show.
2021-01-20 21:01:15 +01:00
Linus Groh
6715ca3e16
LibELF: Remove unused m_global_symbol_lookup_func from DynamicObject
...
This was refactored in 3e815ad
, leaving this unused member behind.
2021-01-18 19:17:52 +01:00
Brendan Coles
66b0012bfd
LibELF: validate_program_headers: Validate PT_INTERP header p_filesz > 1
2021-01-16 22:39:26 +01:00
Linus Groh
568cde5e23
Kernel+LibELF+LibCoreDump+CrashReporter: Use JSON for ProcessInfo
...
This is in preparation of adding (much) more process information to
coredumps. As we can only have one null-terminated char[] of arbitrary
length in each struct it's now a single JSON blob, which is a great fit:
easily extensible in the future and allows for key/value pairs and even
nested objects, which will be used e.g. for the process environment, for
example.
2021-01-15 23:26:47 +01:00
Andreas Kling
13d7c09125
Libraries: Move to Userland/Libraries/
2021-01-12 12:17:46 +01:00