[binutils-gdb] gdb/riscv: Fix assertion in inferior call code
sergiodj+buildbot@sergiodj.net
sergiodj+buildbot@sergiodj.net
Tue Jul 10 12:43:00 GMT 2018
*** TEST RESULTS FOR COMMIT 8c49aa89abb92516dfc3507b540f736ca6339c0c ***
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Branch: master
Commit: 8c49aa89abb92516dfc3507b540f736ca6339c0c
gdb/riscv: Fix assertion in inferior call code
An assertion when setting up arguments for an inferior call checks the
size of the argument against xlen. However, if xlen and flen are
different sizes, and the argument is being placed into a floating
pointer register then we should be comparing against flen not xlen.
This issue shows up as an assertion failure when running on an rv32g
target with a binary compiled using the rv32f abi and making an
inferior call involving large floating point arguments, for example
the test gdb.base/infcall-nested-structs.exp.
gdb/ChangeLog:
* riscv-tdep.c (riscv_is_fp_regno_p): New function.
(riscv_register_reggroup_p): Use new function, remove unneeded
parenthesis.
(riscv_push_dummy_call): Extend assert to compare against xlen or
flen based on register type.
More information about the Gdb-testers
mailing list