summaryrefslogtreecommitdiff
path: root/Kernel/KSyms.cpp
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2022-09-21 14:33:39 +0200
committerAndreas Kling <kling@serenityos.org>2022-10-01 14:09:01 +0200
commitad5e8bbb4fb827d4710cbe90c77511eee22b5d28 (patch)
tree8baae1e73dbe71a89dca661012212a492784da3c /Kernel/KSyms.cpp
parent57901a6f62dbf1cdac577eb0d43004e547e337c3 (diff)
downloadserenity-ad5e8bbb4fb827d4710cbe90c77511eee22b5d28.zip
Kernel: Add ability to dump backtrace from provided frame pointer
When an exception happens it is sometimes hard to figure out where exactly the exception happened, so use the frame pointer of the trap frame to print a backtrace.
Diffstat (limited to 'Kernel/KSyms.cpp')
-rw-r--r--Kernel/KSyms.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Kernel/KSyms.cpp b/Kernel/KSyms.cpp
index e33cb220c5..4e66a6781b 100644
--- a/Kernel/KSyms.cpp
+++ b/Kernel/KSyms.cpp
@@ -161,6 +161,11 @@ NEVER_INLINE static void dump_backtrace_impl(FlatPtr base_pointer, bool use_ksym
}
}
+void dump_backtrace_from_base_pointer(FlatPtr base_pointer)
+{
+ dump_backtrace_impl(base_pointer, g_kernel_symbols_available, PrintToScreen::Yes);
+}
+
void dump_backtrace(PrintToScreen print_to_screen)
{
static bool in_dump_backtrace = false;