summaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-06-15 15:24:52 +0000
committerNick Clifton <nickc@redhat.com>2009-06-15 15:24:52 +0000
commita07fc80f14506f18277d21c1ac4a8c5f876135dc (patch)
treed261ce2981ce804299c462004d6972de91010d2f /opcodes
parent8d2a2802a0ed98e3a8db936cfb03257fc88b98b5 (diff)
downloadgdb-a07fc80f14506f18277d21c1ac4a8c5f876135dc.tar.gz
PR 10173
* cr16-dis.c (print_arg): Avoid printing the 0x prefix twice.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/cr16-dis.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 93d5d0205da..5fd7db07162 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,10 @@
2009-06-15 Nick Clifton <nickc@redhat.com>
+ PR 10173
+ * cr16-dis.c (print_arg): Avoid printing the 0x prefix twice.
+
+2009-06-15 Nick Clifton <nickc@redhat.com>
+
PR 10263
* arm-dis.c (print_insn): Ignore is_data if the user has requested
the disassembly of data as well as instructions.
diff --git a/opcodes/cr16-dis.c b/opcodes/cr16-dis.c
index 2627141d0fa..3a31d926b95 100644
--- a/opcodes/cr16-dis.c
+++ b/opcodes/cr16-dis.c
@@ -1,5 +1,5 @@
/* Disassembler code for CR16.
- Copyright 2007, 2008 Free Software Foundation, Inc.
+ Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by M R Swami Reddy (MR.Swami.Reddy@nsc.com).
This file is part of GAS, GDB and the GNU binutils.
@@ -678,7 +678,9 @@ print_arg (argument *a, bfd_vma memaddr, struct disassemble_info *info)
if ((!IS_INSN_TYPE (CSTBIT_INS)) && (!IS_INSN_TYPE (LD_STOR_INS)))
(sign_flag) ? func (stream, "%s", "*-"): func (stream, "%s","*+");
- func (stream, "%s", "0x");
+ /* PR 10173: Avoid printing the 0x prefix twice. */
+ if (info->num_symbols > 0)
+ func (stream, "%s", "0x");
number = ((relative ? memaddr : 0) +
(sign_flag ? ((- a->constant) & 0xffffffe) : a->constant));