From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2166 invoked by alias); 7 Mar 2012 19:10:21 -0000 Received: (qmail 2158 invoked by uid 22791); 7 Mar 2012 19:10:20 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Mar 2012 19:10:03 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q27J9eOT005796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 7 Mar 2012 14:09:40 -0500 Received: from host2.jankratochvil.net (ovpn-116-19.ams2.redhat.com [10.36.116.19]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q27J9aBY016093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 7 Mar 2012 14:09:39 -0500 Date: Wed, 07 Mar 2012 19:10:00 -0000 From: Jan Kratochvil To: Doug Evans Cc: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [patch 2/2] typedef-checking for CU relative vs. absolute offsets [Re: RFC: problem with DW_OP_GNU_deref_type and dwarf's get_base_type callback] Message-ID: <20120307190936.GA30591@host2.jankratochvil.net> References: <20120305223429.GM2867@adacore.com> <20120307170940.GA22619@host2.jankratochvil.net> <20120307171249.GB22619@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2012-03/txt/msg00238.txt.bz2 On Wed, 07 Mar 2012 19:58:17 +0100, Doug Evans wrote: > The problem stems from "offset" being ambiguous. > I'd rather just pick a better (clearer) name and be consistent. I have to strongly disagree, without automatic checking this bug will creep in again. Even with testcases it does not get found as they rarely excersise multiple CUs. Plus these advanced DWARF features are used only for -O2 -g builds and so bugs there have low chance to be reported - everyone expects -O2 -g debug info is not good. I find the other possibility some static checker instead, to have just some: typedef unsigned int cu_offset; typedef unsigned int sect_offset; No idea which static checker can find it. Thanks, Jan