diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-09-17 20:10:48 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-09-17 20:10:48 +0000 |
commit | 957e27ac304624dc5b69175c99f8455a227dfdd2 (patch) | |
tree | b14e7296eb54931b49718c5b063da402d0138bfe /gdb/ppcnbsd-tdep.c | |
parent | 8ff944f699c63864de81ee4145405cbe811c5889 (diff) | |
download | gdb-957e27ac304624dc5b69175c99f8455a227dfdd2.zip gdb-957e27ac304624dc5b69175c99f8455a227dfdd2.tar.gz gdb-957e27ac304624dc5b69175c99f8455a227dfdd2.tar.bz2 |
2003-09-17 Andrew Cagney <cagney@redhat.com>
* ppcnbsd-tdep.c (ppcnbsd_use_struct_convention): New function.
(ppcnbsd_init_abi): Set "use_struct_convention" to
"ppcnbsd_use_struct_convention".
Diffstat (limited to 'gdb/ppcnbsd-tdep.c')
-rw-r--r-- | gdb/ppcnbsd-tdep.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c index 21ab858..97323d5 100644 --- a/gdb/ppcnbsd-tdep.c +++ b/gdb/ppcnbsd-tdep.c @@ -204,12 +204,30 @@ ppcnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name) return (nbsd_pc_in_sigtramp (pc, func_name)); } +/* NetBSD is confused. It appears that 1.5 was using the correct SVr4 + convention but, 1.6 switched to the below broken convention. For + the moment use the broken convention. Ulgh!. */ + +static int +ppcnbsd_use_struct_convention (int gcc_p, struct type *value_type) +{ + if ((TYPE_LENGTH (value_type) == 16 || TYPE_LENGTH (value_type) == 8) + && TYPE_VECTOR (value_type)) + return 0; + + return !(TYPE_LENGTH (value_type) == 1 + || TYPE_LENGTH (value_type) == 2 + || TYPE_LENGTH (value_type) == 4 + || TYPE_LENGTH (value_type) == 8); +} + static void ppcnbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) { set_gdbarch_pc_in_sigtramp (gdbarch, ppcnbsd_pc_in_sigtramp); + set_gdbarch_use_struct_convention (gdbarch, ppcnbsd_use_struct_convention); set_solib_svr4_fetch_link_map_offsets (gdbarch, nbsd_ilp32_solib_svr4_fetch_link_map_offsets); } |