From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 621 invoked by alias); 8 Jan 2008 15:50:09 -0000 Received: (qmail 611 invoked by uid 22791); 8 Jan 2008 15:50:08 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 Jan 2008 15:49:51 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id A28B82A96A0 for ; Tue, 8 Jan 2008 10:49:49 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uIHmbEE8lU7o for ; Tue, 8 Jan 2008 10:49:49 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C848D2A968F for ; Tue, 8 Jan 2008 10:49:48 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 88DAEE7ACB; Tue, 8 Jan 2008 07:49:41 -0800 (PST) Date: Tue, 08 Jan 2008 15:50:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: [RFA] Need post-processing of parameters for function calls in Ada Message-ID: <20080108154941.GC11650@adacore.com> References: <20080108143622.GG24614@adacore.com> <20080108150114.GA19378@caradoc.them.org> <20080108152900.GB11650@adacore.com> <20080108153648.GA21928@caradoc.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080108153648.GA21928@caradoc.them.org> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00136.txt.bz2 > > 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