1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:57:35 +00:00

Userland: Use /proc/kernel_base to determine the kernel base address

This removes all the hard-coded kernel base addresses from userspace
tools.

One downside for this is that e.g. Profiler no longer uses a different
color for kernel symbols when run as a non-root user.
This commit is contained in:
Gunnar Beutner 2021-07-22 18:41:52 +02:00 committed by Andreas Kling
parent 6115258a5c
commit 60d6137e73
9 changed files with 63 additions and 48 deletions

View file

@ -18,6 +18,7 @@ struct Symbol {
Vector<Debug::DebugInfo::SourcePosition> source_positions;
};
Optional<FlatPtr> kernel_base();
Vector<Symbol> symbolicate_thread(pid_t pid, pid_t tid);
Optional<Symbol> symbolicate(String const& path, FlatPtr address);