gdb/riscv: Fixes to printf format strings
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 6 Mar 2018 12:31:07 +0000 (12:31 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 6 Mar 2018 12:44:32 +0000 (12:44 +0000)
commitcab5bb9d1f9fcf674d5b4c82aba7622597b1fd35
treeb300bb6c02d4479ce2dc411740d265b4c5dd2a10
parentdbbb1059e62e9fed10b429c030f76f782cbc1fc4
gdb/riscv: Fixes to printf format strings

Some of the format strings used in the new riscv target were incorrect,
resulting in build failures on some hosts.  This commit does the
following:

  1. Uses core_addr_to_string for formatting CORE_ADDR types.
  2. Fixes legacy use of stderr for logging in one place that got
     missed, instead gdb_stdlog is used.
  3. Re-indent a few printf related lines that were wrong.

This should resolve some (but not all) of the build failures the new
riscv target introduced.

gdb/ChangeLog:

* riscv-tdep.c (riscv_print_arg_location): Add header comment,
change parameter type.  Use GDB's print functions, and use
core_addr_to_string where appropriate.
(riscv_push_dummy_call): Use core_addr_to_string where
appropriate, update call to riscv_print_arg_location, and reindent
a few lines.
(riscv_return_value): Update call to riscv_print_arg_location.
gdb/ChangeLog
gdb/riscv-tdep.c