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

Function dump_stack

payloads/libpayload/arch/arm/exception.c:48–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46};
47
48static void dump_stack(uintptr_t addr, size_t bytes)
49{
50 int i, j;
51 const int line = 8;
52 uint32_t *ptr = (uint32_t *)(addr & ~(line * sizeof(*ptr) - 1));
53
54 printf("Dumping stack:\n");
55 for (i = bytes / sizeof(*ptr); i >= 0; i -= line) {
56 printf("%p: ", ptr + i);
57 for (j = i; j < i + line; j++)
58 printf("%08x ", *(ptr + j));
59 printf("\n");
60 }
61}
62
63static void print_regs(void)
64{

Callers 1

exception_dispatchFunction · 0.70

Calls 1

printfFunction · 0.85

Tested by

no test coverage detected