s390: Hook s390 into OSABI mechanism
authorPhilipp Rudo <prudo@linux.vnet.ibm.com>
Tue, 23 Jan 2018 12:37:43 +0000 (13:37 +0100)
committerAndreas Arnez <arnez@linux.vnet.ibm.com>
Tue, 23 Jan 2018 12:37:43 +0000 (13:37 +0100)
commit7042632bf7976d29889ba89fe4867654c5f38e2d
tree73313b367a98aaab7aa0f43048ff06070ff7a892
parent650f5e137006fb7aea98e33d2ca9c6ac6712334c
s390: Hook s390 into OSABI mechanism

Do what the title says and distinguish between 31- and 64-bit systems.
The goal is to init the OSABI as late as possible in gdbarch_init so the
OSABI has the chance to overwrite the defaults.

There are two pitfalls to be aware of:

First, the dwarf2 unwinder must be appended before the OSABI is
initialized.  Otherwise the OS could add a default unwinder which always
takes control before the dwarf unwinder even gets a chance.

Second, tdesc_use_registers has to be handled with extra care.  It sets
several gdbarch hooks, especially gdbarch_register_name, which has to be
overwritten again after the call.  Furthermore it deletes the tdesc_data
without checking.  Therefore there must not be a call to
tdesc_data_cleanup afterwards or GDB will crash with a double free.

gdb/ChangeLog:

* s390-linux-tdep.c (osabi.h): New include.
(s390_linux_init_abi_31, s390_linux_init_abi_64)
(s390_linux_init_abi_any): New functions.
(s390_gdbarch_init, _initialize_s390_tdep): Adjust.
gdb/ChangeLog
gdb/s390-linux-tdep.c
This page took 0.037038 seconds and 4 git commands to generate.