aboutsummaryrefslogtreecommitdiff
path: root/sim/common
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/common
parent99c902690493e35aad16b2083bad34cf79c366bf (diff)
downloadfsf-binutils-gdb-29136be7df3418fc09555eeac5dde6b43106e9be.zip
fsf-binutils-gdb-29136be7df3418fc09555eeac5dde6b43106e9be.tar.gz
fsf-binutils-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/common')
-rw-r--r--sim/common/cgen-trace.c4
-rw-r--r--sim/common/sim-load.c13
2 files changed, 8 insertions, 9 deletions
diff --git a/sim/common/cgen-trace.c b/sim/common/cgen-trace.c
index 3df30c5..e79e93c 100644
--- a/sim/common/cgen-trace.c
+++ b/sim/common/cgen-trace.c
@@ -366,8 +366,8 @@ sim_disasm_perror_memory (int status, bfd_vma memaddr,
/* Actually, address between memaddr and memaddr + len was
out of bounds. */
info->fprintf_func (info->stream,
- "Address 0x%" BFD_VMA_FMT "x is out of bounds.",
- memaddr);
+ "Address 0x%" PRIx64 " is out of bounds.",
+ (uint64_t) memaddr);
}
/* Disassemble using the CGEN opcode table.
diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c
index 020165a..80fa2ea 100644
--- a/sim/common/sim-load.c
+++ b/sim/common/sim-load.c
@@ -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);
}