diff options
author | Alex Auvolat <alex@adnab.me> | 2015-03-11 17:59:28 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2015-03-11 17:59:28 +0100 |
commit | 0b76aff59b586d87ee0449bc7deda878f4633515 (patch) | |
tree | 8fd773681e302d84bc1f33c2a2bdf791f0b0df95 /src/kernel/include | |
parent | 64b9108a58d3483e9b63511c4cf74b12dceeb0f6 (diff) | |
download | kogata-0b76aff59b586d87ee0449bc7deda878f4633515.tar.gz kogata-0b76aff59b586d87ee0449bc7deda878f4633515.zip |
Add better stack tracing technology (now uses kernel memory map!)
Diffstat (limited to 'src/kernel/include')
-rw-r--r-- | src/kernel/include/dev/v86.h | 4 | ||||
-rw-r--r-- | src/kernel/include/sys.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/kernel/include/dev/v86.h b/src/kernel/include/dev/v86.h index b260fa7..4347b08 100644 --- a/src/kernel/include/dev/v86.h +++ b/src/kernel/include/dev/v86.h @@ -17,10 +17,10 @@ typedef uint32_t v86_farptr_t; #define V86_SEG_OF_LIN(x) ((size_t)(x) >> 4) #define V86_OFF_OF_LIN(x) ((size_t)(x) & 0x0F) #define V86_LIN_OF_SEG_OFF(seg, off) ((((size_t)(seg)) << 4) + ((size_t)(off))) -inline void* v86_lin_of_fp(v86_farptr_t x) { +static inline void* v86_lin_of_fp(v86_farptr_t x) { return (void*)V86_LIN_OF_SEG_OFF(x>>16, x & 0xFFFF); } -inline v86_farptr_t v86_fp_of_lin(void* p) { +static inline v86_farptr_t v86_fp_of_lin(void* p) { return (V86_SEG_OF_LIN(p) << 16) | V86_OFF_OF_LIN(p); } diff --git a/src/kernel/include/sys.h b/src/kernel/include/sys.h index 61bfc59..038135b 100644 --- a/src/kernel/include/sys.h +++ b/src/kernel/include/sys.h @@ -92,4 +92,7 @@ static inline void invlpg(void* addr) { #define ALIGN4_DOWN(x) (((size_t)x)&MASK4) +void load_kernel_symbol_map(char* text, size_t len); +void kernel_stacktrace(uint32_t ebp, uint32_t eip); + /* vim: set ts=4 sw=4 tw=0 noet :*/ |