summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Chastain <mec.gnu@mindspring.com>2003-12-18 22:13:48 +0000
committerMichael Chastain <mec.gnu@mindspring.com>2003-12-18 22:13:48 +0000
commitda2d3e045bc54585331da7880f02c07f41730d53 (patch)
tree7ae4fb96892e5a1afd50b720124e67ec58c2218f
parenta3a0494ccb85b86f5cca5865346096d660b5c819 (diff)
downloadgdb-da2d3e045bc54585331da7880f02c07f41730d53.tar.gz
2003-12-18 Michael Chastain <mec.gnu@mindspring.com>
* hppa-tdep.c (hppa_gdbarch_init): Set sizeof(long_double) to 128. Document type sizes for hppa*-*-hpux* compilers available to me.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/hppa-tdep.c36
2 files changed, 40 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 31a47c9f61c..fb9f5eb6563 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2003-12-18 Michael Chastain <mec.gnu@mindspring.com>
+ * hppa-tdep.c (hppa_gdbarch_init): Set sizeof(long_double) to 128.
+ Document type sizes for hppa*-*-hpux* compilers available to me.
+
+2003-12-18 Michael Chastain <mec.gnu@mindspring.com>
+
* hppam3-nat.c: Delete obsolete file.
* hppab-nat.c: Delete obsolete file.
* Makefile.in: Remove references.
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 53113166b9c..361af71653c 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -5064,6 +5064,36 @@ hppa_fetch_pointer_argument (struct frame_info *frame, int argi,
return addr;
}
+/* Here is a table of C type sizes on hppa with various compiles
+ and options. I measured this on PA 9000/800 with HP-UX 11.11
+ and these compilers:
+
+ /usr/ccs/bin/cc HP92453-01 A.11.01.21
+ /opt/ansic/bin/cc HP92453-01 B.11.11.28706.GP
+ /opt/aCC/bin/aCC B3910B A.03.45
+ gcc gcc 3.3.2 native hppa2.0w-hp-hpux11.11
+
+ cc : 1 2 4 4 8 : 4 8 -- : 4 4
+ ansic +DA1.1 : 1 2 4 4 8 : 4 8 16 : 4 4
+ ansic +DA2.0 : 1 2 4 4 8 : 4 8 16 : 4 4
+ ansic +DA2.0W : 1 2 4 8 8 : 4 8 16 : 8 8
+ acc +DA1.1 : 1 2 4 4 8 : 4 8 16 : 4 4
+ acc +DA2.0 : 1 2 4 4 8 : 4 8 16 : 4 4
+ acc +DA2.0W : 1 2 4 8 8 : 4 8 16 : 8 8
+ gcc : 1 2 4 4 8 : 4 8 16 : 4 4
+
+ Each line is:
+
+ compiler and options
+ char, short, int, long, long long
+ float, double, long double
+ char *, void (*)()
+
+ So all these compilers use either ILP32 or LP64 model.
+ TODO: gcc has more options so it needs more investigation.
+
+ -- chastain 2003-12-18 */
+
static struct gdbarch *
hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
@@ -5144,9 +5174,13 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_register_bytes
(gdbarch, gdbarch_num_regs (gdbarch) * tdep->bytes_per_address);
set_gdbarch_long_bit (gdbarch, tdep->bytes_per_address * TARGET_CHAR_BIT);
- set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_ptr_bit (gdbarch, tdep->bytes_per_address * TARGET_CHAR_BIT);
+ /* The following gdbarch vector elements are the same in both ILP32
+ and LP64, but might show differences some day. */
+ set_gdbarch_long_long_bit (gdbarch, 64);
+ set_gdbarch_long_double_bit (gdbarch, 128);
+
/* The following gdbarch vector elements do not depend on the address
size, or in any other gdbarch element previously set. */
set_gdbarch_function_start_offset (gdbarch, 0);