public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [Ada] error trying to call function when parameter is aligner type.
@ 2015-05-08 17:24 sergiodj+buildbot
  2015-05-08 17:24 ` Failures on Fedora-ppc64be-m64, branch master sergiodj+buildbot
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: sergiodj+buildbot @ 2015-05-08 17:24 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 8344af1e7bffd13add24bd02bc462d9389294fd2 ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: master
Commit: 8344af1e7bffd13add24bd02bc462d9389294fd2

[Ada] error trying to call function when parameter is aligner type.
We observed on x86-windows that trying to call a function from
GDB leads to a mysterious "Invalid cast" error. This can be
observed in gdb.ada/float_param.exp:

   (gdb) call set_long_double(1, global_small_struct, 4.0)
   Invalid cast.

This happens because the 3rd parameter, a Long_Long_Float, is
actually passed wrapped inside a PAD structure. As documented
in GNAT's exp_dbug.ads, PAD types are simple wrappers that GNAT
uses to handle types with size or alignment constraints.

We already support those when printing an object encapsulated
in a PAD type, but not when trying to pass an argument that
is wrapped inside a PAD type.  As a result, what happens is that
call_function_by_hand ends up with an argument with a type
that looks incompatible with the expected type of the argument.
The error comes when trying to push the arguments in inferior
memory, while trying to coerce each one of them to their expected
types (in value_arg_coerce).

Note that the problem is not specific to Windows, but so far, this is
the only platform where we've seen this happen.

gdb/ChangeLog:

	* ada-lang.c (ada_convert_actual): Add handling of formals
	passed inside an aligner type.

Tested on x86-windows (AdaCore testsuite) and x86_64-linux (official
testsuite as well as AdaCore's testsuite).


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-05-09  5:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-08 17:24 [binutils-gdb] [Ada] error trying to call function when parameter is aligner type sergiodj+buildbot
2015-05-08 17:24 ` Failures on Fedora-ppc64be-m64, branch master sergiodj+buildbot
2015-05-08 17:34 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot
2015-05-08 17:54 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-05-08 18:44 ` Failures on Debian-i686-native-gdbserver, " sergiodj+buildbot
2015-05-08 19:13 ` Failures on Debian-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-05-09  4:25 ` Failures on Fedora-ppc64le-native-extended-gdbserver-m64, " sergiodj+buildbot
2015-05-09  4:56 ` Failures on Fedora-ppc64le-cc-with-index, " sergiodj+buildbot
2015-05-09  5:37 ` Failures on Fedora-ppc64le-native-gdbserver-m64, " sergiodj+buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).