summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendiadyoin1 <leon2002.la@gmail.com>2021-06-28 18:32:25 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-28 19:26:06 +0200
commit8b44aa788589d919962ce953ac847433f073ad49 (patch)
tree275559e29dd08ebb48e9dd0fae93207ca072e680
parent57b7f4ec5b0afd0035e9eaec0141f9d8a865965b (diff)
downloadserenity-8b44aa788589d919962ce953ac847433f073ad49.zip
Kernel: Fix Process::crash assuming 32-bit mode
-rw-r--r--Kernel/Process.cpp10
-rw-r--r--Kernel/Process.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 6e54f62483..c49b83cb11 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -332,7 +332,7 @@ void create_signal_trampoline()
g_signal_trampoline_region->remap();
}
-void Process::crash(int signal, u32 eip, bool out_of_memory)
+void Process::crash(int signal, FlatPtr ip, bool out_of_memory)
{
VERIFY(!is_dead());
VERIFY(Process::current() == this);
@@ -340,11 +340,11 @@ void Process::crash(int signal, u32 eip, bool out_of_memory)
if (out_of_memory) {
dbgln("\033[31;1mOut of memory\033[m, killing: {}", *this);
} else {
- if (eip >= 0xc0000000 && g_kernel_symbols_available) {
- auto* symbol = symbolicate_kernel_address(eip);
- dbgln("\033[31;1m{:p} {} +{}\033[0m\n", eip, (symbol ? demangle(symbol->name) : "(k?)"), (symbol ? eip - symbol->address : 0));
+ if (ip >= 0xc0000000 && g_kernel_symbols_available) {
+ auto* symbol = symbolicate_kernel_address(ip);
+ dbgln("\033[31;1m{:p} {} +{}\033[0m\n", ip, (symbol ? demangle(symbol->name) : "(k?)"), (symbol ? ip - symbol->address : 0));
} else {
- dbgln("\033[31;1m{:p} (?)\033[0m\n", eip);
+ dbgln("\033[31;1m{:p} (?)\033[0m\n", ip);
}
dump_backtrace();
}
diff --git a/Kernel/Process.h b/Kernel/Process.h
index f14fc87b98..2de9e7fd80 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -421,7 +421,7 @@ public:
static void initialize();
- [[noreturn]] void crash(int signal, u32 eip, bool out_of_memory = false);
+ [[noreturn]] void crash(int signal, FlatPtr ip, bool out_of_memory = false);
[[nodiscard]] siginfo_t wait_info();
const TTY* tty() const { return m_tty; }