From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101309 invoked by alias); 10 Mar 2017 20:01:14 -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 100645 invoked by uid 89); 10 Mar 2017 20:01:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*i:sk:m3k27xe, H*x:version X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Mar 2017 20:01:13 +0000 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2AJs9rD022099 for ; Fri, 10 Mar 2017 15:01:12 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 2938sw3her-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 10 Mar 2017 15:01:12 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Mar 2017 20:01:10 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 10 Mar 2017 20:01:09 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v2AK19ue19661244; Fri, 10 Mar 2017 20:01:09 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2AAD011C054; Fri, 10 Mar 2017 20:00:57 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D2A011C04A; Fri, 10 Mar 2017 20:00:57 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.164.174.223]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 10 Mar 2017 20:00:57 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 14140D806AB; Fri, 10 Mar 2017 21:01:08 +0100 (CET) Subject: Re: [PATCH] PR gdb/21226: Take DWARF stack value pieces from LSB end To: arnez@linux.vnet.ibm.com (Andreas Arnez) Date: Fri, 10 Mar 2017 20:01:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: from "Andreas Arnez" at Mar 10, 2017 08:27:09 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17031020-0020-0000-0000-0000031BB6C0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17031020-0021-0000-0000-000040BAF8FA Message-Id: <20170310200108.14140D806AB@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-10_13:,, 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-1702020001 definitions=main-1703100155 X-SW-Source: 2017-03/txt/msg00151.txt.bz2 Andreas Arnez wrote: > On Fri, Mar 10 2017, Ulrich Weigand wrote: > > > Andreas Arnez wrote: > > > > Sorry, I overlooked one other issue: > > > >> + /* Piece offset is from least significant bit end. */ > >> + if (bits_big_endian) > >> + source_offset_bits += obj_size - (p->offset + p->size); > >> + else > >> + source_offset_bits += p->offset; > > > > Should this really consult bits_big_endian, as opposed to the > > regular byte order? Note that in the DWARF_VALUE_REGISTER case, > > we have the same issue, and there the byte order is consulted. > > Using the byte order would strictly be more correct, yes. As opposed to > register pieces, we would have to get it from a different gdbarch, > though. I think the right one would be the objfile gdbarch of the > underlying CU, right? That sounds right, and is compatible with what is done for full DWARF_VALUE_STACK values in dwarf2_evaluate_loc_desc_full. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com