aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-tdep.c
diff options
context:
space:
mode:
authorMichael Chastain <mec@google.com>2003-12-18 22:13:48 +0000
committerMichael Chastain <mec@google.com>2003-12-18 22:13:48 +0000
commit8e8b2dbaae691494927c2022756771fb199f37da (patch)
tree754bfefc55215f19f6ff734f03696feed3327439 /gdb/hppa-tdep.c
parente584bbaf70a5e8304f3c2fe6f4cc0e66b04926ba (diff)
downloadgdb-8e8b2dbaae691494927c2022756771fb199f37da.zip
gdb-8e8b2dbaae691494927c2022756771fb199f37da.tar.gz
gdb-8e8b2dbaae691494927c2022756771fb199f37da.tar.bz2
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.
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r--gdb/hppa-tdep.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 5311316..361af71 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);