This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 01/11] s390: Remove duplicate checks for cached gdbarch at init
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Philipp Rudo <prudo at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org, Andreas Arnez <arnez at linux dot vnet dot ibm dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Tue, 05 Dec 2017 16:16:07 +0000
- Subject: Re: [PATCH v2 01/11] s390: Remove duplicate checks for cached gdbarch at init
- Authentication-results: sourceware.org; auth=none
- References: <20171205122859.2919-1-prudo@linux.vnet.ibm.com> <20171205122859.2919-2-prudo@linux.vnet.ibm.com>
Philipp Rudo <prudo@linux.vnet.ibm.com> writes:
> - /* Find a candidate among extant architectures. */
> - for (arches = gdbarch_list_lookup_by_info (arches, &info);
> - arches != NULL;
> - arches = gdbarch_list_lookup_by_info (arches->next, &info))
> - {
> - tdep = gdbarch_tdep (arches->gdbarch);
> - if (!tdep)
> - continue;
> - if (tdep->abi != tdep_abi)
> - continue;
> - if (tdep->vector_abi != vector_abi)
> - continue;
Is it possible that we have two instances of gdbarch, with the same
target description, but different vector_abi? Two different executables
compiled with different vector abis, and GDB can debug them together
(multi-process debugging. If we consider multi-target debugging in the
future, these two executable can from different targets).
> - 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;
> - }
--
Yao (齐尧)