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.
This commit is contained in:
Alan Modra
2022-08-04 12:48:05 +09:30
parent 99c9026904
commit 29136be7df
10 changed files with 58 additions and 54 deletions

View File

@ -121,11 +121,10 @@ sim_load_file (SIM_DESC sd, const char *myname, host_callback *callback,
if (verbose_p)
{
xprintf (callback,
"Loading section %s, size 0x%lx %s "
"%" BFD_VMA_FMT "x\n",
bfd_section_name (s),
(unsigned long) size,
(lma_p ? "lma" : "vma"), lma);
"Loading section %s, size 0x%" PRIx64
" %s %" PRIx64 "\n",
bfd_section_name (s), (uint64_t) size,
lma_p ? "lma" : "vma", (uint64_t) lma);
}
data_count += size;
bfd_get_section_contents (result_bfd, s, buffer, 0, size);
@ -147,8 +146,8 @@ sim_load_file (SIM_DESC sd, const char *myname, host_callback *callback,
if (verbose_p)
{
end_time = time (NULL);
xprintf (callback, "Start address %" BFD_VMA_FMT "x\n",
bfd_get_start_address (result_bfd));
xprintf (callback, "Start address %" PRIx64 "\n",
(uint64_t) bfd_get_start_address (result_bfd));
report_transfer_performance (callback, data_count, start_time, end_time);
}