diff options
author | Alan Modra <amodra@gmail.com> | 2022-08-04 12:48:05 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-08-06 08:03:16 +0930 |
commit | 29136be7df3418fc09555eeac5dde6b43106e9be (patch) | |
tree | 5ceeb60bbc9ed5226833523f60444c8ed3e6b641 /sim/rl78/load.c | |
parent | 99c902690493e35aad16b2083bad34cf79c366bf (diff) | |
download | gdb-29136be7df3418fc09555eeac5dde6b43106e9be.zip gdb-29136be7df3418fc09555eeac5dde6b43106e9be.tar.gz gdb-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/rl78/load.c')
-rw-r--r-- | sim/rl78/load.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sim/rl78/load.c b/sim/rl78/load.c index 2bf5469..5c99f22 100644 --- a/sim/rl78/load.c +++ b/sim/rl78/load.c @@ -130,15 +130,15 @@ rl78_load (bfd *prog, host_callback *callbacks, const char * const simname) 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 (callbacks) xprintf (callbacks, - "Loading section %s, size %#" BFD_VMA_FMT "x " - "lma %08" BFD_VMA_FMT "x 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 = xmalloc (size); @@ -151,17 +151,17 @@ rl78_load (bfd *prog, host_callback *callbacks, const char * const simname) if (bfd_bread (buf, size, prog) != size) { - fprintf (stderr, "%s: Failed to read %" BFD_VMA_FMT "x bytes\n", - simname, size); + fprintf (stderr, "%s: Failed to read %" PRIx64 " bytes\n", + simname, (uint64_t) size); continue; } if (base > 0xeffff || base + size > 0xeffff) { fprintf (stderr, - "%s, Can't load image to RAM/SFR space: 0x%" BFD_VMA_FMT "x " - "- 0x%" BFD_VMA_FMT "x\n", - simname, base, base+size); + "%s, Can't load image to RAM/SFR space: 0x%" PRIx64 " " + "- 0x%" PRIx64 "\n", + simname, (uint64_t) base, (uint64_t) (base + size)); continue; } if (max_rom < base + size) |