diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-03-06 13:20:14 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-03-06 14:25:02 +0000 |
commit | b2970c238e24e6239760b72c924ee7dd2df9ccd1 (patch) | |
tree | 3bbdbb5c235a0ee81f6ef33d002d0ffcdbbea36a | |
parent | fb2946557216c813310ed062a06b55d5dc466bb0 (diff) | |
download | gdb-b2970c238e24e6239760b72c924ee7dd2df9ccd1.zip gdb-b2970c238e24e6239760b72c924ee7dd2df9ccd1.tar.gz gdb-b2970c238e24e6239760b72c924ee7dd2df9ccd1.tar.bz2 |
gdb/riscv: Fix type when reading register from regcache
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.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/riscv-tdep.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 88b1172..ff6eb55 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 where appropriate. diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index 797ca72..3e1ad99 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -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); |