gas/arc: Use BFD_VMA_FMT for printf format specifier
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 4 May 2016 13:11:11 +0000 (14:11 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 18 May 2016 21:24:25 +0000 (22:24 +0100)
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.

gas/ChangeLog
gas/config/tc-arc.c

index ac921abf22f91e448558765bb661fae652f2e49f..d1d23fe23d20db2ae4db67dbaeb85b4957423c3d 100644 (file)
@@ -1,3 +1,9 @@
+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
index 2f43be5ce39105e42721f2da7b4127376dd9bc10..5a5e8531f7ec48f7e4029cacba8fee2f289244d5 100644 (file)
@@ -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);
 
This page took 0.028231 seconds and 4 git commands to generate.