From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13182 invoked by alias); 19 Jan 2017 18:21:46 -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 12596 invoked by uid 89); 19 Jan 2017 18:21:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*o:Research, good!, assemble, sk:DW_OP_i X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Jan 2017 18:21:44 +0000 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v0JIJ06Y100184 for ; Thu, 19 Jan 2017 13:21:43 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 282y6asunv-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 19 Jan 2017 13:21:43 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Jan 2017 18:21:41 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 19 Jan 2017 18:21:39 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4303E2190019; Thu, 19 Jan 2017 18:20:45 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v0JILcEu57868390; Thu, 19 Jan 2017 18:21:38 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3DF1611C05E; Thu, 19 Jan 2017 17:19:33 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 12A8111C04A; Thu, 19 Jan 2017 17:19:33 +0000 (GMT) Received: from oc1027705133.ibm.com (unknown [9.152.212.222]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 19 Jan 2017 17:19:33 +0000 (GMT) From: Andreas Arnez To: Yao Qi Cc: gdb-patches@sourceware.org, Jan Kratochvil Subject: Re: [PATCH] Big-endian targets: don't ignore offset into DW_OP_implicit_value References: <20170119174339.GP28060@E107787-LIN> Date: Thu, 19 Jan 2017 18:21:00 -0000 In-Reply-To: <20170119174339.GP28060@E107787-LIN> (Yao Qi's message of "Thu, 19 Jan 2017 17:43:39 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17011918-0020-0000-0000-000002F63ADD X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17011918-0021-0000-0000-00004018EA59 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-01-19_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1701190226 X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00393.txt.bz2 On Thu, Jan 19 2017, Yao Qi wrote: > Nit: we could also match one digit to simplify the usage. With your > patch, we need to use it like this, > > > + {DW_AT_location { > + DW_OP_implicit_value 0x01 0x01 0x01 0x01 > + } SPECIAL_expr} Right, or in this particular case you could say DW_OP_implicit_value 0x01010101 instead, because the number is endianness-symmetric ;-) > > but if we add "{^0x[[:xdigit:]]{2}$} {_op .byte $value}", the use > above can be simplified, > > + {DW_AT_location { > + DW_OP_implicit_value 0x1 0x1 0x1 0x1 > + } SPECIAL_expr} You probably mean "{^0x[[:xdigit:]]{1,2}$} {_op .byte $value}"? Sure, will do. The idea behind the existing logic is that the resulting immediate value always has half as many bytes as there are hex digits. But for single byte integers I agree that this is a bit picky and the simplification is useful. I would not extend this to multi-byte integers, though, such as allowing 0x123456 or such. > During the review, I am trying to use DW_OP_implicit_value in > gdb.dwarf2/implptr-64bit.exp, because I think we should use this new > added DW_OP as much as we can in existing test case. Sounds good! > I get some troubles on using Dwarf::assemble for two cus. I'll let > you know once I resolve the issues there. OK, let's see how that goes. -- Andreas