Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA] Need post-processing of parameters for function calls in Ada
Date: Tue, 08 Jan 2008 15:50:00 -0000	[thread overview]
Message-ID: <20080108154941.GC11650@adacore.com> (raw)
In-Reply-To: <20080108153648.GA21928@caradoc.them.org>

> > My only concern is that the Ada coerce might be relying on the C coerce
> > routine to handle the simple cases. So I might need to call the C coerce
> > routine at the end of the Ada coerce routine. I need to look deeper
> > into this.
> 
> Does the existing routine do anything inappropriate for Ada?  I
> suspect it is appropriate for all languages, and we can call a
> language-specific routine in addition to it.  But if it does anything
> you'd rather it didn't, then we should let Ada avoid it.

I don't think it does. In fact, we are actually still calling it
after we're done with the ada_convert_actuals:

  if (current_language->la_language == language_ada)
    ada_convert_actuals (function, nargs, args, &sp);

  {
    int i;
    for (i = nargs - 1; i >= 0; i--)
      {
        [...]

        args[i] = value_arg_coerce (args[i], param_type, prototyped);

        [...]
      }

I am just wondering whether this is actually useful at all or not.
It depends whether value_arg_coerce covers some cases that the Ada
routine doesn't and yet needs. That's on my end to check. Worst that
would happen is that I would call the C routine from the Ada one.

Should I proceed with my proposal?

-- 
Joel


  reply	other threads:[~2008-01-08 15:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 14:37 Joel Brobecker
2008-01-08 15:02 ` Daniel Jacobowitz
2008-01-08 15:29   ` Joel Brobecker
2008-01-08 15:37     ` Daniel Jacobowitz
2008-01-08 15:50       ` Joel Brobecker [this message]
2008-01-08 15:57         ` Daniel Jacobowitz
2008-01-08 16:14           ` Joel Brobecker
2008-01-08 16:19             ` Daniel Jacobowitz
2008-01-08 18:53               ` [RFA] Fix parameter coercing for Ada function calls (take 2) Joel Brobecker
2008-01-08 18:56                 ` Daniel Jacobowitz
2008-01-08 19:34                   ` 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=20080108154941.GC11650@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@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