mirror of
https://github.com/justinian/jsix.git
synced 2025-12-12 09:24:31 -08:00
They're never actually going to change independently, and it's also brining in kutil headers more places than they should be.
20 lines
376 B
C
20 lines
376 B
C
#pragma once
|
|
/// \file debug.h
|
|
/// Debugging utilities
|
|
|
|
#include <stdint.h>
|
|
|
|
extern "C" {
|
|
uintptr_t get_rsp();
|
|
uintptr_t get_rip();
|
|
uintptr_t get_frame(int frame);
|
|
|
|
}
|
|
|
|
void print_regs(const cpu_state ®s);
|
|
void print_stack(const cpu_state ®s);
|
|
void print_stacktrace(int skip = 0);
|
|
|
|
#define print_reg(name, value) cons->printf(" %s: %016lx\n", name, (value));
|
|
|