This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Non-multiarched macros
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 01 Feb 2002 11:26:26 -0500
- Subject: Re: Non-multiarched macros
- References: <200202011407.OAA29668@cam-mail2.cambridge.arm.com>
> The following macros are defined by the ARM and are referenced by the
> generic code, but appear not be multi-arched.
>
> What is supposed to happen here?
>
> SMASH_TEXT_ADDRESS -- coffread.c dbxread.c dwarfread.c elfread.c
> somread.c
> FLOAT_INFO -- infcmd.c
> VARIABLES_INSIDE_BLOCK -- dbxread.c os9kread.c
> ELF_MAKE_MSYMBOL_SPECIAL -- elfread.c
> COFF_MAKE_MSYMBOL_SPECIAL -- coffread.c
Anyone can convert these macros to use the multi-arch framework and
hopefull that conversion is a straight forward afair. Easiest way I
know to do this is to copy a similar example. If you're wondering what
isn't straight forward look at mips_extra_frame_info() (Jason Thorp
note - this stops the Alpha being fully converted, see gdb/150 and
gdb/149 and gdb/151).
I'd do these in parallel with other changes since throwing the
multi-arch switch doesn't depend on these being functions.
Some suggestions.
> SMASH_TEXT_ADDRESS -- coffread.c dbxread.c dwarfread.c elfread.c
> somread.c
REGISTER_BYTES_OK
> FLOAT_INFO -- infcmd.c
DO_REGISTERS_INFO
need to change FLOAT_INFO -> FLOAT_INFO().
> VARIABLES_INSIDE_BLOCK -- dbxread.c os9kread.c
Is OS9K_VARIABLES_INSIDE_BLOCK defined?
DO_REGISTERS_INFO
> ELF_MAKE_MSYMBOL_SPECIAL -- elfread.c
REGISTER_BYTES_OK
> COFF_MAKE_MSYMBOL_SPECIAL -- coffread.c
REGISTER_BYTES_OK
There was an e-mail explaining the choice somewhere (Eli, I guess it is
time to give in and put it into the internals manual). However, briefly:
#ifdef FOO
FOO()
#endif
becomes
if (FOO_P())
FOO();
and
#ifndef FOO
#define FOO() bar()
#endif
FOO()
becomes
FOO()
with bar() made the default. The main thing is to resist any temptation
to do anything beyond a mechanical conversion.
enjoy,
Andrew