This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] gas/arc: Use BFD_VMA_FMT for printf format specifier
- From: Andrew Burgess <aburgess at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 18 May 2016 21:36:59 -0000
- Subject: [binutils-gdb] gas/arc: Use BFD_VMA_FMT for printf format specifier
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9e32d9ae97bf54078f993955a7de2f5a9247c497
commit 9e32d9ae97bf54078f993955a7de2f5a9247c497
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date: Wed May 4 14:11:11 2016 +0100
gas/arc: Use BFD_VMA_FMT for printf format specifier
Some debug code has the wrong printf format specifier for some types
that are (ultimately) bfd_vma. Fixed by using BFD_VMA_FMT string. This
only becomes an issue when building the tc-arc.c file with -DDEBUG=1 to
build in the debug code.
gas/ChangeLog:
* config/tc-arc.c (md_pcrel_from_section): Use BFD_VMA_FMT where
appropriate.
(md_convert_frag): Likewise.
Diff:
---
gas/ChangeLog | 6 ++++++
gas/config/tc-arc.c | 6 ++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ac921ab..d1d23fe 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,11 @@
2016-05-18 Andrew Burgess <andrew.burgess@embecosm.com>
+ * config/tc-arc.c (md_pcrel_from_section): Use BFD_VMA_FMT where
+ appropriate.
+ (md_convert_frag): Likewise.
+
+2016-05-18 Andrew Burgess <andrew.burgess@embecosm.com>
+
* config/tc-arc.c (arc_opcode_hash_entry_iterator_next): Set
cached opcode to NULL when we reach a non-matching opcode.
* testsuite/gas/arc/asm-errors-2.d: New file.
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 2f43be5..5a5e853 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -2505,7 +2505,8 @@ md_pcrel_from_section (fixS *fixP,
}
}
- pr_debug ("pcrel from %x + %lx = %x, symbol: %s (%x)\n",
+ pr_debug ("pcrel from %"BFD_VMA_FMT"x + %lx = %"BFD_VMA_FMT"x, "
+ "symbol: %s (%"BFD_VMA_FMT"x)\n",
fixP->fx_frag->fr_address, fixP->fx_where, base,
fixP->fx_addsy ? S_GET_NAME (fixP->fx_addsy) : "(null)",
fixP->fx_addsy ? S_GET_VALUE (fixP->fx_addsy) : 0);
@@ -3021,7 +3022,8 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
dest = fragP->fr_literal + fix;
table_entry = TC_GENERIC_RELAX_TABLE + fragP->fr_subtype;
- pr_debug ("%s:%d: md_convert_frag, subtype: %d, fix: %d, var: %d\n",
+ pr_debug ("%s:%d: md_convert_frag, subtype: %d, fix: %d, "
+ "var: %"BFD_VMA_FMT"d\n",
fragP->fr_file, fragP->fr_line,
fragP->fr_subtype, fix, fragP->fr_var);