This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix gdb.fortran/common-block.exp crash in PIE mode
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 5 Feb 2013 22:14:35 +0100
- Subject: Re: [patch] Fix gdb.fortran/common-block.exp crash in PIE mode
- References: <20130119224534.GA26330@host2.jankratochvil.net> <874nia4iri.fsf@fleche.redhat.com>
On Mon, 21 Jan 2013 17:12:49 +0100, Tom Tromey wrote:
> Perhaps the various symbol-value accessors like SYMBOL_VALUE_ADDRESS
> should make assertions about the address class. This is what GCC does
> in its tree accessors.
>
> Like
>
> #define SYMBOL_VALUE_COMMON_BLOCK(symbol) \
> ((gdb_assert (SYMBOL_CLASS (symbol) == LOC_COMMON_BLOCK)), \
> (symbol)->info.value.common_block)
Unfortunately these macros are used also for minimal_symbol which does not
have SYMBOL_CLASS.
This is another sanity check which can be implemented after -Wc++-compat gets
checked in.
Jan