From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115477 invoked by alias); 22 Mar 2018 18:18:26 -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 115071 invoked by uid 89); 22 Mar 2018 18:18:25 -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,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*u:6.1, H*UA:6.1, HContent-Transfer-Encoding:8bit X-HELO: userp2120.oracle.com Received: from userp2120.oracle.com (HELO userp2120.oracle.com) (156.151.31.85) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Mar 2018 18:18:24 +0000 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2MICiuJ177295; Thu, 22 Mar 2018 18:18:20 GMT Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2gvhjmg0t4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Mar 2018 18:18:20 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2MIIJbi017890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Mar 2018 18:18:19 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2MIIIuW026802; Thu, 22 Mar 2018 18:18:19 GMT Received: from [10.159.239.184] (/10.159.239.184) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 22 Mar 2018 11:18:18 -0700 Subject: Re: [PATCH PR gdb/18071] TLS variables can't be resolved on aarch64-linux-gnu To: Simon Marchi Cc: gdb-patches@sourceware.org, Yao Qi References: <1509669516-47946-1-git-send-email-weimin.pan@oracle.com> <402e4a8c-eaf9-a31e-9925-3125f8d149f9@simark.ca> <6c9fb8cc-eb2a-86c3-9e34-fac7c97f6b2f@oracle.com> <8c40379beb8ea8756a3b9075ce6bf4c4@simark.ca> From: Wei-min Pan Message-ID: <9df4193c-828a-7b27-292f-f2dab84b3efb@oracle.com> Date: Thu, 22 Mar 2018 18:18:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <8c40379beb8ea8756a3b9075ce6bf4c4@simark.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8839 signatures=668695 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-1711220000 definitions=main-1803200127 X-SW-Source: 2018-03/txt/msg00425.txt.bz2 Hi Simon, On 3/21/2018 9:22 PM, Simon Marchi wrote: > On 2018-03-19 15:36, Weimin Pan wrote: >> Yes, printing of a TLS fails on all platforms, not just on aarch64. >> How about changing the title to: >> >>    [PATCH PR gdb/18071] aarch64: "info" command can't resolve TLS >> variables > > Maybe "info address" instead of "info"? OK. > >>> Is this code equivalent to calling lookup_minimal_symbol (name, >>> NULL, NULL) ?  If >>> so, there's already lookup_bound_minimal_symbol that does the same, >>> so maybe we >>> can just drop lookup_minimal_symbol_and_objfile and use >>> lookup_bound_minimal_symbol. >> >> Yes, it turns out lookup_minimal_symbol_and_objfile(name) is >> equivalent to >> calling lookup_minimal_symbol (name, NULL, NULL). We can replace the >> call in >> info_address_command() with either lookup_minimal_symbol (name, NULL, >> NULL) >> or lookup_bound_minimal_symbol(name). Calling either one looks like a >> better fix. >> >>> >>> We could also just have lookup_minimal_symbol with parameters that >>> default to nullptr. >>> It is not clear at all to have lookup_bound_minimal_symbol and >>> lookup_minimal_symbol >>> that both return a bound_minimal_symbol, that's quite misleading. >> >> I don't know the rational behind having these two functions which get >> called in >> quite a few places. Yes, having default arguments for >> lookup_minimal_symbol() >> will be another option. >> >> Thanks very much for your comments. > > Thanks for your patience :).  This refactoring can be done in a > separate patch, to keep this one focused on fixing the bug. Thank you very much for getting this process moving :) Would you like me to submit a revised patch which calls lookup_bound_minimal_symbol instead of lookup_minimal_symbol_and_objfile? Weimin > > Simon