2020-01-18 09:38:21 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
2018-12-24 22:59:10 +01:00
|
|
|
#pragma once
|
|
|
|
|
2020-04-08 13:30:50 +02:00
|
|
|
#include <AK/Forward.h>
|
2018-12-24 22:59:10 +01:00
|
|
|
|
2020-02-16 01:27:42 +01:00
|
|
|
namespace Kernel {
|
|
|
|
|
2020-04-08 13:30:50 +02:00
|
|
|
struct KernelSymbol {
|
2021-02-25 16:18:36 +01:00
|
|
|
FlatPtr address;
|
2022-04-01 20:58:27 +03:00
|
|
|
char const* name;
|
2018-12-24 22:59:10 +01:00
|
|
|
};
|
|
|
|
|
2021-08-04 16:52:14 +01:00
|
|
|
enum class PrintToScreen {
|
|
|
|
No,
|
|
|
|
Yes,
|
|
|
|
};
|
|
|
|
|
2021-11-11 00:55:02 +01:00
|
|
|
FlatPtr address_for_kernel_symbol(StringView name);
|
2022-04-01 20:58:27 +03:00
|
|
|
KernelSymbol const* symbolicate_kernel_address(FlatPtr);
|
2020-04-08 13:30:50 +02:00
|
|
|
void load_kernel_symbol_table();
|
2018-12-24 22:59:10 +01:00
|
|
|
|
2020-04-08 13:30:50 +02:00
|
|
|
extern bool g_kernel_symbols_available;
|
|
|
|
extern FlatPtr g_lowest_kernel_symbol_address;
|
|
|
|
extern FlatPtr g_highest_kernel_symbol_address;
|
2019-02-24 14:51:48 +01:00
|
|
|
|
2021-08-04 16:52:14 +01:00
|
|
|
void dump_backtrace(PrintToScreen print_to_screen = PrintToScreen::No);
|
2020-02-16 01:27:42 +01:00
|
|
|
|
|
|
|
}
|