gdb/riscv: Fix type when reading register from regcache
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 6 Mar 2018 13:20:14 +0000 (13:20 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 6 Mar 2018 14:25:02 +0000 (14:25 +0000)
Should use a ULONGEST when reading from the regcache.

gdb/ChangeLog:

* riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
reading values from registers.

gdb/ChangeLog
gdb/riscv-tdep.c

index 88b1172121f641261eedf1e46a5daa0d9b0a824d..ff6eb559e6c3d988f26d9bdc11747735711305c3 100644 (file)
@@ -1,3 +1,8 @@
+2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
+       reading values from registers.
+
 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
index 797ca72a8428c6f003984d4fe55c1d7a729b5371..3e1ad99c673df28bab02dacb6332f6d3b6d9bf34 100644 (file)
@@ -2318,7 +2318,7 @@ riscv_return_value (struct gdbarch  *gdbarch,
            /* Return value by reference will have its address in A0.  */
          case riscv_arg_info::location::by_ref:
            {
-             CORE_ADDR addr;
+             ULONGEST addr;
 
              regcache_cooked_read_unsigned (regcache, RISCV_A0_REGNUM,
                                             &addr);