2004-03-02 Andrew Cagney * i386-tdep.h (enum i386_regnum): Add I386_DS_REGNUM, I386_ES_REGNUM, I386_FS_REGNUM, and I386_GS_REGNUM. Remove trailing comma and redundant assignment of I386_ST0_REGNUM. * amd64-nat.c (amd64_collect_native_gregset): Zero-extend the 32-bit segment registers. Index: amd64-nat.c =================================================================== RCS file: /cvs/src/src/gdb/amd64-nat.c,v retrieving revision 1.5 diff -u -r1.5 amd64-nat.c --- amd64-nat.c 28 Feb 2004 21:55:48 -0000 1.5 +++ amd64-nat.c 2 Mar 2004 15:53:26 -0000 @@ -139,6 +139,12 @@ if (regnum == -1 || regnum == i) memset (regs + amd64_native_gregset_reg_offset (i), 0, 8); } + /* Ditto for %cs, %ss, %ds, %es, %fs, and %gs. */ + for (i = I386_CS_REGNUM; i <= I386_GS_REGNUM; i++) + { + if (regnum == -1 || regnum == i) + memset (regs + amd64_native_gregset_reg_offset (i), 0, 8); + } } if (num_regs > NUM_REGS) Index: i386-tdep.h =================================================================== RCS file: /cvs/src/src/gdb/i386-tdep.h,v retrieving revision 1.36 diff -u -r1.36 i386-tdep.h --- i386-tdep.h 22 Feb 2004 11:19:14 -0000 1.36 +++ i386-tdep.h 2 Mar 2004 15:53:26 -0000 @@ -166,7 +166,11 @@ I386_EFLAGS_REGNUM, /* %eflags */ I386_CS_REGNUM, /* %cs */ I386_SS_REGNUM, /* %ss */ - I386_ST0_REGNUM = 16, /* %st(0) */ + I386_DS_REGNUM, /* %ds */ + I386_ES_REGNUM, /* %es */ + I386_FS_REGNUM, /* %fs */ + I386_GS_REGNUM, /* %gs */ + I386_ST0_REGNUM /* %st(0) */ }; #define I386_NUM_GREGS 16