gdb/arm: Use type_align instead of arm_type_align
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 12 Apr 2019 13:25:32 +0000 (14:25 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 23 Apr 2019 21:02:59 +0000 (22:02 +0100)
commit030197b43cd8ccfe6869f798dd39fa27a29c0e01
treee5557f32d55efcda6dba06c458faadaaad83d9d8
parentb907456c3eb8a08f6b211f66abb448df962749e1
gdb/arm: Use type_align instead of arm_type_align

Replaces use of arm_type_align with common type_align function.

Doing this fixes a bug in arm_type_align where static fields are
considered as part of the alignment calculation of a struct, which
results in arguments passed on the stack being misaligned, this bug
was causing a failure in gdb.cp/many-args.exp.

Part of the old arm_type_align is retained and used as the gdbarch
type align callback in order to correctly align vectors.

gdb/ChangeLog:

* arm-tdep.c (arm_type_align): Only handle vector override case.
(arm_push_dummy_call): Use type_align.
(arm_gdbarch_init): Register arm_type_align gdbarch function.
gdb/ChangeLog
gdb/arm-tdep.c