Cthulhu  0.2.10
Cthulhu compiler collection
backtrace.c File Reference
#include "format/backtrace.h"
#include "common.h"
#include "backtrace/backtrace.h"
#include "io/io.h"
#include "arena/arena.h"
#include "std/str.h"
#include "std/typed/vector.h"
#include "base/panic.h"
#include "base/util.h"
#include "core/macros.h"
Include dependency graph for backtrace.c:

Go to the source code of this file.

Data Structures

struct  bt_report_t
 a backtrace report context More...
 
struct  entry_t
 a single backtrace entry More...
 
struct  backtrace_t
 
struct  collapsed_t
 a single possibly collapsed frame this is a span covering (first, last) * repeat frames More...
 
struct  symbol_match_info_t
 

Macros

#define COLOUR_ADDR   eColourRed
 
#define COLOUR_SYMBOL   eColourBlue
 
#define COLOUR_INDEX   eColourCyan
 
#define COLOUR_RECURSE   eColourYellow
 
#define COLOUR_LINE   eColourWhite
 
#define IS_COLLAPSED_RANGE(it)   ((it).repeat != 0)
 
#define PTR_TEXT_LEN   (2 + 2 * sizeof(void*))
 

Functions

STA_DECL void fmt_backtrace (fmt_backtrace_t fmt, bt_report_t *report)
 print a backtrace report More...
 
STA_DECL bt_report_tbt_report_new (arena_t *arena)
 create a new backtrace report More...
 
STA_DECL bt_report_tbt_report_collect (arena_t *arena)
 collect a backtrace into a report this is equivalent to calling bt_report_new() and then bt_report_add() More...
 
STA_DECL void bt_report_add (bt_report_t *report, bt_address_t frame)
 add a frame to a backtrace report More...
 

Macro Definition Documentation

◆ COLOUR_ADDR

#define COLOUR_ADDR   eColourRed

Definition at line 20 of file backtrace.c.

◆ COLOUR_INDEX

#define COLOUR_INDEX   eColourCyan

Definition at line 22 of file backtrace.c.

◆ COLOUR_LINE

#define COLOUR_LINE   eColourWhite

Definition at line 24 of file backtrace.c.

◆ COLOUR_RECURSE

#define COLOUR_RECURSE   eColourYellow

Definition at line 23 of file backtrace.c.

◆ COLOUR_SYMBOL

#define COLOUR_SYMBOL   eColourBlue

Definition at line 21 of file backtrace.c.

◆ IS_COLLAPSED_RANGE

#define IS_COLLAPSED_RANGE (   it)    ((it).repeat != 0)

Definition at line 104 of file backtrace.c.

◆ PTR_TEXT_LEN

#define PTR_TEXT_LEN   (2 + 2 * sizeof(void*))

Definition at line 240 of file backtrace.c.