From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127036 invoked by alias); 29 May 2018 21:37:43 -0000 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 Received: (qmail 127026 invoked by uid 89); 29 May 2018 21:37:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=withdraw, morning, HContent-Transfer-Encoding:8bit X-HELO: userp2130.oracle.com Received: from userp2130.oracle.com (HELO userp2130.oracle.com) (156.151.31.86) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 May 2018 21:37:41 +0000 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4TLZxt9095976; Tue, 29 May 2018 21:37:28 GMT Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2j9ev880bg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 May 2018 21:37:28 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4TLbRmm005648 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 May 2018 21:37:27 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4TLbRRW020206; Tue, 29 May 2018 21:37:27 GMT Received: from [10.132.96.98] (/10.132.96.98) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 29 May 2018 14:37:27 -0700 Subject: Re: [PATCH PR gdb/22736] [aarch64] gdb crashes on a conditional breakpoint with cast return type To: Simon Marchi , Simon Marchi Cc: gdb-patches@sourceware.org References: <1527290419-17631-1-git-send-email-weimin.pan@oracle.com> <428ed785-ae74-1656-5a81-f2701b811a6f@oracle.com> <831b976d-cd21-bdf7-c0d3-b158c54d2c1b@ericsson.com> From: Weimin Pan Message-ID: <7696cbf0-2513-4594-bf38-96cf544cef48@oracle.com> Date: Wed, 30 May 2018 00:29:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <831b976d-cd21-bdf7-c0d3-b158c54d2c1b@ericsson.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8908 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1805290229 X-SW-Source: 2018-05/txt/msg00781.txt.bz2 On 5/29/2018 1:40 PM, Simon Marchi wrote: > On 2018-05-29 01:11 PM, Wei-min Pan wrote: >> Since call_function_by_hand_dummy () already calls gdbarch_return_in_first_hidden_param_p() and sets >> hidden_first_param_p accordingly. Instead of passing the deault_return_type and having the target make >> the same call again , I think we should just pass hidden_first_param_p to gdbarch_push_dummy_call()? > I can't really tell, I am a bit confused by gdbarch_return_in_first_hidden_param_p vs > using_struct_return, and the fact that the AArch64 code also checks > language_pass_by_reference on the function's return value type. You are suggesting > replacing the call to language_pass_by_reference in aarch64_push_dummy_call by > the result of gdbarch_return_in_first_hidden_param_p coming from call_function_by_hand_dummy? > Is it really equivalent? > > Simon The traceback below shows that gdbarch_return_in_first_hidden_param_p() does call language_pass_by_reference(): #0  gnuv3_pass_by_reference (type=0xbe0760) at gnu-v3-abi.c:1255 #1  0x000000000052cdc0 in cp_pass_by_reference (type=)     at cp-abi.c:229 #2  0x00000000005d7428 in language_pass_by_reference (type=)     at language.c:662 #3  0x00000000005a35c4 in gdbarch_return_in_first_hidden_param_p (     gdbarch=gdbarch@entry=0xbd6100, type=0xbe0760) at gdbarch.c:2740 #4  0x00000000005bbe7c in call_function_by_hand_dummy (function=0xc319e0,     default_return_type=default_return_type@entry=0xbe0760, nargs=0,     args=0xffffffffe118, dummy_dtor=dummy_dtor@entry=0x0,     dummy_dtor_data=dummy_dtor_data@entry=0x0) at infcall.c:894  ..... Since I just learned this morning that Alan has been working on this PR, maybe it's best for me  to withdraw the patch that I submitted. Sorry about that. Weimin