Use core_addr_to_string_nz in csky_analyze_prologue
authorTom Tromey <tom@tromey.com>
Wed, 29 Aug 2018 21:33:23 +0000 (15:33 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 29 Aug 2018 21:33:23 +0000 (15:33 -0600)
One of the buildbot builders had a failure on a recent try run:

../../binutils-gdb/gdb/csky-tdep.c: In function CORE_ADDR csky_analyze_prologue(gdbarch*, CORE_ADDR, CORE_ADDR, CORE_ADDR, frame_info*, csky_unwind_cache*, lr_type_t):
../../binutils-gdb/gdb/csky-tdep.c:1107:23: error: format %lx expects argument of type long unsigned int, but argument 3 has type CORE_ADDR {aka long long unsigned int} [-Werror=format=]
        "0x%lx\n", addr);
                       ^
../../binutils-gdb/gdb/csky-tdep.c:1419:12: error: format %lx expects argument of type long unsigned int, but argument 3 has type CORE_ADDR {aka long long unsigned int} [-Werror=format=]
        addr);
            ^

The fix is to use core_addr_to_string_nz rather than %lx in
csky-tdep.c.

Tested by rebuilding.  I'm checking this in.

gdb/ChangeLog
2018-08-29  Tom Tromey  <tom@tromey.com>

* csky-tdep.c (csky_analyze_prologue): Use
core_addr_to_string_nz.

gdb/ChangeLog
gdb/csky-tdep.c

index 981ee1405e4a5d49b145ba09845e91234dd9b598..d360c7c4b860f1b65dcc183d67ad008ac9da1d84 100644 (file)
@@ -1,3 +1,8 @@
+2018-08-29  Tom Tromey  <tom@tromey.com>
+
+       * csky-tdep.c (csky_analyze_prologue): Use
+       core_addr_to_string_nz.
+
 2018-08-29  Tom Tromey  <tom@tromey.com>
 
        * windows-nat.c (struct xlate_exception) <them>: Change type to
index 972ac59affe139c2e19ad6e880fe52959f64d6e5..95bcead8771b97d32405ddec00f65fa133ae01fa 100644 (file)
@@ -1103,8 +1103,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch,
                                          "csky: found stack adjustment of"
                                          " 0x%x bytes.\n", adjust);
                      fprintf_unfiltered (gdb_stdlog,
-                                         "csky: skipping to new address "
-                                         "0x%lx\n", addr);
+                                         "csky: skipping to new address %s\n",
+                                         core_addr_to_string_nz (addr));
                      fprintf_unfiltered (gdb_stdlog,
                                          "csky: continuing\n");
                    }
@@ -1415,8 +1415,8 @@ csky_analyze_prologue (struct gdbarch *gdbarch,
                                          "found stack adjustment of 0x%x"
                                          " bytes.\n", adjust);
                      fprintf_unfiltered (gdb_stdlog, "csky: "
-                                         "skipping to new address 0x%lx\n",
-                                         addr);
+                                         "skipping to new address %s\n",
+                                         core_addr_to_string_nz (addr));
                      fprintf_unfiltered (gdb_stdlog, "csky: continuing\n");
                    }
                  continue;