Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Pedro Alves <palves@redhat.com>
Cc: Tom Tromey <tom@tromey.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Release the GIL while running a gdb command or expression
Date: Tue, 16 Oct 2018 21:39:00 -0000	[thread overview]
Message-ID: <87woqhbmh6.fsf@tromey.com> (raw)
In-Reply-To: <4aa9c215-9b86-40f9-37e9-d96121e80736@redhat.com> (Pedro Alves's	message of "Tue, 16 Oct 2018 15:51:27 +0100")

Pedro> Hopefully it'll be possible to tighten the test a bit to avoid that.

I should have read the test more closely.  It doesn't do what it claims
to do at all.

The only way the test can fail is if one "Hello" or "Sleeping" line
comes with the wrong number:

	set n $expect_out(1,string)
	if { $hello_last + 1 != $n } {
	    fail $test

But this just isn't possible.

Also the Python code is calling print on a gdb stream in a background
thread, which is a no-no.

I could change the test to do some kind of counting in a background
thread.  But that would introduce a race, which is what I was concerned
about up-thread... I couldn't think of a non-racy way to test this.

Maybe that's better than nothing.  Anyway, we're back to square one and
I don't know what to do really.

Tom


  reply	other threads:[~2018-10-16 21:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 20:23 Tom Tromey
2018-10-12 14:52 ` Phil Muldoon
2018-10-12 16:49 ` Pedro Alves
2018-10-12 16:51   ` Pedro Alves
2018-10-16 12:48   ` Tom Tromey
2018-10-16 14:50     ` Pedro Alves
2018-10-12 16:56 ` Pedro Alves
2018-10-16 13:05   ` Tom Tromey
2018-10-16 14:51     ` Pedro Alves
2018-10-16 21:39       ` Tom Tromey [this message]
2018-10-16 21:45         ` Tom Tromey
2018-10-24 18:08           ` Pedro Alves
2018-10-25 12:46             ` Phil Muldoon
2018-11-04 15:54             ` Tom Tromey
2019-01-29 13:02               ` Tom Tromey

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=87woqhbmh6.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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