aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-dis.c
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/i386-dis.c
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/i386-dis.c')
-rw-r--r--opcodes/i386-dis.c6
1 files changed, 3 insertions, 3 deletions
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"))
{