The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
backtrace.h File Reference
#include "common/stdint.h"

Go to the source code of this file.

Macros

#define BACKTRACE_MAX_FRAMES   16
 symbolised kernel backtraces for panics and exceptions.

Functions

void backtrace_print_pc (const char *label, uintptr_t pc)
 print one code address as "0x0001234a func+0x1c".
void backtrace_print_return (const char *label, uintptr_t ret)
 print one return address.
void backtrace_print (uintptr_t frame)
 print the return addresses found by walking frame pointers from frame.

Macro Definition Documentation

◆ BACKTRACE_MAX_FRAMES

#define BACKTRACE_MAX_FRAMES   16

symbolised kernel backtraces for panics and exceptions.

output goes to the console and to the serial log.

Function Documentation

◆ backtrace_print_pc()

void backtrace_print_pc ( const char * label,
uintptr_t pc )

print one code address as "0x0001234a func+0x1c".

Parameters
labeltext printed before the address (e.g. "at" or "#3").
pcthe code address.

◆ backtrace_print_return()

void backtrace_print_return ( const char * label,
uintptr_t ret )

print one return address.

like backtrace_print_pc, but the symbol is looked up for the call instruction before it (ret - 1).

Parameters
labeltext printed before the address (e.g. "?").
retthe return address.

◆ backtrace_print()

void backtrace_print ( uintptr_t frame)

print the return addresses found by walking frame pointers from frame.

stops at the first address outside kernel code (e.g. a user-mode frame).

Parameters
framethe frame pointer to start from.