aboutsummaryrefslogtreecommitdiff
path: root/sim/rx
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-08-04 12:48:05 +0930
committerAlan Modra <amodra@gmail.com>2022-08-06 08:03:16 +0930
commit29136be7df3418fc09555eeac5dde6b43106e9be (patch)
tree5ceeb60bbc9ed5226833523f60444c8ed3e6b641 /sim/rx
parent99c902690493e35aad16b2083bad34cf79c366bf (diff)
downloadbinutils-29136be7df3418fc09555eeac5dde6b43106e9be.zip
binutils-29136be7df3418fc09555eeac5dde6b43106e9be.tar.gz
binutils-29136be7df3418fc09555eeac5dde6b43106e9be.tar.bz2
Don't use BFD_VMA_FMT in gdb and sim
Like commit b82817674f, this replaces BFD_VMA_FMT "x" in sim/ with PRIx64 and casts to promote bfd_vma to uint64_t. The one file using BFD_VMA_FMT in gdb/ instead now uses hex_string, and a typo in the warning message is fixed.
Diffstat (limited to 'sim/rx')
-rw-r--r--sim/rx/load.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sim/rx/load.c b/sim/rx/load.c
index 500babc..a0dca3d 100644
--- a/sim/rx/load.c
+++ b/sim/rx/load.c
@@ -130,14 +130,15 @@ rx_load (bfd *prog, host_callback *callback)
base = p->p_paddr;
if (verbose > 1)
fprintf (stderr,
- "[load segment: lma=%08" BFD_VMA_FMT "x vma=%08x "
- "size=%08" BFD_VMA_FMT "x]\n",
- base, (int) p->p_vaddr, size);
+ "[load segment: lma=%08" PRIx64 " vma=%08" PRIx64 " "
+ "size=%08" PRIx64 "]\n",
+ (uint64_t) base, (uint64_t) p->p_vaddr, (uint64_t) size);
if (callback)
xprintf (callback,
- "Loading section %s, size %#lx lma %08lx vma %08lx\n",
+ "Loading section %s, size %#" PRIx64 " lma %08" PRIx64
+ " vma %08" PRIx64 "\n",
find_section_name_by_offset (prog, p->p_offset),
- size, base, p->p_vaddr);
+ (uint64_t) size, (uint64_t) base, (uint64_t) p->p_vaddr);
buf = malloc (size);
if (buf == NULL)
@@ -154,7 +155,8 @@ rx_load (bfd *prog, host_callback *callback)
}
if (bfd_bread (buf, size, prog) != size)
{
- fprintf (stderr, "Failed to read %" BFD_VMA_FMT "x bytes\n", size);
+ fprintf (stderr, "Failed to read %" PRIx64 " bytes\n",
+ (uint64_t) size);
continue;
}