Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: [commit/multiarch/hpux] set addr_bits_remove gdbarch method
Date: Wed, 13 Aug 2003 17:19:00 -0000	[thread overview]
Message-ID: <20030813171916.GB971@gnat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 796 bytes --]

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  <brobecker@gnat.com>

        * 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

[-- Attachment #2: addr_bits_remove.diff --]
[-- Type: text/plain, Size: 810 bytes --]

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);

             reply	other threads:[~2003-08-13 17:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-13 17:19 Joel Brobecker [this message]
2003-08-13 18:40 ` Andrew Cagney
2003-12-05  2:13   ` Joel Brobecker
2003-12-05  2:16     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030813171916.GB971@gnat.com \
    --to=brobecker@gnat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox