stacktrace.c

Include dependency graph for stacktrace.c:

digraph {
    graph [bgcolor="#00000000"]
    node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2]
    edge [color="#1414CE"]
    "9" [label="stdbool.h" tooltip="stdbool.h"]
    "25" [label="refc_binary.h" tooltip="refc_binary.h"]
    "33" [label="defaultatoms.h" tooltip="defaultatoms.h"]
    "6" [label="atom.h" tooltip="atom.h"]
    "12" [label="assert.h" tooltip="assert.h"]
    "23" [label="utils.h" tooltip="utils.h"]
    "17" [label="synclist.h" tooltip="synclist.h"]
    "16" [label="list.h" tooltip="list.h"]
    "5" [label="stdint.h" tooltip="stdint.h"]
    "7" [label="stdlib.h" tooltip="stdlib.h"]
    "3" [label="context.h" tooltip="context.h"]
    "22" [label="memory.h" tooltip="memory.h"]
    "29" [label="module.h" tooltip="module.h"]
    "32" [label="valueshashtable.h" tooltip="valueshashtable.h"]
    "26" [label="resources.h" tooltip="resources.h"]
    "20" [label="term.h" tooltip="term.h"]
    "24" [label="stddef.h" tooltip="stddef.h"]
    "10" [label="erl_nif.h" tooltip="erl_nif.h"]
    "31" [label="exportedfunction.h" tooltip="exportedfunction.h"]
    "13" [label="limits.h" tooltip="limits.h"]
    "8" [label="atom_table.h" tooltip="atom_table.h"]
    "21" [label="string.h" tooltip="string.h"]
    "11" [label="term_typedef.h" tooltip="term_typedef.h"]
    "4" [label="globalcontext.h" tooltip="globalcontext.h"]
    "19" [label="smp.h" tooltip="smp.h"]
    "30" [label="atomshashtable.h" tooltip="atomshashtable.h"]
    "1" [label="/__w/AtomVM/AtomVM/src/libAtomVM/stacktrace.c" tooltip="/__w/AtomVM/AtomVM/src/libAtomVM/stacktrace.c" fillcolor="#BFBFBF"]
    "2" [label="stacktrace.h" tooltip="stacktrace.h"]
    "28" [label="timer_list.h" tooltip="timer_list.h"]
    "27" [label="mailbox.h" tooltip="mailbox.h"]
    "18" [label="stdio.h" tooltip="stdio.h"]
    "15" [label="ets.h" tooltip="ets.h"]
    "14" [label="inttypes.h" tooltip="inttypes.h"]
    "25" -> "9" [dir=forward tooltip="include"]
    "25" -> "7" [dir=forward tooltip="include"]
    "25" -> "16" [dir=forward tooltip="include"]
    "25" -> "26" [dir=forward tooltip="include"]
    "33" -> "4" [dir=forward tooltip="include"]
    "6" -> "5" [dir=forward tooltip="include"]
    "6" -> "7" [dir=forward tooltip="include"]
    "23" -> "24" [dir=forward tooltip="include"]
    "23" -> "18" [dir=forward tooltip="include"]
    "23" -> "7" [dir=forward tooltip="include"]
    "17" -> "18" [dir=forward tooltip="include"]
    "17" -> "16" [dir=forward tooltip="include"]
    "17" -> "19" [dir=forward tooltip="include"]
    "16" -> "9" [dir=forward tooltip="include"]
    "3" -> "4" [dir=forward tooltip="include"]
    "3" -> "16" [dir=forward tooltip="include"]
    "3" -> "27" [dir=forward tooltip="include"]
    "3" -> "19" [dir=forward tooltip="include"]
    "3" -> "20" [dir=forward tooltip="include"]
    "3" -> "28" [dir=forward tooltip="include"]
    "22" -> "5" [dir=forward tooltip="include"]
    "22" -> "7" [dir=forward tooltip="include"]
    "22" -> "10" [dir=forward tooltip="include"]
    "22" -> "11" [dir=forward tooltip="include"]
    "22" -> "23" [dir=forward tooltip="include"]
    "29" -> "9" [dir=forward tooltip="include"]
    "29" -> "5" [dir=forward tooltip="include"]
    "29" -> "6" [dir=forward tooltip="include"]
    "29" -> "8" [dir=forward tooltip="include"]
    "29" -> "30" [dir=forward tooltip="include"]
    "29" -> "3" [dir=forward tooltip="include"]
    "29" -> "31" [dir=forward tooltip="include"]
    "29" -> "4" [dir=forward tooltip="include"]
    "29" -> "20" [dir=forward tooltip="include"]
    "29" -> "32" [dir=forward tooltip="include"]
    "26" -> "7" [dir=forward tooltip="include"]
    "26" -> "10" [dir=forward tooltip="include"]
    "26" -> "16" [dir=forward tooltip="include"]
    "26" -> "22" [dir=forward tooltip="include"]
    "20" -> "9" [dir=forward tooltip="include"]
    "20" -> "5" [dir=forward tooltip="include"]
    "20" -> "18" [dir=forward tooltip="include"]
    "20" -> "7" [dir=forward tooltip="include"]
    "20" -> "21" [dir=forward tooltip="include"]
    "20" -> "22" [dir=forward tooltip="include"]
    "20" -> "25" [dir=forward tooltip="include"]
    "20" -> "23" [dir=forward tooltip="include"]
    "20" -> "11" [dir=forward tooltip="include"]
    "10" -> "11" [dir=forward tooltip="include"]
    "31" -> "20" [dir=forward tooltip="include"]
    "8" -> "9" [dir=forward tooltip="include"]
    "8" -> "6" [dir=forward tooltip="include"]
    "11" -> "12" [dir=forward tooltip="include"]
    "11" -> "13" [dir=forward tooltip="include"]
    "11" -> "14" [dir=forward tooltip="include"]
    "11" -> "5" [dir=forward tooltip="include"]
    "4" -> "5" [dir=forward tooltip="include"]
    "4" -> "6" [dir=forward tooltip="include"]
    "4" -> "8" [dir=forward tooltip="include"]
    "4" -> "10" [dir=forward tooltip="include"]
    "4" -> "15" [dir=forward tooltip="include"]
    "4" -> "16" [dir=forward tooltip="include"]
    "4" -> "27" [dir=forward tooltip="include"]
    "4" -> "19" [dir=forward tooltip="include"]
    "4" -> "17" [dir=forward tooltip="include"]
    "4" -> "20" [dir=forward tooltip="include"]
    "4" -> "28" [dir=forward tooltip="include"]
    "19" -> "9" [dir=forward tooltip="include"]
    "30" -> "6" [dir=forward tooltip="include"]
    "1" -> "2" [dir=forward tooltip="include"]
    "1" -> "33" [dir=forward tooltip="include"]
    "1" -> "4" [dir=forward tooltip="include"]
    "1" -> "22" [dir=forward tooltip="include"]
    "2" -> "3" [dir=forward tooltip="include"]
    "2" -> "29" [dir=forward tooltip="include"]
    "2" -> "20" [dir=forward tooltip="include"]
    "28" -> "9" [dir=forward tooltip="include"]
    "28" -> "5" [dir=forward tooltip="include"]
    "28" -> "16" [dir=forward tooltip="include"]
    "27" -> "9" [dir=forward tooltip="include"]
    "27" -> "16" [dir=forward tooltip="include"]
    "27" -> "11" [dir=forward tooltip="include"]
    "27" -> "23" [dir=forward tooltip="include"]
    "15" -> "16" [dir=forward tooltip="include"]
    "15" -> "17" [dir=forward tooltip="include"]
    "15" -> "20" [dir=forward tooltip="include"]
}

Functions

term stacktrace_create_raw(Context *ctx, Module *mod, int current_offset, term exception_class)
term stacktrace_build(Context *ctx, term *stack_info, uint32_t live)

Build a stack trace.

Parameters:
  • ctx – context

  • stack_info – pointer to stack info tuple

  • live – number of x registers to preserve, which should include stack_info

Returns:

the built stack trace

term stacktrace_exception_class(term stack_info)