FreeBSD kernel kern code
|
#include "opt_ddb.h"
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/linker.h>
#include <sys/malloc.h>
#include <sys/sbuf.h>
#include <sys/stack.h>
#include <sys/systm.h>
#include <sys/sysctl.h>
Go to the source code of this file.
Functions | |
__FBSDID ("$FreeBSD$") | |
FEATURE (stack, "Support for capturing kernel stack") | |
MALLOC_DEFINE (M_STACK, "stack", "Stack Traces") | |
static int | stack_symbol (vm_offset_t pc, char *namebuf, u_int buflen, long *offset, int flags) |
static int | stack_symbol_ddb (vm_offset_t pc, const char **name, long *offset) |
struct stack * | stack_create (int flags) |
void | stack_destroy (struct stack *st) |
int | stack_put (struct stack *st, vm_offset_t pc) |
void | stack_copy (const struct stack *src, struct stack *dst) |
void | stack_zero (struct stack *st) |
void | stack_print (const struct stack *st) |
void | stack_print_short (const struct stack *st) |
void | stack_print_ddb (const struct stack *st) |
int | stack_sbuf_print_flags (struct sbuf *sb, const struct stack *st, int flags, enum stack_sbuf_fmt format) |
void | stack_sbuf_print (struct sbuf *sb, const struct stack *st) |
__FBSDID | ( | "$FreeBSD$" | ) |
FEATURE | ( | stack | , |
"Support for capturing kernel stack" | |||
) |
MALLOC_DEFINE | ( | M_STACK | , |
"stack" | , | ||
"Stack Traces" | |||
) |
void stack_copy | ( | const struct stack * | src, |
struct stack * | dst | ||
) |
Definition at line 82 of file subr_stack.c.
References src.
Referenced by sbuf_print_witness_badstacks(), and witness_checkorder().
struct stack * stack_create | ( | int | flags | ) |
Definition at line 55 of file subr_stack.c.
References flags, malloc(), and st.
void stack_destroy | ( | struct stack * | st | ) |
void stack_print | ( | const struct stack * | st | ) |
Definition at line 96 of file subr_stack.c.
References printf(), st, and stack_symbol().
void stack_print_ddb | ( | const struct stack * | st | ) |
Definition at line 132 of file subr_stack.c.
References name, printf(), st, and stack_symbol_ddb().
Referenced by kdb_backtrace(), and kdb_backtrace_thread().
void stack_print_short | ( | const struct stack * | st | ) |
Definition at line 112 of file subr_stack.c.
References printf(), st, and stack_symbol().
int stack_put | ( | struct stack * | st, |
vm_offset_t | pc | ||
) |
Definition at line 71 of file subr_stack.c.
References st.
void stack_sbuf_print | ( | struct sbuf * | sb, |
const struct stack * | st | ||
) |
Definition at line 203 of file subr_stack.c.
References st, and stack_sbuf_print_flags().
Referenced by sbuf_print_witness_badstacks().
int stack_sbuf_print_flags | ( | struct sbuf * | sb, |
const struct stack * | st, | ||
int | flags, | ||
enum stack_sbuf_fmt | format | ||
) |
Definition at line 173 of file subr_stack.c.
References flags, sbuf_nl_terminate(), sbuf_printf(), st, and stack_symbol().
Referenced by stack_sbuf_print(), tty_info(), and witness_checkorder().
|
static |
Definition at line 255 of file subr_stack.c.
References flags, and linker_search_symbol_name_flags().
Referenced by stack_print(), stack_print_short(), and stack_sbuf_print_flags().
|
static |
Definition at line 271 of file subr_stack.c.
References linker_ddb_search_symbol(), linker_ddb_symbol_values(), name, and sym.
Referenced by stack_print_ddb().
void stack_zero | ( | struct stack * | st | ) |
Definition at line 89 of file subr_stack.c.
References st.
Referenced by kdb_backtrace(), sbuf_print_witness_badstacks(), witness_debugger(), and witness_lock_order_add().