From patchwork Wed Feb 22 11:49:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Arnez X-Patchwork-Id: 19335 Received: (qmail 61996 invoked by alias); 22 Feb 2017 11:49:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 61915 invoked by uid 89); 22 Feb 2017 11:49:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= 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; Wed, 22 Feb 2017 11:49:32 +0000 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1MBmn2f105300 for ; Wed, 22 Feb 2017 06:49:31 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 28s7gxeqwb-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 22 Feb 2017 06:49:31 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 22 Feb 2017 11:49:29 -0000 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 22 Feb 2017 11:49:28 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id DD89917D805A; Wed, 22 Feb 2017 11:52:37 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1MBnRno10224052; Wed, 22 Feb 2017 11:49:27 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2F1B3AE056; Wed, 22 Feb 2017 10:47:18 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 128DBAE045; Wed, 22 Feb 2017 10:47:18 +0000 (GMT) Received: from oc1027705133.ibm.com (unknown [9.152.212.222]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 22 Feb 2017 10:47:18 +0000 (GMT) From: Andreas Arnez To: gdb-patches@sourceware.org Cc: Jan Kratochvil Subject: [PING][PATCH] Big-endian targets: Don't ignore offset into DW_OP_stack_value Date: Wed, 22 Feb 2017 12:49:25 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022211-0012-0000-0000-000004D2D64C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022211-0013-0000-0000-00001757BD8C Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-22_08:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702220116 X-IsSubscribed: yes Ping: https://sourceware.org/ml/gdb-patches/2017-02/msg00363.html > gdb/ChangeLog: > > * dwarf2loc.c (indirect_synthetic_pointer): Get data type of > pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full. > (dwarf2_evaluate_loc_desc_full): Add parameter 'orig_type'. Fix > the handling of DWARF_VALUE_STACK on big-endian targets when > coming via an implicit pointer. > (dwarf2_evaluate_loc_desc): Adjust call to > dwarf2_evaluate_loc_desc_full. > * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration. > * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function. > > gdb/testsuite/ChangeLog: > > Andreas Arnez > > * gdb.dwarf2/nonvar-access.exp: Add test for stack value location > and implicit pointer into such a location. Since we now have DWARF-5 support, I think there is no point in adding a new use of DW_OP_GNU_implicit_pointer to the test case. Thus I suggest to use DW_OP_implicit_pointer instead, by merging the patch below. OK to apply? --- Andreas -- >8 -- diff --git a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp index 633c6b3..99f63cc 100644 --- a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp +++ b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp @@ -159,7 +159,7 @@ Dwarf::assemble $asm_file { {name implicit_a_ptr} {type :$char_ptr_label} {location { - GNU_implicit_pointer $implicit_a_label 5 + implicit_pointer $implicit_a_label 5 } SPECIAL_expr} } # Stack-value location. @@ -176,7 +176,7 @@ Dwarf::assemble $asm_file { {name implicit_b_ptr} {type :$char_ptr_label} {location { - GNU_implicit_pointer $stack_b_label 1 + implicit_pointer $stack_b_label 1 } SPECIAL_expr} } } diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index 1ccdc5d..989a717 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -946,9 +946,10 @@ namespace eval Dwarf { define_label $l2 } + DW_OP_implicit_pointer - DW_OP_GNU_implicit_pointer { if {[llength $line] != 3} { - error "usage: DW_OP_GNU_implicit_pointer LABEL OFFSET" + error "usage: $opcode LABEL OFFSET" } # Here label is a section offset.