From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26283 invoked by alias); 6 Jul 2007 15:21:24 -0000 Received: (qmail 26274 invoked by uid 22791); 6 Jul 2007 15:21:24 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 06 Jul 2007 15:21:18 +0000 Received: (qmail 4519 invoked from network); 6 Jul 2007 15:21:16 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Jul 2007 15:21:16 -0000 To: msnyder@sonic.net Cc: gdb-patches@sourceware.org Subject: Re: [patch] stack.c, check return value of lookup_symbol References: <24899.12.7.175.2.1183676791.squirrel@webmail.sonic.net> From: Jim Blandy Date: Fri, 06 Jul 2007 15:21:00 -0000 In-Reply-To: <24899.12.7.175.2.1183676791.squirrel@webmail.sonic.net> (msnyder@sonic.net's message of "Thu, 5 Jul 2007 16:06:31 -0700 (PDT)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2007-07/txt/msg00108.txt.bz2 msnyder@sonic.net writes: > Since it's known that lookup_symbol can return NULL, my first impulse > was to call gdb_assert. That still might be the right thing to do, > since it indicates some sort of internal fault -- but it seems to > me that it isn't necessarily fatal, and simply doing nothing is an > option... gdb_assert calls internal_error, so it's not going to sweep GDB out from under the user. And the situation we're talking about here would be one where we found a symbol in a block, and then looked up that name in that block and didn't find the symbol. I definitely want to see an internal error if that happens.