diff options
author | Jeff Law <law@redhat.com> | 1996-08-07 16:05:19 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1996-08-07 16:05:19 +0000 |
commit | 0d43c8e71131733b3e5d50df8454b2fbd7ac0c76 (patch) | |
tree | 06cf45175c5cd1e0e7543f94bd91ec7e732cd598 | |
parent | * i386-dis.c (print_insn_i386): Actually return the correct value. (diff) | |
download | binutils-gdb-0d43c8e71131733b3e5d50df8454b2fbd7ac0c76.tar.gz binutils-gdb-0d43c8e71131733b3e5d50df8454b2fbd7ac0c76.tar.bz2 binutils-gdb-0d43c8e71131733b3e5d50df8454b2fbd7ac0c76.zip |
* valops.c (call_function_by_hand): Handle aligning stacks that
grow up correctly.
* config/pa/tm-hppa.h (USE_STRUCT_CONVENTION): Define.
(STACK_ALIGN): Define.
* hppa-tdep.c (hppa_alignof): Don't demand a minumim two byte
alignment on structs/unions.
Fixing assorted structure passing/return problems reported by the net.
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/config/pa/tm-hppa.h | 4 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2bf3ace3e66..63f8ea023bf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +Wed Aug 7 09:59:19 1996 Jeffrey A Law (law@cygnus.com) + + * valops.c (call_function_by_hand): Handle aligning stacks that + grow up correctly. + * config/pa/tm-hppa.h (USE_STRUCT_CONVENTION): Define. + (STACK_ALIGN): Define. + * hppa-tdep.c (hppa_alignof): Don't demand a minumim two byte + alignment on structs/unions. + Sun Aug 4 16:22:42 1996 Fred Fish <fnf@cygnus.com> * config/powerpc/nm-aix.h (PTRACE_ARG3_TYPE): Define to "int *", diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h index 5220c6466c7..61df3c5de5e 100644 --- a/gdb/config/pa/tm-hppa.h +++ b/gdb/config/pa/tm-hppa.h @@ -63,6 +63,8 @@ struct inferior_status; #define REG_STRUCT_HAS_ADDR(gcc_p,type) \ (TYPE_LENGTH (type) > 8) +#define USE_STRUCT_CONVENTION(gcc_p,type) (TYPE_LENGTH (type) > 8) + /* Offset from address of function to start of its code. Zero on most machines. */ @@ -664,3 +666,5 @@ extern int hpread_adjust_stack_address PARAMS ((CORE_ADDR)); probably much more common. (FIXME). */ #define COERCE_FLOAT_TO_DOUBLE (current_language -> la_language == language_c) + +#define STACK_ALIGN(ADDR) (((ADDR) + 7) & -8) diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 63183a4c0f1..77faf25ad72 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -1797,7 +1797,7 @@ hppa_alignof (type) return hppa_alignof (TYPE_FIELD_TYPE (type, 0)); case TYPE_CODE_STRUCT: case TYPE_CODE_UNION: - max_align = 2; + max_align = 1; for (i = 0; i < TYPE_NFIELDS (type); i++) { /* Bit fields have no real alignment. */ |