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/cris | |
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/cris')
-rw-r--r-- | sim/cris/sim-if.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index d7c1005..75176d0 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -257,17 +257,18 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write) if (verbose) sim_io_printf (sd, - "Loading segment at 0x%" BFD_VMA_FMT "x, " - "size 0x%" BFD_VMA_FMT "x\n", - lma, phdr[i].p_filesz); + "Loading segment at 0x%" PRIx64 ", " + "size 0x%" PRIx64 "\n", + (uint64_t) lma, (uint64_t) phdr[i].p_filesz); if (bfd_seek (abfd, phdr[i].p_offset, SEEK_SET) != 0 || (bfd_bread (buf, phdr[i].p_filesz, abfd) != phdr[i].p_filesz)) { sim_io_eprintf (sd, - "%s: could not read segment at 0x%" BFD_VMA_FMT "x, " - "size 0x%" BFD_VMA_FMT "x\n", - STATE_MY_NAME (sd), lma, phdr[i].p_filesz); + "%s: could not read segment at 0x%" PRIx64 ", " + "size 0x%" PRIx64 "\n", + STATE_MY_NAME (sd), (uint64_t) lma, + (uint64_t) phdr[i].p_filesz); free (buf); return FALSE; } @@ -275,9 +276,10 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write) if (do_write (sd, lma, buf, phdr[i].p_filesz) != phdr[i].p_filesz) { sim_io_eprintf (sd, - "%s: could not load segment at 0x%" BFD_VMA_FMT "x, " - "size 0x%" BFD_VMA_FMT "x\n", - STATE_MY_NAME (sd), lma, phdr[i].p_filesz); + "%s: could not load segment at 0x%" PRIx64 ", " + "size 0x%" PRIx64 "\n", + STATE_MY_NAME (sd), (uint64_t) lma, + (uint64_t) phdr[i].p_filesz); free (buf); return FALSE; } @@ -573,9 +575,8 @@ cris_handle_interpreter (SIM_DESC sd, struct bfd *abfd) memory area, so we go via a temporary area. Luckily, the interpreter is supposed to be small, less than 0x40000 bytes. */ - sim_do_commandf (sd, "memory region 0x%" BFD_VMA_FMT "x," - "0x%" BFD_VMA_FMT "x", - interp_load_addr, interpsiz); + sim_do_commandf (sd, "memory region 0x%" PRIx64 ",0x%" PRIx64, + (uint64_t) interp_load_addr, (uint64_t) interpsiz); /* Now that memory for the interpreter is defined, load it. */ if (!cris_load_elf_file (sd, ibfd, cris_write_interp)) |