]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/i386nbsd-tdep.c
From Michal Ludvig <mludvig@suse.cz>:
[thirdparty/binutils-gdb.git] / gdb / i386nbsd-tdep.c
index 64b3dc0984ec76d319dba8c75bf4ad13bc68065e..601530bce253cdbf724ebe29ddb741a38db619ed 100644 (file)
@@ -239,8 +239,25 @@ i386nbsd_pc_in_sigtramp (CORE_ADDR pc, char *name)
 }
 
 /* From <machine/signal.h>.  */
-int i386nbsd_sc_pc_offset = 44;
-int i386nbsd_sc_sp_offset = 56;
+int i386nbsd_sc_reg_offset[I386_NUM_GREGS] =
+{
+  10 * 4,                      /* %eax */
+  9 * 4,                       /* %ecx */
+  8 * 4,                       /* %edx */
+  7 * 4,                       /* %ebx */
+  14 * 4,                      /* %esp */
+  6 * 4,                       /* %ebp */
+  5 * 4,                       /* %esi */
+  4 * 4,                       /* %edi */
+  11 * 4,                      /* %eip */
+  13 * 4,                      /* %eflags */
+  12 * 4,                      /* %cs */
+  15 * 4,                      /* %ss */
+  3 * 4,                       /* %ds */
+  2 * 4,                       /* %es */
+  1 * 4,                       /* %fs */
+  0 * 4                                /* %gs */
+};
 
 static void 
 i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -263,8 +280,8 @@ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
   /* NetBSD has a `struct sigcontext' that's different from the
      origional 4.3 BSD.  */
-  tdep->sc_pc_offset = i386nbsd_sc_pc_offset;
-  tdep->sc_sp_offset = i386nbsd_sc_sp_offset;
+  tdep->sc_reg_offset = i386nbsd_sc_reg_offset;
+  tdep->sc_num_regs = I386_NUM_GREGS;
 }
 
 /* NetBSD ELF.  */