Hi Ilya,

On Wed, 2023-02-08 at 20:52 +0100, Ilya Leoshkevich wrote:
> On the low level, they are the same as pointers.

Yes, I can see how that would work for return types.
Do you happen to have a testcase for this?

Right below this code is a check whether the type has a
DW_AT_byte_size, and if not we'll assume 8 as (address) size if the
type is either DW_TAG_pointer_type or DW_TAG_ptr_to_member_type.
Should the same be done for DW_TAG_reference_type and
DW_TAG_rvalue_reference_type?

This doesn't seem x86_64 specific, other backends have similar code, I
assume they all need a similar update?

Thanks,

Mark

> Signed-off-by: Ilya Leoshkevich <i...@linux.ibm.com>
> ---
>  backends/x86_64_retval.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/backends/x86_64_retval.c b/backends/x86_64_retval.c
> index f9114cb1..e668eacc 100644
> --- a/backends/x86_64_retval.c
> +++ b/backends/x86_64_retval.c
> @@ -106,6 +106,8 @@ x86_64_return_value_location (Dwarf_Die *functypedie, 
> const Dwarf_Op **locp)
>      case DW_TAG_enumeration_type:
>      case DW_TAG_pointer_type:
>      case DW_TAG_ptr_to_member_type:
> +    case DW_TAG_reference_type:
> +    case DW_TAG_rvalue_reference_type:
>        {
>       Dwarf_Attribute attr_mem;
>       if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,

Reply via email to