[patch] Fix gdb.fortran/common-block.exp crash in PIE mode
Tom Tromey
tromey@redhat.com
Wed Feb 6 16:08:00 GMT 2013
>>>>> "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
More information about the Gdb-patches
mailing list