mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-05 18:52:56 +00:00
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.
25 lines
521 B
C++
25 lines
521 B
C++
/*
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/String.h>
|
|
#include <LibDebug/DebugInfo.h>
|
|
|
|
namespace Symbolication {
|
|
|
|
struct Symbol {
|
|
FlatPtr address { 0 };
|
|
String name {};
|
|
u32 offset { 0 };
|
|
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);
|
|
|
|
}
|