#include <console/console.h>
#include <string.h>
-#if CONFIG_GDB_STUB == 1
+#if defined(CONFIG_GDB_STUB) && CONFIG_GDB_STUB == 1
/* BUFMAX defines the maximum number of characters in inbound/outbound buffers.
* At least NUM_REGBYTES*2 are needed for register packets
}
#endif /* CONFIG_GDB_STUB */
-struct eregs {
- uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi;
- uint32_t vector;
- uint32_t error_code;
- uint32_t eip;
- uint32_t cs;
- uint32_t eflags;
-};
+#include <arch/registers.h>
+
+void x86_exception(struct eregs *info);
void x86_exception(struct eregs *info)
{
put_packet(out_buffer);
}
#else /* !CONFIG_GDB_STUB */
- printk_emerg(
- "Unexpected Exception: %d @ %02x:%08lx - Halting\n"
- "Code: %d eflags: %08lx\n"
- "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n"
- "edi: %08lx esi: %08lx ebp: %08lx esp: %08lx\n",
+ printk(BIOS_EMERG,
+ "Unexpected Exception: %d @ %02x:%08x - Halting\n"
+ "Code: %d eflags: %08x\n"
+ "eax: %08x ebx: %08x ecx: %08x edx: %08x\n"
+ "edi: %08x esi: %08x ebp: %08x esp: %08x\n",
info->vector, info->cs, info->eip,
info->error_code, info->eflags,
info->eax, info->ebx, info->ecx, info->edx,