This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] PR gdb/16305: Mask out PREFIX_ADDR when adding prefix to opcode
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GDB <gdb-patches at sourceware dot org>
- Date: Sun, 8 Dec 2013 12:14:30 -0800
- Subject: [PATCH] PR gdb/16305: Mask out PREFIX_ADDR when adding prefix to opcode
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
PREFIX_ADDR isn't a prefix to opcode. This patch masks out PREFIX_ADDR
when adding prefix to opcode. Tested on Linux/x86-64. OK to install?
Thanks.
H.J.
---
2013-12-08 H.J. Lu <hongjiu.lu@intel.com>
PR gdb/16305
* i386-tdep.c (i386_process_record): Mask out PREFIX_ADDR when
adding prefix to opcode.
---
gdb/i386-tdep.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 371d5f0..6635a25 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -7031,7 +7031,8 @@ no_support_3dnow_data:
case 0x0ffc:
case 0x0ffd:
case 0x0ffe:
- switch (prefixes)
+ /* Mask out PREFIX_ADDR. */
+ switch ((prefixes & ~PREFIX_ADDR))
{
case PREFIX_REPNZ:
opcode |= 0xf20000;
--
1.8.3.1