The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
Loading...
Searching...
No Matches
backtrace.h
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* symbolised kernel backtraces for panics and exceptions.
5
* output goes to the console and to the serial log.
6
*/
7
8
#include "
common/stdint.h
"
9
10
// deepest backtrace printed.
11
#define BACKTRACE_MAX_FRAMES 16
12
13
/**
14
* print one code address as "0x0001234a func+0x1c".
15
* @param label text printed before the address (e.g. "at" or "#3").
16
* @param pc the code address.
17
*/
18
void
backtrace_print_pc
(
const
char
*label,
uintptr_t
pc);
19
20
/**
21
* print one return address. like backtrace_print_pc, but the symbol is
22
* looked up for the call instruction before it (ret - 1).
23
* @param label text printed before the address (e.g. "?").
24
* @param ret the return address.
25
*/
26
void
backtrace_print_return
(
const
char
*label,
uintptr_t
ret);
27
28
/**
29
* print the return addresses found by walking frame pointers from frame.
30
* stops at the first address outside kernel code (e.g. a user-mode frame).
31
* @param frame the frame pointer to start from.
32
*/
33
void
backtrace_print
(
uintptr_t
frame);
backtrace_print_return
void backtrace_print_return(const char *label, uintptr_t ret)
print one return address.
Definition
backtrace.c:62
backtrace_print
void backtrace_print(uintptr_t frame)
print the return addresses found by walking frame pointers from frame.
Definition
backtrace.c:67
backtrace_print_pc
void backtrace_print_pc(const char *label, uintptr_t pc)
print one code address as "0x0001234a func+0x1c".
Definition
backtrace.c:57
stdint.h
uintptr_t
__UINTPTR_TYPE__ uintptr_t
Definition
stdint.h:19
src
kernel
debug
backtrace.h
Generated by
1.18.0