From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1835 invoked by alias); 26 Jan 2010 23:52:00 -0000 Received: (qmail 1821 invoked by uid 22791); 26 Jan 2010 23:51:59 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,SPF_HELO_PASS,SPF_PASS 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; Tue, 26 Jan 2010 23:51:54 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0QNpTm7032448 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 26 Jan 2010 18:51:37 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0QNoHFO030452 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 26 Jan 2010 18:51:06 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id o0QNoHOh031724 for ; Wed, 27 Jan 2010 00:50:17 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o0QNoG5e031720 for gdb-patches@sourceware.org; Wed, 27 Jan 2010 00:50:16 +0100 Date: Tue, 26 Jan 2010 23:52:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] Comment symbol->symtab NULL [Re: [patch] Fix solib-display.exp crash] Message-ID: <20100126235016.GA31019@host0.dyn.jankratochvil.net> References: <20100119234001.GA9151@host0.dyn.jankratochvil.net> <20100126212425.GB17877@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100126212425.GB17877@caradoc.them.org> User-Agent: Mutt/1.5.20 (2009-08-17) 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: 2010-01/txt/msg00586.txt.bz2 On Tue, 26 Jan 2010 22:24:25 +0100, Daniel Jacobowitz wrote: > On Wed, Jan 20, 2010 at 12:40:01AM +0100, Jan Kratochvil wrote: > > The question is whether SYMBOL_SYMTAB (symbol) can be ever NULL at this point. > > IMO not, it can be NULL only temporarily during reading symbols. > > I think that's right; this patch is fine. Thanks! Checked-in: http://sourceware.org/ml/gdb-cvs/2010-01/msg00217.html OK to check-in this comment? Thanks, Jan 2010-01-27 Jan Kratochvil * symtab.h (struct symbol ): New comment on NULL values. --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -554,7 +554,8 @@ struct symbol struct type *type; /* The symbol table containing this symbol. This is the file - associated with LINE. */ + associated with LINE. It can be NULL during symbols read-in but it is + never NULL during normal operation. */ struct symtab *symtab; /* Domain code. */