| 64 | }; |
| 65 | |
| 66 | static 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 | |
| 81 | static void print_regs(struct exception_state *state) |
| 82 | { |
no test coverage detected