This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Unexpected DW_AT_type for Ada strings on s390x?
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Eric Botcazou <botcazou at adacore dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb at sourceware dot org
- Date: Wed, 05 Dec 2012 10:22:42 +0100
- Subject: Re: Unexpected DW_AT_type for Ada strings on s390x?
- References: <87fw3mhxbb.fsf@linux.vnet.ibm.com> <20121204121036.GK18566@adacore.com>
Joel Brobecker <brobecker@adacore.com> writes:
> [Cc'ing Eric, as he is the compiler expert - GDB just represents what
> the compiler tells us]
Sure. Should we also CC the gcc mailing list?
> My first guess is that the variantion in type definition is caused
> by differences in ABI. I don't know s390 platforms, so I can't
> confirm offhand. But it seems like a plausible way to pass the
> argument.
Right, the two-element structure is passed by reference on s390x. But
that also applies to the same structure in C/C++. Nevertheless, with C
the argument's DW_AT_type reflects the real type and gcc adjusts the
DW_AT_location instead.
> If Eric confirms my guess, the attached patch should fix the problem.
Thanks. Eric, do you confirm that it's intentional to adjust the
DW_AT_type based on ABI?
Joel, in the meantime I suggest to commit the second line of your patch.
It's independent of the outcome, and we might otherwise lose track of
it.