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: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 06 Feb 2013 09:08:06 -0700
- Subject: Re: [patch] Fix gdb.fortran/common-block.exp crash in PIE mode
- References: <20130119224534.GA26330@host2.jankratochvil.net> <874nia4iri.fsf@fleche.redhat.com> <20130205211435.GA27223@host2.jankratochvil.net>
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
>> 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)
Jan> Unfortunately these macros are used also for minimal_symbol which
Jan> does not have SYMBOL_CLASS.
Another reason to stop sharing these macros across different types of
symbols. Someday I suppose I'll write up a full patch for that instead
of doing it piecemeal as needed.
Tom