This is the mail archive of the
mailing list for the GDB project.
Unexpected DW_AT_type for Ada strings on s390x?
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb at sourceware dot org
- Date: Tue, 04 Dec 2012 12:27:20 +0100
- Subject: Unexpected DW_AT_type for Ada strings on s390x?
Upstream gnat seems to create different debug data for string parameters
on s390x than on x86, x86_64 or s390. On s390x the DW_AT_type of a
string parameter is a constant /reference/ to the two-element structure
"string___XUP". On the other platforms it is the constant structure,
not a reference.
Due to this indirection the second "bt" in "lang_switch.exp" generates
unexpected output; gdb now shows the "msg" parameter with an address
The test case fails on s390x because of that.
Is the DW_AT_type output intentional? Why does it depend on the
architecture? Note that for C or C++, gcc correctly declares structure
parameters as /structures/ (not references) in their DW_AT_type.
If the output is intentional, I suggest to relax the pattern in the test
case accordingly. In any case it would be nice to differentiate the two
"backtrace" test points, e.g. like this:
@@ -43,5 +43,5 @@ gdb_test "bt" \
gdb_test "set lang c"
gdb_test "bt" \
+ "backtrace (C)"