This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] stack.c, check return value of lookup_symbol
- From: Jim Blandy <jimb at codesourcery dot com>
- To: msnyder at sonic dot net
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 06 Jul 2007 08:21:15 -0700
- Subject: Re: [patch] stack.c, check return value of lookup_symbol
- References: <24899.12.7.175.2.1183676791.squirrel@webmail.sonic.net>
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.