From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17374 invoked by alias); 26 Apr 2012 19:29:30 -0000 Received: (qmail 17365 invoked by uid 22791); 26 Apr 2012 19:29:30 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,TW_BP,TW_EG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Apr 2012 19:29:17 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3QJTEGX023041 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 26 Apr 2012 15:29:14 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3QJTC7G006374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 26 Apr 2012 15:29:13 -0400 From: Tom Tromey To: "Maciej W. Rozycki" Cc: Subject: Re: [RFA] MIPS16 FP manual call/return fixes References: Date: Thu, 26 Apr 2012 19:33:00 -0000 In-Reply-To: (Maciej W. Rozycki's message of "Mon, 23 Apr 2012 14:20:21 +0100") Message-ID: <87mx5y70mv.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2012-04/txt/msg00960.txt.bz2 >>>>> "Maciej" == Maciej W Rozycki writes: Maciej> Therefore I had to change the return handlers' internal API to Maciej> take the value of the function being handled rather than its Maciej> lone type, if available. This has led to adjusting the whole Maciej> infrastructure. It seems reasonable to me. I didn't try to read the MIPS part of the patch. Maybe Jan could read the ifunc change in elfread.c. Maciej> # stored into the appropriate register. This can be used when we want Maciej> # to force the value returned by a function (see the "return" command Maciej> # for instance). Maciej> -M:enum return_value_convention:return_value:struct type *functype, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf:functype, valtype, regcache, readbuf, writebuf Maciej> +M:enum return_value_convention:return_value:struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf:functype, valtype, regcache, readbuf, writebuf A couple of nits here: Update the introductory comment to refer to FUNCTION, not FUNCTYPE. Also, please s/functype/function/ in the list of argument names (at the end of the line). Maciej> + CORE_ADDR faddr = BLOCK_START (SYMBOL_BLOCK_VALUE (a->function)); Maciej> + struct value *func = allocate_value (SYMBOL_TYPE (a->function)); I think read_var_value would be better here. Maciej> + if (thisfun != NULL) Maciej> + { Maciej> + function = allocate_value (SYMBOL_TYPE (thisfun)); Maciej> + set_value_address (function, Maciej> + BLOCK_START (SYMBOL_BLOCK_VALUE (thisfun))); Here too. Maciej> + func_value = allocate_value (SYMBOL_TYPE (function)); Maciej> + func_addr = BLOCK_START (SYMBOL_BLOCK_VALUE (function)); Maciej> + set_value_address (func_value, func_addr); Maciej> + self_bpfinish->function_value = Maciej> + value_to_value_object (func_value); Here too. The rest looked good to me. Tom