summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-03-02 15:58:59 +0000
committerAndrew Cagney <cagney@redhat.com>2004-03-02 15:58:59 +0000
commit77dc849ac69cf1ece748f5249f57707f145a1e5b (patch)
treee4418131b7009c4b15df373c3bd79649905a9c90
parent043366b9df4ffba1aecec0b91b2b58e82464f58b (diff)
downloadgdb-77dc849ac69cf1ece748f5249f57707f145a1e5b.tar.gz
2004-03-02 Andrew Cagney <cagney@redhat.com>
* 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.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/amd64-nat.c6
-rw-r--r--gdb/i386-tdep.h6
3 files changed, 19 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ca7fa6de537..320d988b02d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2004-03-02 Andrew Cagney <cagney@redhat.com>
+
+ * 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.
+
2004-03-01 Andrew Cagney <cagney@redhat.com>
* rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compiler error,
diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c
index 1efe47a5698..31b360377be 100644
--- a/gdb/amd64-nat.c
+++ b/gdb/amd64-nat.c
@@ -139,6 +139,12 @@ amd64_collect_native_gregset (const struct regcache *regcache,
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)
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index f164e9d849a..9cb87653e12 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -166,7 +166,11 @@ enum i386_regnum
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