From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb@sourceware.org
Subject: Unexpected DW_AT_type for Ada strings on s390x?
Date: Tue, 04 Dec 2012 11:27:00 -0000 [thread overview]
Message-ID: <87fw3mhxbb.fsf@linux.vnet.ibm.com> (raw)
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
like this:
msg=@0x3ffffffdc48: {...}
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:
--- a/gdb/testsuite/gdb.ada/lang_switch.exp
+++ b/gdb/testsuite/gdb.ada/lang_switch.exp
@@ -43,5 +43,5 @@ gdb_test "bt" \
gdb_test "set lang c"
gdb_test "bt" \
".*#1.*lang_switch\\.ada_procedure\\s*\\(msg={.*\\).*" \
- "backtrace"
+ "backtrace (C)"
next reply other threads:[~2012-12-04 11:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 11:27 Andreas Arnez [this message]
2012-12-04 12:11 ` Joel Brobecker
2012-12-05 9:22 ` Andreas Arnez
2012-12-05 9:33 ` Eric Botcazou
2012-12-06 4:52 ` Joel Brobecker
2012-12-06 13:40 ` Andreas Arnez
2012-12-07 3:03 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fw3mhxbb.fsf@linux.vnet.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox