s390: Allocate gdbarch & tdep at start of gdbarch_init
authorPhilipp Rudo <prudo@linux.vnet.ibm.com>
Tue, 23 Jan 2018 12:37:41 +0000 (13:37 +0100)
committerAndreas Arnez <arnez@linux.vnet.ibm.com>
Tue, 23 Jan 2018 12:37:41 +0000 (13:37 +0100)
commit21f6f5ffc652e116e518fee29ebdc8fbfeeaa734
treecc7a9cf5c0f5bc60eb33225439ba38c068c81962
parent0eb97953adcb12aa49e4924d1e28ce6af046d6e2
s390: Allocate gdbarch & tdep at start of gdbarch_init

Moving the allocation of gdbarch_tdep to the start of s390_gdbarch_init
allows us to use its fields for tracking the different features instead of
using separate variables.  To make the code a little nicer move the actual
allocation and initialization to a separate function.  Also move the
allocation of gdbarch to keep the two together.

gdb/ChangeLog:

* s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
(gdbarch_tdep) <have_upper, have_vx>: New fields.
(s390_gdbarch_tdep_alloc): New function.
(s390_gdbarch_init): Allocate tdep at start and use its fields
instead of separate variables.
gdb/ChangeLog
gdb/s390-linux-tdep.c
This page took 0.024915 seconds and 4 git commands to generate.