From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7728 invoked by alias); 3 Apr 2014 19:15:00 -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 7711 invoked by uid 89); 3 Apr 2014 19:14:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f74.google.com Received: from mail-pa0-f74.google.com (HELO mail-pa0-f74.google.com) (209.85.220.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 03 Apr 2014 19:14:58 +0000 Received: by mail-pa0-f74.google.com with SMTP id fb1so383179pad.3 for ; Thu, 03 Apr 2014 12:14:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:subject:in-reply-to :references; bh=fIpAsLOylvso2obUsva0aTQrdaRRXtpLNmA6M/Chlws=; b=kaRwBKvyWXRhEvrYGP77Nw3ZE480H6y8w8E317DdRSeaTRaLrdh/SD2MDguZ1p9FFQ BUFkJwYNtP8MxoOJZPXt+JJMaV6b8Acdip3kblrogfdcz1d/J0UpEDzvxWhFNQNd+2oO dJOYn+EpJb75feZ6qbPo5gRPYWqK7RwjoPDfTk3Uw9w2o+d5IilCmAwfpkMNK7WqjiAb H6tOuieK1P81FIpEICZOAWL4oOLTgh/f2Acmgi4aoCvaSZrOkHQLh4xd78pMlFkZEm7t S3a3IlVmiU4eOEs0qQGLa9+HkL/UvH2Ug3Gbw4kMwRn57axt2nSHwl8lqHa0DFH7VEDd T9jA== X-Gm-Message-State: ALoCoQkMASiYDnL8bkaKY5g7l0eiYNyz33R+7MYWBrgPQt5FtMSsLWsFHDstrSGhnZx906pBOw1U1BzBzQfzHA5ooVQw3bVO45v6/ffjPjZo9OFUQy+iZN3WACYnKsXliSZKuMxQz5jjByMbafBqzmn4ACWcNtO4tqFFFdyao3PWe3stsf2wNBtQkLJ8Z+5Nnv0mtXnl9KWady7x7U82RhEex+MAeV3xED0buCofyAkcXB+ho389BBg= X-Received: by 10.68.216.230 with SMTP id ot6mr4945758pbc.3.1396552495942; Thu, 03 Apr 2014 12:14:55 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id f65si1142944yhg.7.2014.04.03.12.14.55 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Apr 2014 12:14:55 -0700 (PDT) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 89C8331C201 for ; Thu, 3 Apr 2014 12:14:55 -0700 (PDT) From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21309.45871.16571.481751@ruffy.mtv.corp.google.com> Date: Thu, 03 Apr 2014 19:15:00 -0000 To: gdb-patches@sourceware.org Subject: Re: [commit] (read_cutu_die_from_dwo): Fix assertion In-Reply-To: References: X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00051.txt.bz2 Doug Evans writes: > Hi. > > Thinko on my part, checked in as obvious. > > 2014-04-03 Doug Evans > > * dwarf2read.c (read_cutu_die_from_dwo): Fix assertion, at most one > of stub_comp_unit_die, stub_comp_dir is non-NULL. > > diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c > index 3e77cf8..103219c 100644 > --- a/gdb/dwarf2read.c > +++ b/gdb/dwarf2read.c > @@ -4977,8 +4977,8 @@ read_cutu_die_from_dwo (struct dwarf2_per_cu_data *this_cu, > struct attribute *attr; > struct die_info *comp_unit_die; > > - /* Exactly one of these must be provided. */ > - gdb_assert ((stub_comp_unit_die != NULL) + (stub_comp_dir != NULL) == 1); > + /* At most one of these may be provided. */ > + gdb_assert ((stub_comp_unit_die != NULL) + (stub_comp_dir != NULL) <= 1); > > /* These attributes aren't processed until later: > DW_AT_stmt_list, DW_AT_low_pc, DW_AT_high_pc, DW_AT_ranges. Bleah. Plus the correspondent function comment update. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 103219c..d156504 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -4946,8 +4946,8 @@ init_cu_die_reader (struct die_reader_specs *reader, from it to the DIE in the DWO. If NULL we are skipping the stub. STUB_COMP_DIR is similar to STUB_COMP_UNIT_DIE: When reading a TU directly from the DWO file, bypassing the stub, it contains the DW_AT_comp_dir - attribute of the referencing CU. Exactly one of STUB_COMP_UNIT_DIE and - STUB_COMP_DIR must be non-NULL. + attribute of the referencing CU. At most one of STUB_COMP_UNIT_DIE and + STUB_COMP_DIR may be non-NULL. *RESULT_READER,*RESULT_INFO_PTR,*RESULT_COMP_UNIT_DIE,*RESULT_HAS_CHILDREN are filled in with the info of the DIE from the DWO file. ABBREV_TABLE_PROVIDED is non-zero if the caller of init_cutu_and_read_dies