From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57195 invoked by alias); 10 Oct 2016 12:24:47 -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 57185 invoked by uid 89); 10 Oct 2016 12:24:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*o:Research, composition, policy 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; Mon, 10 Oct 2016 12:24:45 +0000 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9ACO1HV106775 for ; Mon, 10 Oct 2016 08:24:44 -0400 Received: from e06smtp06.uk.ibm.com (e06smtp06.uk.ibm.com [195.75.94.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 2606305rb5-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 10 Oct 2016 08:24:44 -0400 Received: from localhost by e06smtp06.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 10 Oct 2016 13:24:42 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp06.uk.ibm.com (192.168.101.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 10 Oct 2016 13:24:39 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 163BA1B08074 for ; Mon, 10 Oct 2016 13:26:39 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u9ACOd2q20578374 for ; Mon, 10 Oct 2016 12:24:39 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u9ACOc97019887 for ; Mon, 10 Oct 2016 08:24:38 -0400 Received: from oc1027705133.ibm.com (dyn-9-152-212-159.boeblingen.de.ibm.com [9.152.212.159]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u9ACONpG019078 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Oct 2016 08:24:38 -0400 From: Andreas Arnez To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Allow DW_OP_GNU_uninit in dwarf_expr_require_composition References: <87lgxxctli.fsf@tromey.com> Date: Mon, 10 Oct 2016 12:24:00 -0000 In-Reply-To: <87lgxxctli.fsf@tromey.com> (Tom Tromey's message of "Sun, 09 Oct 2016 11:36:41 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16101012-0024-0000-0000-0000022FBC1B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16101012-0025-0000-0000-000020BA2FD8 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-10_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-1609300000 definitions=main-1610100209 X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00218.txt.bz2 On Sun, Oct 09 2016, Tom Tromey wrote: >>>>>> "Andreas" == Andreas Arnez writes: > > Andreas> This patch allows DW_OP_GNU_uninit after all operators > Andreas> requiring a composition, to simplify the code and make it more > Andreas> consistent. This policy may be more permissive than necessary, > Andreas> but in the worst case just leads to a DWARF location > Andreas> description resulting in an uninitialized value instead of an > Andreas> error message. > > I think it would be best to allow DW_OP_GNU_uninit to terminate any > piece, rather than require it to be at the end of the expression. This > seems compatible and clearly more consistent with other DWARF > operations. You mean to allow DW_OP_GNU_uninit to terminate any simple location description? Right, this would allow marking individual structure members as uninitialized, for instance. > That is, assuming DW_OP_GNU_uninit is useful at all. > Another option would be to deprecate it. Right, I wonder about its usefulness as well. For a variable with fixed location it may cover a small window where the compiler can be certain that the variable is uninitialized. I guess this *might* be useful sometimes? Is there even a DWARF issue for this? Or a formal specification? -- Andreas