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


>>>>> "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


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