From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29268 invoked by alias); 13 Aug 2003 17:19:22 -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 29202 invoked from network); 13 Aug 2003 17:19:20 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (209.53.17.87) by sources.redhat.com with SMTP; 13 Aug 2003 17:19:20 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 4CE91D2DAF; Wed, 13 Aug 2003 10:19:16 -0700 (PDT) Date: Wed, 13 Aug 2003 17:19:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: [commit/multiarch/hpux] set addr_bits_remove gdbarch method Message-ID: <20030813171916.GB971@gnat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-08/txt/msg00218.txt.bz2 --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 796 HP/UX text addresses are word aligned, and we were already setting the smash_text_address method for that. So I changed the gdbarch init routine to set addr_bits_remove as well. What caused me to look into this was the fact that I discovered that we define the ADDR_BITS_REMOVE for hppa64, but not for hppa32, and I think it is an oversight that was covered up by the fact that we have SMASH_TEXT_ADDRESS was already. I think we should have a look at getting rid of either one of these 2 methods. There is already a comment to that effect in gdbarch.h... 2003-08-13 J. Brobecker * hppa-tdep.c (hppa_gdbarch_init): Set the addr_bits_remove gdbarch method to clear the 2 low bits of text addresses. Tested on hppa-hpux11.00. Committed in head. -- Joel --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="addr_bits_remove.diff" Content-length: 810 Index: hppa-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/hppa-tdep.c,v retrieving revision 1.86 diff -u -p -r1.86 hppa-tdep.c --- hppa-tdep.c 3 Jul 2003 22:14:42 -0000 1.86 +++ hppa-tdep.c 13 Aug 2003 17:05:46 -0000 @@ -5046,6 +5046,7 @@ hppa_gdbarch_init (struct gdbarch_info i set_gdbarch_deprecated_call_dummy_length (gdbarch, INSTRUCTION_SIZE * 28); /* set_gdbarch_deprecated_fix_call_dummy (gdbarch, hppa_fix_call_dummy); */ set_gdbarch_deprecated_push_arguments (gdbarch, hppa_push_arguments); + set_gdbarch_addr_bits_remove (gdbarch, hppa_smash_text_address); set_gdbarch_smash_text_address (gdbarch, hppa_smash_text_address); set_gdbarch_believe_pcc_promotion (gdbarch, 1); set_gdbarch_read_pc (gdbarch, hppa_target_read_pc); --C7zPtVaVf+AK4Oqc--