+ if ((regdump == TRUE) && (regs != NULL)) {
+#if defined(__x86_64__)
+ x86_saved_state64_t *ss64p = saved_state64(regs);
+ kdb_printf(
+ "RAX: 0x%016llx, RBX: 0x%016llx, RCX: 0x%016llx, RDX: 0x%016llx\n"
+ "RSP: 0x%016llx, RBP: 0x%016llx, RSI: 0x%016llx, RDI: 0x%016llx\n"
+ "R8: 0x%016llx, R9: 0x%016llx, R10: 0x%016llx, R11: 0x%016llx\n"
+ "R12: 0x%016llx, R13: 0x%016llx, R14: 0x%016llx, R15: 0x%016llx\n"
+ "RFL: 0x%016llx, RIP: 0x%016llx, CS: 0x%016llx, SS: 0x%016llx\n",
+ ss64p->rax, ss64p->rbx, ss64p->rcx, ss64p->rdx,
+ ss64p->isf.rsp, ss64p->rbp, ss64p->rsi, ss64p->rdi,
+ ss64p->r8, ss64p->r9, ss64p->r10, ss64p->r11,
+ ss64p->r12, ss64p->r13, ss64p->r14, ss64p->r15,
+ ss64p->isf.rflags, ss64p->isf.rip, ss64p->isf.cs,
+ ss64p->isf.ss);
+ PC = ss64p->isf.rip;
+#else
+ x86_saved_state32_t *ss32p = saved_state32(regs);
+ kdb_printf(
+ "EAX: 0x%08x, EBX: 0x%08x, ECX: 0x%08x, EDX: 0x%08x\n"
+ "CR2: 0x%08x, EBP: 0x%08x, ESI: 0x%08x, EDI: 0x%08x\n"
+ "EFL: 0x%08x, EIP: 0x%08x, CS: 0x%08x, DS: 0x%08x\n",
+ ss32p->eax,ss32p->ebx,ss32p->ecx,ss32p->edx,
+ ss32p->cr2,ss32p->ebp,ss32p->esi,ss32p->edi,
+ ss32p->efl,ss32p->eip,ss32p->cs, ss32p->ds);
+ PC = ss32p->eip;
+#endif
+ }
+
+ kdb_printf("Backtrace (CPU %d), "
+#if PRINT_ARGS_FROM_STACK_FRAME
+ "Frame : Return Address (4 potential args on stack)\n", cpu_number());
+#else
+ "Frame : Return Address\n", cpu_number());
+#endif