diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-05-03 23:27:16 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-04 08:13:45 -0400 |
commit | 5ee0bc23a68fe2a6a7717b31fda1db878b2c9764 (patch) | |
tree | 89d9ac8cad39ef7afdf6dfa1d93a5f06b87a440f /sim/m32c | |
parent | 225bda24db9671e2087fda892f94141625836a40 (diff) | |
download | gdb-5ee0bc23a68fe2a6a7717b31fda1db878b2c9764.zip gdb-5ee0bc23a68fe2a6a7717b31fda1db878b2c9764.tar.gz gdb-5ee0bc23a68fe2a6a7717b31fda1db878b2c9764.tar.bz2 |
sim: clean up bfd_vma printing
A lot of this code predates the bfd_vma format define, so we have a
random mix of casts to known types so we can printf the value. Use
the BFD_VMA_FMT that now exists to simplify and reliability output
across different build configs.
Diffstat (limited to 'sim/m32c')
-rw-r--r-- | sim/m32c/ChangeLog | 4 | ||||
-rw-r--r-- | sim/m32c/load.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog index e3393c9..df06256 100644 --- a/sim/m32c/ChangeLog +++ b/sim/m32c/ChangeLog @@ -1,3 +1,7 @@ +2021-05-04 Mike Frysinger <vapier@gentoo.org> + + * load.c (m32c_load): Use BFD_VMA_FMT and drop casts. + 2021-05-02 Mike Frysinger <vapier@gentoo.org> * m32c.opc: Include ansidecl.h. diff --git a/sim/m32c/load.c b/sim/m32c/load.c index 156a275..86e774e 100644 --- a/sim/m32c/load.c +++ b/sim/m32c/load.c @@ -97,8 +97,8 @@ m32c_load (bfd * prog) base = bfd_section_lma (s); if (verbose) - fprintf (stderr, "[load a=%08x s=%08x %s]\n", - (int) base, (int) size, bfd_section_name (s)); + fprintf (stderr, "[load a=%08" BFD_VMA_FMT "x s=%08x %s]\n", + base, (int) size, bfd_section_name (s)); buf = (char *) malloc (size); bfd_get_section_contents (prog, s, buf, 0, size); mem_put_blk (base, buf, size); |