From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29771 invoked by alias); 2 Feb 2002 21:48:49 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29739 invoked from network); 2 Feb 2002 21:48:47 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 2 Feb 2002 21:48:47 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 380393E4B; Sat, 2 Feb 2002 16:48:41 -0500 (EST) Message-ID: <3C5C5EB9.3040506@cygnus.com> Date: Sat, 02 Feb 2002 13:48: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-patches@sources.redhat.com Subject: Re: RFC/PATCH multi-arch SMASH_TEXT_ADDRESS References: <200202021800.SAA03176@cam-mail2.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00029.txt.bz2 > * gdbarch.h (SMASH_TEXT_ADDRESS): Add multi-arch defines. > * gdbarch.sh (SMASH_TEXT_ADDRESS): Add rule. > * gdbarch.c (struct gdbarch): Add entry for it. > (startup_gdbarch): Likewise. > (gdbarch_alloc): Default it. > (verify_gdbarch): Skip verify of it. > (gdbarch_dump): Dump it. > (gdbarch_smash_text_address): New function. > FYI, just do this: gdbarch.sh (SMASH_TEXT_ADDRESS): Add rule. gdbarch.h, gdbarch.c: Re-generate. And then in the gdb directory run: ./gdbarch.sh It will generate new-gdbarch.[hc] which you can examine/copy into place. I noticed slight differences when running this. > ! #ifdef SMASH_TEXT_ADDRESS > ! if (tmpaddr & 1) /* FIXME: delete this line */ > ! SMASH_TEXT_ADDRESS (tmpaddr); > ! #endif I would have been more conservative with this (if (SMASH_TEXT_ADDRESS_P()) ... but as you noticed there are only two definitions and they both just mask out the bottom bits - the test is probably even bogus for HP/UX. > + # It is not at all clear why SMASH_TEXT_ADDRESS is not folded into > + # ADDR_BITS_REMOVE. > + f:2:SMASH_TEXT_ADDRESS:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr:::core_addr_identity::0 I agree. Suggest creating a bug report so someone (else - me?) gets to investigate further. This one was nastier then it first looked, but yes fine. Andrew