summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-04-12 13:09:10 +0000
committerNick Clifton <nickc@redhat.com>2006-04-12 13:09:10 +0000
commit68f308a5b2e245274f0c8ab61fc7823fa731e584 (patch)
treed0dd7b9e5199e8fbb05ed6653b15a6577690bf2e
parentbe2ff3909fbda51d79e7a14322e16f7a1494d3ef (diff)
downloadgdb-68f308a5b2e245274f0c8ab61fc7823fa731e584.tar.gz
PR binutils/2454
* avr-dis.c (avr_operand): Arrange for a comment to appear before the symolic form of an address, so that the output of objdump -d can be reassembled.
-rw-r--r--opcodes/ChangeLog7
-rw-r--r--opcodes/avr-dis.c7
2 files changed, 13 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 030118a5747..0f098705acf 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,10 @@
+2006-04-12 Hochstein <hochstein@algo.informatik.tu-darmstadt.de>
+
+ PR binutils/2454
+ * avr-dis.c (avr_operand): Arrange for a comment to appear before
+ the symolic form of an address, so that the output of objdump -d
+ can be reassembled.
+
2006-04-10 DJ Delorie <dj@redhat.com>
* m32c-asm.c: Regenerate.
diff --git a/opcodes/avr-dis.c b/opcodes/avr-dis.c
index 15300844183..7938dcadbaf 100644
--- a/opcodes/avr-dis.c
+++ b/opcodes/avr-dis.c
@@ -139,7 +139,12 @@ avr_operand (unsigned int insn, unsigned int insn2, unsigned int pc, int constra
case 'h':
*sym = 1;
*sym_addr = ((((insn & 1) | ((insn & 0x1f0) >> 3)) << 16) | insn2) * 2;
- sprintf (buf, "0x");
+ /* See PR binutils/2545. Ideally we would like to display the hex
+ value of the address only once, but this would mean recoding
+ objdump_print_address() which would affect many targets. */
+ sprintf (buf, "%#lx", * sym_addr);
+ sprintf (comment, "0x");
+
break;
case 'L':