From patchwork Thu Apr 3 19:14:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 399 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 6CA68360078 for ; Thu, 3 Apr 2014 12:15:03 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14314964) id 1ED0540D0A337; Thu, 3 Apr 2014 12:15:03 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx20.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx20.g.dreamhost.com (Postfix) with ESMTPS id DDF2D40CF3093 for ; Thu, 3 Apr 2014 12:15:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:subject :in-reply-to:references; q=dns; s=default; b=Ok7U0P9HbcZHebhbHLK jFoUd3D1h2ryWPIAXJDIUhbc0Cw+mOtkuooUZiCWhNctRH0zl4XztEGtWco/x173 9CuG+BSk/H88UewPjB0e5xwWLQyUfr3tJpmwfME4doUEQ9mUQSPIBIKUrAHM+bWH xkAywqoHyUFdPRMzfZ+/Kxg0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:subject :in-reply-to:references; s=default; bh=uV5TR3g2juPZQn/joK72rJiiE Y0=; b=rbfbILz4xaWZGP6rdxtLEz1v4Pn+qiqh6kBSixXkvc1wtdebW7YSHIy6v CFnkRLULFepp9sGnCSFCif5b7DjYYj9JxElyHdjN6tL5nAa7KmVjIN5A1+Uktm3w dzufDZJApSp/ZXKAVJU9qsXB15dvcNdKkoeqJOlvKVyKaayHkM= 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-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 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 Message-ID: <21309.45871.16571.481751@ruffy.mtv.corp.google.com> Date: Thu, 3 Apr 2014 12:14:55 -0700 To: gdb-patches@sourceware.org Subject: Re: [commit] (read_cutu_die_from_dwo): Fix assertion In-Reply-To: References: X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in 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