Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [commit/multiarch/hpux] set addr_bits_remove gdbarch method
@ 2003-08-13 17:19 Joel Brobecker
  2003-08-13 18:40 ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2003-08-13 17:19 UTC (permalink / raw)
  To: gdb-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-12-05  2:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-13 17:19 [commit/multiarch/hpux] set addr_bits_remove gdbarch method Joel Brobecker
2003-08-13 18:40 ` Andrew Cagney
2003-12-05  2:13   ` Joel Brobecker
2003-12-05  2:16     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox