aboutsummaryrefslogtreecommitdiff
path: root/gdb/s390-linux-tdep.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2014-05-14 14:33:41 -0600
committerJan Kratochvil <jan.kratochvil@redhat.com>2014-12-12 22:28:17 +0100
commita2658febe2016f875ffb70287904b01013bcca75 (patch)
tree21b338b20b1f310bfc30428aa9eb2c5fd709e2b2 /gdb/s390-linux-tdep.c
parent3bc3cebe8a597c4281cad70e806efe69b2031825 (diff)
downloadgdb-a2658febe2016f875ffb70287904b01013bcca75.zip
gdb-a2658febe2016f875ffb70287904b01013bcca75.tar.gz
gdb-a2658febe2016f875ffb70287904b01013bcca75.tar.bz2
add s390_gcc_target_options
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.
Diffstat (limited to 'gdb/s390-linux-tdep.c')
-rw-r--r--gdb/s390-linux-tdep.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
index b5d94ce..5dcf40c 100644
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -2808,6 +2808,14 @@ s390_address_class_name_to_type_flags (struct gdbarch *gdbarch,
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. */
@@ -3104,6 +3112,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
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);