summaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2007-03-30 15:29:46 +0000
committerDaniel Jacobowitz <dan@debian.org>2007-03-30 15:29:46 +0000
commitde4cb2d08da935c1579813e1074f931cedfc9e9f (patch)
tree8916d93f6179173295d054e723b9c8b18206bb51 /gdb/gdbserver
parente97e48896e60d92e7628d1efaebfd03817f66d71 (diff)
downloadgdb-de4cb2d08da935c1579813e1074f931cedfc9e9f.tar.gz
* i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
(i387_fxsave_to_cache): Check fp->ftag while building ftag value.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/i387-fp.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 5efef46a0e5..602dae0e313 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
+ (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
+
2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
* configure.srv (arm*-*-mingw32ce*): Move near the other
diff --git a/gdb/gdbserver/i387-fp.c b/gdb/gdbserver/i387-fp.c
index cce8790dc2a..e0b460fc742 100644
--- a/gdb/gdbserver/i387-fp.c
+++ b/gdb/gdbserver/i387-fp.c
@@ -174,6 +174,7 @@ i387_cache_to_fxsave (void *buf)
/* Convert to the simplifed tag form stored in fxsave data. */
collect_register_by_name ("ftag", &val);
val &= 0xFFFF;
+ val2 = 0;
for (i = 7; i >= 0; i--)
{
int tag = (val >> (i * 2)) & 3;
@@ -270,7 +271,7 @@ i387_fxsave_to_cache (const void *buf)
for (i = 7; i >= 0; i--)
{
int tag;
- if (val & (1 << i))
+ if (fp->ftag & (1 << i))
tag = i387_ftag (fp, (i + 8 - top) % 8);
else
tag = 3;