This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix gdb.fortran/common-block.exp crash in PIE mode


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]