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.
This commit is contained in:
Andrew Burgess 2018-03-06 13:20:14 +00:00
parent fb29465572
commit b2970c238e
2 changed files with 6 additions and 1 deletions

View 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

View 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);