From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31853 invoked by alias); 15 Jul 2010 09:22:18 -0000 Received: (qmail 31666 invoked by uid 22791); 15 Jul 2010 09:22:16 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Jul 2010 09:22:08 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 998F1CB02A4; Thu, 15 Jul 2010 11:22:04 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PzqNweTXGnEt; Thu, 15 Jul 2010 11:22:04 +0200 (CEST) Received: from province.act-europe.fr (province.act-europe.fr [10.10.0.214]) by mel.act-europe.fr (Postfix) with ESMTP id 88F6ACB016C; Thu, 15 Jul 2010 11:22:04 +0200 (CEST) Received: by province.act-europe.fr (Postfix, from userid 560) id 69939164876; Thu, 15 Jul 2010 11:22:04 +0200 (CEST) Date: Thu, 15 Jul 2010 09:22:00 -0000 From: Jerome Guitton To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Nullified garbage-collected global variables Message-ID: <20100715092204.GH14704@adacore.com> References: <1278948088-15391-1-git-send-email-guitton@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) 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-07/txt/msg00236.txt.bz2 Tom Tromey (tromey@redhat.com): > Do you need to apply the same treatment to full symbols? What happens > if the psymtab is expanded for some other reason and a full symbol of > this sort is then created? Or is that already impossible? Well, that sounded unlikely; then I double-checked, and experimental results rejected my assumption. e.g. my example without --readnow: (gdb) p my_global_symbol No symbol "my_global_symbol" in current context. and with --readnow: (gdb) p my_global_symbol Cannot access memory at address 0x0 Thank you for catching that. I'll fix my patch. > What about has_section_at_zero? Right, it's worth protecting us against this case as well (as we do for elminated functions). I'll add a guard. Thank you for the review, Jerome