diff options
author | Philipp Rudo <prudo@linux.vnet.ibm.com> | 2018-01-30 17:10:08 +0100 |
---|---|---|
committer | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2018-01-30 17:10:08 +0100 |
commit | c81e88797907fc0698abec09767e49cee33b2bd5 (patch) | |
tree | 38e91d3ab77eb9a0820eb15f2893f83a6c6e96ba /gdb/s390-tdep.h | |
parent | e671cd59d74cec9f53e110ce887128d1eeadb7f2 (diff) | |
download | gdb-c81e88797907fc0698abec09767e49cee33b2bd5.zip gdb-c81e88797907fc0698abec09767e49cee33b2bd5.tar.gz gdb-c81e88797907fc0698abec09767e49cee33b2bd5.tar.bz2 |
s390: Fix gdb.base/all-architectures.exp with --enable-targets=all
With 7042632bf79 (s390: Hook s390 into OSABI mechanism) assigning a
default target description was moved from s390_gdbarch_init to
s390_linux_init_abi_*. This causes problems when GDB is built with
--enable-targets=all and the user sets an unsupported OSABI, e.g. "set
osabi AIX". In this case there is no valid tdesc, and GDB crashes with an
internal error. Fix this by reverting parts of 7042632bf79.
gdb/ChangeLog:
* s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
"features/s390x-linux64.c".
(_initialize_s390_linux_tdep): Remove initialization of tdescs
s390_linux32 and s390x_linux64.
(s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
default tdesc.
* s390-tdep.c: Include "features/s390-linux32.c" and
"features/s390x-linux64.c".
(s390_tdesc_valid): Add check for tdesc_has_registers.
(s390_gdbarch_init): Make sure there is always a valid tdesc.
(_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
tdesc_s390x_linux64.
* s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
tdesc_s390x_linux64 to...
* s390-tdep.h: ...here.
Diffstat (limited to 'gdb/s390-tdep.h')
-rw-r--r-- | gdb/s390-tdep.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/s390-tdep.h b/gdb/s390-tdep.h index 4a44da0..14530ce 100644 --- a/gdb/s390-tdep.h +++ b/gdb/s390-tdep.h @@ -315,4 +315,7 @@ extern struct value *s390_trad_frame_prev_register (struct frame_info *this_frame, struct trad_frame_saved_reg saved_regs[], int regnum); +extern struct target_desc *tdesc_s390_linux32; +extern struct target_desc *tdesc_s390x_linux64; + #endif /* S390_TDEP_H */ |