mirror of
https://github.com/RGBCube/serenity
synced 2025-07-14 04:47:36 +00:00

All its members are comparable themselves, so this can be defaulted. Making it comparable will allow us, among other things, to check if a list of symbols (i.e., the result of calling the symbolicate functions) is equal or not to another, which in turn will allow us to avoid refreshing the SystemMonitor's Stack tab when successive symbolicated stacks are the same.
27 lines
595 B
C++
27 lines
595 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 {};
|
|
String object {};
|
|
u32 offset { 0 };
|
|
Vector<Debug::DebugInfo::SourcePosition> source_positions;
|
|
bool operator==(Symbol const&) const = default;
|
|
};
|
|
|
|
Optional<FlatPtr> kernel_base();
|
|
Vector<Symbol> symbolicate_thread(pid_t pid, pid_t tid);
|
|
Optional<Symbol> symbolicate(String const& path, FlatPtr address);
|
|
|
|
}
|