Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/tdep] Fix gdb.base/watchpoint-running on {arm, ppc64le}-linux
Date: Thu, 20 Jun 2024 19:15:13 +0100	[thread overview]
Message-ID: <e94756ae-be98-443d-8a27-66a9c2672031@palves.net> (raw)
In-Reply-To: <88e14e37-9fbd-4dfb-ac37-6bee23eff372@suse.de>

On 2024-06-17 19:22, Tom de Vries wrote:
> On 6/14/24 18:49, Pedro Alves wrote:

>> And, from another angle, why isn't aarch64 doing the same, why two mechanisms?
> 
> Well, the patch adds a fallback, that aarch64 doesn't need, but that powerpc and arm do need.  
> 

Aarch64 absolutely needs it, it's just that it already has the fix in place (by checking early in
post_startup_inferior/post_attach).  We're adding code to the other backends to handle it too, but using a
somewhat different solution.  If arm / ppc were being adjusted to use the same approach as aarch64 (like in a
previous patch in bugzilla), then I wouldn't have asked that question.  I see no good reason for multiple ways
of doing the same thing.

> There might be other targets that needs such a fallback, but that we don't know about.

We have a testcase that will show us if so.

> So, I don't mind your patch, it's certainly cleaner, but I don't mind a functional default implementation either.  
> So, I'd move the target_can_use_hardware_watchpoint call to the default implementation of low_init_process.

I'd rather not.  Let low level handle low level things using low level details.

> I ran into trouble building the patch due to type of pid parameter mismatches.
> 
> After fixing that, I ran into trouble on ppc64le, because low_prepare_to_resume is called before low_init_process.  

I guess it's while running through the shell, now that I think about it.

> I fixed that by sinking this code in the function a bit:
> ...
>   if (m_dreg_interface.unavailable_p ())
>     return;
> ...

Makes sense.

> 
> And after fixing this, I still ran into failures and identified at least two more locations that needed fixing due to the cleanup, at which point I decided that the cleanup part is out-of-scope for the patch fixing the PR.

OK.

> 
> So, this is what I have tested on x86_64-linux, aarch64-linux, arm-linux and ppc64le-linux.

OK, let's go with this, then.  Thank for testing!

Pedro Alves

  parent reply	other threads:[~2024-06-20 18:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07  6:35 Tom de Vries
2024-06-07 10:18 ` Luis Machado
2024-06-07 12:05   ` Tom de Vries
2024-06-13  9:07     ` Tom de Vries
2024-06-13  9:08       ` Luis Machado
2024-06-14 16:49 ` Pedro Alves
2024-06-17 18:22   ` Tom de Vries
2024-06-20 13:49     ` Tom de Vries
2024-06-20 18:15     ` Pedro Alves [this message]
2024-06-21  9:43       ` Tom de Vries
2024-06-21 12:44         ` Pedro Alves
2024-06-21 14:51           ` Tom de Vries

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=e94756ae-be98-443d-8a27-66a9c2672031@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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