From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16616 invoked by alias); 9 Jul 2007 18:01:26 -0000 Received: (qmail 16608 invoked by uid 22791); 9 Jul 2007 18:01:25 -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; Mon, 09 Jul 2007 18:01:23 +0000 Received: (qmail 22357 invoked from network); 9 Jul 2007 18:01:21 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Jul 2007 18:01:21 -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> <24208.12.7.175.2.1183748485.squirrel@webmail.sonic.net> From: Jim Blandy Date: Mon, 09 Jul 2007 18:01:00 -0000 In-Reply-To: <24208.12.7.175.2.1183748485.squirrel@webmail.sonic.net> (msnyder@sonic.net's message of "Fri, 6 Jul 2007 12:01:25 -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/msg00155.txt.bz2 msnyder@sonic.net writes: >> 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. > > OK then -- how's this? That's what I'd do. :)