This adds s390_gcc_target_options, an implementation of the new
"gcc_target_options" gdbarch method. This was needed because the
default implementation of the method doesn't work properly for S390,
as this architecture needs "-m31" rather than "-m32".
gdb/ChangeLog
2014-12-12 Jan Kratochvil <jan.kratochvil@redhat.com>
* s390-linux-tdep.c (s390_gcc_target_options): New function.
(s390_gdbarch_init): Add it to gdbarch.
+2014-12-12 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * s390-linux-tdep.c (s390_gcc_target_options): New function.
+ (s390_gdbarch_init): Add it to gdbarch.
+
2014-12-12 Jan Kratochvil <jan.kratochvil@redhat.com>
* linux-tdep.c: Include objfiles.h and infcall.h.
return 0;
}
+/* Implement gdbarch_gcc_target_options. GCC does not know "-m32". */
+
+static char *
+s390_gcc_target_options (struct gdbarch *gdbarch)
+{
+ return xstrdup ("-m31");
+}
+
/* Implementation of `gdbarch_stap_is_single_operand', as defined in
gdbarch.h. */
{
case ABI_LINUX_S390:
set_gdbarch_addr_bits_remove (gdbarch, s390_addr_bits_remove);
+ set_gdbarch_gcc_target_options (gdbarch, s390_gcc_target_options);
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_ilp32_fetch_link_map_offsets);