This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 8/9] Restrict i387_convert_register_p
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 13 Apr 2017 08:26:12 +0100
- Subject: [PATCH 8/9] Restrict i387_convert_register_p
- Authentication-results: sourceware.org; auth=none
- References: <1492068373-4916-1-git-send-email-yao.qi@linaro.org>
gdb:
2017-04-12 Yao Qi <yao.qi@linaro.org>
* i387-tdep.c (i387_convert_register_p): Return false if type code
is TYPE_CODE_FLT.
---
gdb/i387-tdep.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 9206109..925f4e5 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -341,8 +341,9 @@ i387_convert_register_p (struct gdbarch *gdbarch, int regnum,
if (i386_fp_regnum_p (gdbarch, regnum))
{
/* Floating point registers must be converted unless we are
- accessing them in their hardware type. */
- if (type == i387_ext_type (gdbarch))
+ accessing them in their hardware type or TYPE is not float. */
+ if (type == i387_ext_type (gdbarch)
+ || TYPE_CODE (type) != TYPE_CODE_FLT)
return 0;
else
return 1;
--
1.9.1