aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPhilipp Rudo <prudo@linux.vnet.ibm.com>2018-01-23 13:37:41 +0100
committerAndreas Arnez <arnez@linux.vnet.ibm.com>2018-01-23 13:37:41 +0100
commit0eb97953adcb12aa49e4924d1e28ce6af046d6e2 (patch)
treec7d3fe2964510f8cf654717dc4d32101c2c30891 /gdb
parentd820e164e4baccacd8d4e7e3761ec547402ae828 (diff)
downloadgdb-0eb97953adcb12aa49e4924d1e28ce6af046d6e2.zip
gdb-0eb97953adcb12aa49e4924d1e28ce6af046d6e2.tar.gz
gdb-0eb97953adcb12aa49e4924d1e28ce6af046d6e2.tar.bz2
s390: Remove duplicate checks for cached gdbarch at init
When initializing the gdbarch there is a check whether an appropriate gdbarch already exists in the gdbarch_list. Failing of some of the checks would lead to a different target description. However gdbarch_list_lookup_by_info already checks for if (info->target_desc != arches->gdbarch->target_desc) continue; Remove these duplicate checks. gdb/ChangeLog: * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks when looking for cached gdbarch and add comment for remaining.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/s390-linux-tdep.c9
2 files changed, 8 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b1e9f9f..da76bbe 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
+
+ * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
+ when looking for cached gdbarch and add comment for remaining.
+
2018-01-22 Pedro Alves <palves@redhat.com>
Sergio Durigan Junior <sergiodj@redhat.com>
diff --git a/gdb/s390-linux-tdep.c b/gdb/s390-linux-tdep.c
index b120d24..972b91f 100644
--- a/gdb/s390-linux-tdep.c
+++ b/gdb/s390-linux-tdep.c
@@ -8047,14 +8047,11 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep = gdbarch_tdep (arches->gdbarch);
if (!tdep)
continue;
- if (tdep->abi != tdep_abi)
- continue;
+ /* A program can 'choose' not to use the vector registers when they
+ are present. Leading to the same tdesc but different tdep and
+ thereby a different gdbarch. */
if (tdep->vector_abi != vector_abi)
continue;
- if ((tdep->gpr_full_regnum != -1) != have_upper)
- continue;
- if (tdep->have_gs != have_gs)
- continue;
if (tdesc_data != NULL)
tdesc_data_cleanup (tdesc_data);
return arches->gdbarch;