From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3499 invoked by alias); 1 Feb 2002 16:26:42 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3337 invoked from network); 1 Feb 2002 16:26:34 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 1 Feb 2002 16:26:34 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 8031E3E02; Fri, 1 Feb 2002 11:26:26 -0500 (EST) Message-ID: <3C5AC1B2.50805@cygnus.com> Date: Fri, 01 Feb 2002 08:26:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.7) Gecko/20020103 X-Accept-Language: en-us MIME-Version: 1.0 To: Richard.Earnshaw@arm.com Cc: gdb@sources.redhat.com Subject: Re: Non-multiarched macros References: <200202011407.OAA29668@cam-mail2.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00023.txt.bz2 > 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