mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-01 11:59:27 +08:00
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.
This commit is contained in:

committed by
Andreas Arnez

parent
e671cd59d7
commit
c81e887979
@ -48,7 +48,6 @@ extern const struct regset s390_gs_regset;
|
||||
extern const struct regset s390_gsbc_regset;
|
||||
|
||||
/* GNU/Linux target descriptions. */
|
||||
extern struct target_desc *tdesc_s390_linux32;
|
||||
extern struct target_desc *tdesc_s390_linux32v1;
|
||||
extern struct target_desc *tdesc_s390_linux32v2;
|
||||
extern struct target_desc *tdesc_s390_linux64;
|
||||
@ -58,7 +57,6 @@ extern struct target_desc *tdesc_s390_te_linux64;
|
||||
extern struct target_desc *tdesc_s390_vx_linux64;
|
||||
extern struct target_desc *tdesc_s390_tevx_linux64;
|
||||
extern struct target_desc *tdesc_s390_gs_linux64;
|
||||
extern struct target_desc *tdesc_s390x_linux64;
|
||||
extern struct target_desc *tdesc_s390x_linux64v1;
|
||||
extern struct target_desc *tdesc_s390x_linux64v2;
|
||||
extern struct target_desc *tdesc_s390x_te_linux64;
|
||||
|
Reference in New Issue
Block a user