(riscv/ada) fix error when calling functions with range argument
authorKONRAD Frederic <konrad@adacore.com>
Thu, 14 Feb 2019 03:37:11 +0000 (22:37 -0500)
committerJoel Brobecker <brobecker@adacore.com>
Thu, 14 Feb 2019 03:37:11 +0000 (22:37 -0500)
commit2988d01ea5fcc474a9b714d2148bab5fcf4e4be8
tree9f5feec6feca27ebefdeca266b9e00e0c7c74e08
parentc559d7096b4b1b9c4e8d78cfd67b1892c1836ffb
(riscv/ada) fix error when calling functions with range argument

Using the gdb.ada/call_pn.exp testcase, and running it by hand on
riscv64-elf, we get the following error:

    (gdb) call pn(55)
    Could not compute alignment of type

The problem occurs because the parameter's type is a TYPE_CODE_RANGE,
and that type code is not handled by riscv_type_alignment. So this patch
fixes the issue by handling TYPE_CODE_RANGE the same way we handle other
integral types.

gdb/ChangeLog:

        * riscv-rdep.c (riscv_type_alignment): Handle TYPE_CODE_RANGE.

Tested on riscv64-elf using AdaCore's testsuite.
gdb/ChangeLog
gdb/riscv-tdep.c
This page took 0.024783 seconds and 4 git commands to generate.