From patchwork Wed Apr 16 19:52:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 583 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id D6ACE360078 for ; Wed, 16 Apr 2014 12:52:29 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14314964) id 88D314B98869; Wed, 16 Apr 2014 12:52:29 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx22.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-mx22.g.dreamhost.com (Postfix) with ESMTPS id 4A2EF4B98849 for ; Wed, 16 Apr 2014 12:52:29 -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:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=Wn3nI6CSsOOI1d/+uysMRLbLc74sn RMS5uOJzQVofdOl6g57sXsnJ3BVQYLfkFE7HwXutbEM3DQu2gRToN/pv5eBdEAu5 +JVs/nozjMAFi2KwkhLgcfgLwljzDoupg/pHgPVWN19g/RJUQce90ieTpeAUYz5u WOxzN2+CFv5vdA= 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:to:subject:date:message-id:mime-version :content-type; s=default; bh=MFGpLRUt+eY547flCps7GAp07vw=; b=E3d x+mPNrmQ6mJLHDm3rr/lSM8S0XCXCXKH1KrMr482JrY0t4mIR8XUoMNB5RYBxclf N3aX9WmfK8udtUfqtcmEwFprHTjIB3nkNXvzfYPGFCp4rS2aFvzcbzr5ae0gL41n QRGF9AXAUGtTdq5PTHcJqhYhERxjLY1MpeMmbJ8M= Received: (qmail 7593 invoked by alias); 16 Apr 2014 19:52:27 -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 7579 invoked by uid 89); 16 Apr 2014 19:52:26 -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-yh0-f74.google.com Received: from mail-yh0-f74.google.com (HELO mail-yh0-f74.google.com) (209.85.213.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 16 Apr 2014 19:52:25 +0000 Received: by mail-yh0-f74.google.com with SMTP id f10so1676868yha.5 for ; Wed, 16 Apr 2014 12:52:23 -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:to:subject:date:message-id:mime-version :content-type; bh=f7l0fE2S4u0/OXzNLQ7BE2Fom7LjeZ6p8GSq+vJyH08=; b=lNXZKM/rtrdJQF2ElXH/yCutBeiZrF9Jb7B7LVZLm3fy/9jX5PujIrr6969THtBkK0 qZZlPS+WIVHThXNL6m2Sj3dT4JwmU4B7Qaw2crKqx/4sb/s5lqO5qE4B6KkguddendPX DLAZ8SNJ8q9nxPPRtNS4eIeXs6vlOWycHQCWm8atqHBav9lXqcnB/X8g+h7zRJuoiyoj lREXMJdZDzcCoCYSSAZI2mtiQ6vMVDH+s70Q6laSF7M95qqTHwWFIb2HYXin/WINqD6G fQPK8PyqF2Zz7OwS/10woyfyarMnBrOwOh+MKHyYQQqZJg3ftJWWis5z+OyTZ+Dgfk2m +snw== X-Gm-Message-State: ALoCoQn5Jy1RCLotXRUlpBuxUWmWuU/wMimpz2B9rgiG9grVL+qaA5SMn0IZDhLtolu4w3xhkGkZQc8rKs+KtliAMXl4oSGKb3WyqcHT2RDgVMUjJhNqLRbINNJXyXZu8uSEpcsmPyTAHlPCPDuUQs0UXW1xT78NfUDHHmStb6qNod6jJ8Rn8NRdkl96smF3DbaFsJGTH/M/NN6dnJfzcCuthyXWJwFctb/bWGCfHysoSVs0S1kQZqA= X-Received: by 10.236.128.112 with SMTP id e76mr4484003yhi.38.1397677943642; Wed, 16 Apr 2014 12:52:23 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id s65si3235291yhc.2.2014.04.16.12.52.23 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Apr 2014 12:52:23 -0700 (PDT) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 489415A41E5 for ; Wed, 16 Apr 2014 12:52:23 -0700 (PDT) From: Doug Evans To: gdb-patches@sourceware.org Subject: [PATCH] dwarf2read.c (read_structure_type): Delete outdated comments Date: Wed, 16 Apr 2014 12:52:22 -0700 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in Hi. This patch could use another set of eyes. The comment here is (ISTM) just plain wrong (or at best misleading). We don't call new_symbol here, that is done by process_structure_scope. 2014-04-16 Doug Evans * dwarf2read.c (read_structure_type): Delete outdated comments. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 6d1b90c..c0ca557 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -12800,19 +12800,14 @@ producer_is_icc (struct dwarf2_cu *cu) /* Called when we find the DIE that starts a structure or union scope (definition) to create a type for the structure or union. Fill in the type's name and general properties; the members will not be - processed until process_structure_scope. + processed until process_structure_scope. A symbol table entry for + the type will also not be done until process_structure_scope (assuming + the type has a name). NOTE: we need to call these functions regardless of whether or not the DIE has a DW_AT_name attribute, since it might be an anonymous structure or union. This gets the type entered into our set of - user defined types. - - However, if the structure is incomplete (an opaque struct/union) - then suppress creating a symbol table entry for it since gdb only - wants to find the one with the complete definition. Note that if - it is complete, we just call new_symbol, which does it's own - checking about whether the struct/union is anonymous or not (and - suppresses creating a symbol table entry itself). */ + user defined types. */ static struct type * read_structure_type (struct die_info *die, struct dwarf2_cu *cu)