[gdb] Add support for x86_64

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2016-03-20 12:00:15 +00:00
parent 1afcccd5fd
commit 311a5732c8
8 changed files with 477 additions and 225 deletions

View File

@@ -15,41 +15,29 @@
/* POSIX signal numbers for reporting traps to GDB */
#define SIGILL 4
#define SIGTRAP 5
#define SIGBUS 7
#define SIGFPE 8
#define SIGSEGV 11
#define SIGSTKFLT 16
.globl gdbmach_nocode_sigfpe
gdbmach_nocode_sigfpe:
.globl gdbmach_sigfpe
gdbmach_sigfpe:
pushl $SIGFPE
jmp gdbmach_interrupt
.globl gdbmach_nocode_sigtrap
gdbmach_nocode_sigtrap:
.globl gdbmach_sigtrap
gdbmach_sigtrap:
pushl $SIGTRAP
jmp gdbmach_interrupt
.globl gdbmach_nocode_sigstkflt
gdbmach_nocode_sigstkflt:
.globl gdbmach_sigstkflt
gdbmach_sigstkflt:
pushl $SIGSTKFLT
jmp gdbmach_interrupt
.globl gdbmach_nocode_sigill
gdbmach_nocode_sigill:
.globl gdbmach_sigill
gdbmach_sigill:
pushl $SIGILL
jmp gdbmach_interrupt
.globl gdbmach_withcode_sigbus
gdbmach_withcode_sigbus:
movl $SIGBUS, (%esp)
jmp gdbmach_interrupt
.globl gdbmach_withcode_sigsegv
gdbmach_withcode_sigsegv:
movl $SIGSEGV, (%esp)
jmp gdbmach_interrupt
/* When invoked, the stack contains: eflags, cs, eip, signo. */
#define IH_OFFSET_GDB_REGS ( 0 )
#define IH_OFFSET_GDB_EIP ( IH_OFFSET_GDB_REGS + SIZEOF_I386_REGS )