MCPcopy Create free account
hub / github.com/coreboot/coreboot / dump_stack

Function dump_stack

payloads/libpayload/arch/arm64/exception.c:66–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64};
65
66static void dump_stack(uintptr_t addr, size_t bytes)
67{
68 int i, j;
69 const int words_per_line = 8;
70 uint64_t *ptr = (void *)ALIGN_DOWN(addr, words_per_line * sizeof(*ptr));
71
72 printf("Dumping stack:\n");
73 for (i = bytes / sizeof(*ptr); i >= 0; i -= words_per_line) {
74 printf("%p: ", ptr + i);
75 for (j = i; j < i + words_per_line; j++)
76 printf("%016llx ", *(ptr + j));
77 printf("\n");
78 }
79}
80
81static void print_regs(struct exception_state *state)
82{

Callers 1

exception_dispatchFunction · 0.70

Calls 1

printfFunction · 0.85

Tested by

no test coverage detected