From: Philipp Rudo <prudo@linux.vnet.ibm.com>
To: "Ulrich Weigand" <uweigand@de.ibm.com>
Cc: qiyaoltc@gmail.com (Yao Qi),
gdb-patches@sourceware.org,
arnez@linux.vnet.ibm.com (Andreas Arnez)
Subject: Re: [PATCH v2 01/11] s390: Remove duplicate checks for cached gdbarch@init
Date: Thu, 07 Dec 2017 09:18:00 -0000 [thread overview]
Message-ID: <20171207101758.4b32fe1c@ThinkPad> (raw)
In-Reply-To: <20171206102823.13EF7D80322@oc3748833570.ibm.com>
Hi Yao,
I quickly talked to Uli yesterday about this and you and Uli are right. There
is a possibility that a program chooses not to use the vector registers for
their abi even when they are present. I fixed the patch locally.
Thanks for catching this!
Philipp
On Wed, 6 Dec 2017 11:28:23 +0100 (CET)
"Ulrich Weigand" <uweigand@de.ibm.com> wrote:
> Philipp Rudo wrote:
>
> > On Tue, 05 Dec 2017 16:16:07 +0000
> > Yao Qi <qiyaoltc@gmail.com> wrote:
> > > 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).
> >
> > For s390 there only is one vector abi (or non at all) at the time. If you were
> > debugging two different executables at the same time you would have two
> > inferiors each with its own gdbarch (same would be for multi-target debugging).
> > So I don't think those are the reasons.
>
> Actually, I think Yao is right here. As you say, we can have two executables,
> one using the vector ABI and one not. These will require two different gdbarch
> structures. But with the patch you propose, when trying to allocate the second
> of those two, GDB would see the first one that was already created earlier,
> and incorrectly assume that it can simply be reused.
>
> Basically, the problem is that there *can* be different gdbarchs that share
> the *same* tdesc, but differ in vector ABI. Therefore *only* checking for
> tdesc does not suffice to correctly identify cached gdbarch structures.
>
> I agree that it is redundant to again check differences (e.g. in register set)
> that would already have led to a different tdesc; but the vector ABI at least
> is not one of those.
>
> Bye,
> Ulrich
>
next prev parent reply other threads:[~2017-12-07 9:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 12:29 [PATCH v2 00/11] Split up s390-linux-tdep.c Philipp Rudo
2017-12-05 12:29 ` [PATCH v2 06/11] s390: if -> gdb_assert for tdesc_has_registers check Philipp Rudo
2017-12-05 12:29 ` [PATCH v2 07/11] s390: Hook s390 into OSABI mechanism Philipp Rudo
2017-12-05 13:21 ` Ulrich Weigand
2017-12-05 17:06 ` Philipp Rudo
2017-12-05 17:44 ` Ulrich Weigand
2017-12-06 11:39 ` Philipp Rudo
2017-12-05 12:29 ` [PATCH v2 01/11] s390: Remove duplicate checks for cached gdbarch at init Philipp Rudo
2017-12-05 16:16 ` Yao Qi
2017-12-06 9:56 ` Philipp Rudo
2017-12-06 10:28 ` [PATCH v2 01/11] s390: Remove duplicate checks for cached gdbarch@init Ulrich Weigand
2017-12-07 9:18 ` Philipp Rudo [this message]
2017-12-07 9:59 ` Yao Qi
2017-12-05 12:29 ` [PATCH v2 03/11] s390: gdbarch_tdep.have_* int -> bool Philipp Rudo
2017-12-05 12:29 ` [PATCH v2 10/11] s390: Add comments to uncommented functions in s390-tdep.c Philipp Rudo
2017-12-05 12:29 ` [PATCH v2 11/11] s390: Add comments to uncommented functions in s390-linux-tdep.c Philipp Rudo
2017-12-05 12:29 ` [PATCH v2 04/11] s390: gdbarch_tdep add field tdesc Philipp Rudo
2017-12-05 12:29 ` [PATCH v2 02/11] s390: Allocate gdbarch & tdep at start of gdbarch init Philipp Rudo
2017-12-05 12:29 ` [PATCH v2 05/11] s390: Move tdesc validation to separate function Philipp Rudo
2017-12-05 12:29 ` [PATCH v2 09/11] s390: Clean up s390-linux-tdep.c Philipp Rudo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171207101758.4b32fe1c@ThinkPad \
--to=prudo@linux.vnet.ibm.com \
--cc=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox