aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2020-06-26 16:42:55 +0200
committerJan Beulich <jbeulich@suse.com>2020-06-26 16:42:55 +0200
commit2a1bb84c67d974b10f2ea76f8ed43244f19ed21e (patch)
tree2325a9a4109ea5199526833165a56fb365ad81dc /opcodes
parentf53b3eeb677aace413d45b4b3c9d23d57d7167fc (diff)
downloadgdb-2a1bb84c67d974b10f2ea76f8ed43244f19ed21e.zip
gdb-2a1bb84c67d974b10f2ea76f8ed43244f19ed21e.tar.gz
gdb-2a1bb84c67d974b10f2ea76f8ed43244f19ed21e.tar.bz2
x86: fix processing of -M disassembler option
Multiple -M options can be specified in any order. Therefore stright assignment to fields affected needs to be avoided, such that earlier options' effects won't be discarded. This was in particular a problem for -Msuffix followed by certain of the other sub-options. While updating documentation, take the liberty and also drop the redundant mentioning of being able to comma-separate multiple options.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/i386-dis.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index f36ee55..dfc94fb 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2020-06-26 Jan Beulich <jbeulich@suse.com>
+
+ * i386-dis.c: (print_insn): Avoid straight assignment to
+ priv.orig_sizeflag when processing -M sub-options.
+
2020-06-25 Jan Beulich <jbeulich@suse.com>
* i386-dis.c: Adjust description of J macro.
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 8964832..f57409d 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -11851,17 +11851,17 @@ print_insn (bfd_vma pc, disassemble_info *info)
else if (CONST_STRNEQ (p, "x86-64"))
{
address_mode = mode_64bit;
- priv.orig_sizeflag = AFLAG | DFLAG;
+ priv.orig_sizeflag |= AFLAG | DFLAG;
}
else if (CONST_STRNEQ (p, "i386"))
{
address_mode = mode_32bit;
- priv.orig_sizeflag = AFLAG | DFLAG;
+ priv.orig_sizeflag |= AFLAG | DFLAG;
}
else if (CONST_STRNEQ (p, "i8086"))
{
address_mode = mode_16bit;
- priv.orig_sizeflag = 0;
+ priv.orig_sizeflag &= ~(AFLAG | DFLAG);
}
else if (CONST_STRNEQ (p, "intel"))
{