public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Lancelot SIX <lsix@lancelotsix.com>
To: Tom de Vries <tdevries@suse.de>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb.threads/process-dies-while-detaching: disable with software watchpoint
Date: Sun, 26 Sep 2021 17:11:49 +0000	[thread overview]
Message-ID: <20210926171149.dyqkyt66dzzpi5rj@ubuntu.lan> (raw)
In-Reply-To: <b3b9cf3e-de3e-d180-1223-8793df24adf5@suse.de>

On Sun, Sep 26, 2021 at 11:54:02AM +0200, Tom de Vries wrote:
> On 9/22/21 11:40 PM, Lancelot SIX wrote:
> > Hi,
> > 
> > I had a look at your patch, it is for sure a better approach than mine.
> > 
> > At some point you change the order between the 'continue_to_exit_bp' and
> > 'watch' commands when forcing software watchpoint.  Any reason not to
> > use the same order for both cases?
> > 
> 
> Yes, because sw watchpoints are slow.

I mean I totally understand why it makes sense to move the 'watch'
command after continue_to_exit_bp when using software watchpoints. The
question was more is there a reason not to do the same for hardware
watchpoints?  I do not expect any 'gain' from doing the same with
hardware assisted watchpoint except having something similar in both
cases.

> 
> > 	(gdb) PASS: gdb.threads/process-dies-while-detaching.exp: single-process: continue: watchpoint:sw: watch globalvar
> > 	continue
> > 	Continuing.
> > 	[Thread 0x3fea68a150 (LWP 2358916) exited]
> > 	[...]
> > 	[Thread 0x3ff7ea5150 (LWP 2358889) exited]
> > 	KFAIL: gdb.threads/process-dies-while-detaching.exp: single-process: continue: watchpoint:sw: continue (timeout) (PRMS: gdb/28375)
> > 
> > This does not look like what you reported in PR28375.  I guess the
> > setup_kfail should be adjusted to account for the two way this test can
> > fail (I am not sure if they both come down to the same problem or not).
> > 
> 
> Is there a gdb prompt inbetween the PASS and KFAIL?

No. In the snippet I provided above, the '[...]' skips a bunch of
'[Thread 0xXXXXXXXXXX (LWP XXXXXXX) exited] ', and nothing else.

Looking into this I fixed an omission in the RISC-V prologue analyzer for which
I plan in submitting a patch later when I have found time to write a testcase
for it.  With this being fixed, the log for
gdb.threads/process-dies-while-detaching.exp becomes:

	watch globalvar
	Watchpoint 3: globalvar
	(gdb) PASS: gdb.threads/process-dies-while-detaching.exp: single-process: continue: watchpoint:sw: watch globalvar
	continue
	Continuing.
	Cannot access memory at address 0x3ff7f2e324
	(gdb) KFAIL: gdb.threads/process-dies-while-detaching.exp: single-process: continue: watchpoint:sw: continue (PRMS: gdb/28375)
	UNSUPPORTED: gdb.threads/process-dies-while-detaching.exp: single-process: continue: hw watchpoint

I’ll continue to work on this when possible.

Best,
Lancelot.
> 
> Thanks,
> - Tom

  reply	other threads:[~2021-09-26 17:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 20:24 Lancelot SIX
     [not found] ` <36b3309b-ed0a-5248-d47b-351e480345fc@suse.de>
2021-09-22 13:15   ` Tom de Vries
2021-09-22 21:40     ` Lancelot SIX
2021-09-26  9:54       ` Tom de Vries
2021-09-26 17:11         ` Lancelot SIX [this message]
2021-09-26 22:43           ` Tom de Vries
2021-09-27  8:21             ` Tom de Vries
2021-09-27 22:54               ` Lancelot SIX

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=20210926171149.dyqkyt66dzzpi5rj@ubuntu.lan \
    --to=lsix@lancelotsix.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).