This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
PATCH: Always initialize x86_xcr0 to I386_XSTATE_SSE_MASK
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GDB <gdb-patches at sourceware dot org>
- Cc: pedro at codesourcery dot com
- Date: Sun, 11 Apr 2010 14:17:01 -0700
- Subject: PATCH: Always initialize x86_xcr0 to I386_XSTATE_SSE_MASK
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
We should always initialize x86_xcr0 to I386_XSTATE_SSE_MASK when
calling init_registers_i386_linux/init_registers_amd64_linux. Othewise,
we may run into problems when invalidating regcache. OK to install?
Thanks.
H.J.
---
2010-04-11 H.J. Lu <hongjiu.lu@intel.com>
* linux-x86-low.c (x86_linux_update_xmltarget): Always initialize
x86_xcr0 to I386_XSTATE_SSE_MASK.
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index d79713f..15521a6 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -842,6 +842,9 @@ x86_linux_update_xmltarget (void)
return;
pid = pid_of (get_thread_lwp (current_inferior));
+
+ x86_xcr0 = I386_XSTATE_SSE_MASK;
+
#ifdef __x86_64__
if (num_xmm_registers == 8)
init_registers_i386_linux ();
@@ -894,8 +897,6 @@ x86_linux_update_xmltarget (void)
gdbserver_xmltarget = xmltarget_i386_linux_no_xml;
#endif
- x86_xcr0 = I386_XSTATE_SSE_MASK;
-
return;
}