From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5612 invoked by alias); 25 Oct 2004 23:18:33 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5589 invoked from network); 25 Oct 2004 23:18:31 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 25 Oct 2004 23:18:31 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9PNIQ7c020778 for ; Mon, 25 Oct 2004 19:18:31 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9PNIKr10943; Mon, 25 Oct 2004 19:18:20 -0400 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id AAC591294B5; Mon, 25 Oct 2004 19:17:08 -0400 (EDT) Message-ID: <417D8973.50502@gnu.org> Date: Mon, 25 Oct 2004 23:18:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Corinna Vinschen Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Change gdbarch_return_value to take function type instead of return value type References: <20041012124916.GZ6702@cygbert.vinschen.de> <200410122215.i9CMFcfN003173@elgar.sibelius.xs4all.nl> <20041013093144.GE18268@cygbert.vinschen.de> <20041013101547.GF18268@cygbert.vinschen.de> <20041019132957.GE14414@cygbert.vinschen.de> In-Reply-To: <20041019132957.GE14414@cygbert.vinschen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg00423.txt.bz2 Corinna Vinschen wrote: > On Oct 13 12:15, Corinna Vinschen wrote: > >>No, I won't. I found that my patch missed the calls of using_struct_return >>in eval.c. These calls only happen in case of a OP_OBJC_MSGCALL operation. >> >>At line 841 in eval.c, in function evaluate_subexp_standard() I found this: >> >> /* If we found a method with symbol information, check to see >> if it returns a struct. Otherwise assume it doesn't. */ >> >> if (method) >> { >> [...] >> struct_return = using_struct_return (value_type, using_gcc); >> } >> else if (expect_type != NULL) >> { >> struct_return = using_struct_return (check_typedef (expect_type), using_gcc); >> } >> >>While the `if (method)' branch is simple, the `else if' branch can't be >>solved easily. evaluate_subexp_standard just gets the expected return type >>as parameter. >> >>Does anybody know how to get around this problem? For now I can only see >>one way, redefine gdbarch_return_value to get both, function type and return >>value type. > > > Ok, since I didn't get a reply to this for a week, I take it that nobody > has a better idea. I've changed the patch according to my above suggestion. I believe JimB discussed this with you off list, I might as well summarize. For the above, just locally construct a function-type from the value_type / expect_type and then pass that in (ref make_function_type). That both avoids the need for the extra parameter, and keeps things simple and consistent. Andrew