[panic.serial] Add location to panic data
Updated kassert to be an actual function, and used the __builtin_* functions for location data. Updated the panic handler protocol to include sending location data as three more parameters. Updated the serial panic handler to display that data along with the (optional) message.
This commit is contained in:
@@ -6,8 +6,11 @@ struct cpu_state;
|
||||
|
||||
extern "C"
|
||||
void panic_handler(
|
||||
const char *message,
|
||||
const void *symbol_data,
|
||||
const char *message,
|
||||
const char *function,
|
||||
const char *file,
|
||||
uint64_t line,
|
||||
const cpu_state *regs)
|
||||
{
|
||||
panic::serial_port com1(panic::COM1);
|
||||
@@ -16,7 +19,7 @@ void panic_handler(
|
||||
panic::frame const *fp = nullptr;
|
||||
asm ( "mov %%rbp, %0" : "=r" (fp) );
|
||||
|
||||
print_header(com1, message);
|
||||
print_header(com1, message, function, file, line);
|
||||
print_callstack(com1, syms, fp);
|
||||
print_cpu_state(com1, *regs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user