mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:05:08 +00:00
Kernel: Fix Process::crash assuming 32-bit mode
This commit is contained in:
parent
57b7f4ec5b
commit
8b44aa7885
2 changed files with 6 additions and 6 deletions
|
@ -332,7 +332,7 @@ void create_signal_trampoline()
|
||||||
g_signal_trampoline_region->remap();
|
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(!is_dead());
|
||||||
VERIFY(Process::current() == this);
|
VERIFY(Process::current() == this);
|
||||||
|
@ -340,11 +340,11 @@ void Process::crash(int signal, u32 eip, bool out_of_memory)
|
||||||
if (out_of_memory) {
|
if (out_of_memory) {
|
||||||
dbgln("\033[31;1mOut of memory\033[m, killing: {}", *this);
|
dbgln("\033[31;1mOut of memory\033[m, killing: {}", *this);
|
||||||
} else {
|
} else {
|
||||||
if (eip >= 0xc0000000 && g_kernel_symbols_available) {
|
if (ip >= 0xc0000000 && g_kernel_symbols_available) {
|
||||||
auto* symbol = symbolicate_kernel_address(eip);
|
auto* symbol = symbolicate_kernel_address(ip);
|
||||||
dbgln("\033[31;1m{:p} {} +{}\033[0m\n", eip, (symbol ? demangle(symbol->name) : "(k?)"), (symbol ? eip - symbol->address : 0));
|
dbgln("\033[31;1m{:p} {} +{}\033[0m\n", ip, (symbol ? demangle(symbol->name) : "(k?)"), (symbol ? ip - symbol->address : 0));
|
||||||
} else {
|
} else {
|
||||||
dbgln("\033[31;1m{:p} (?)\033[0m\n", eip);
|
dbgln("\033[31;1m{:p} (?)\033[0m\n", ip);
|
||||||
}
|
}
|
||||||
dump_backtrace();
|
dump_backtrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -421,7 +421,7 @@ public:
|
||||||
|
|
||||||
static void initialize();
|
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();
|
[[nodiscard]] siginfo_t wait_info();
|
||||||
|
|
||||||
const TTY* tty() const { return m_tty; }
|
const TTY* tty() const { return m_tty; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue