Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Andrew Burgess <aburgess@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCHv3] gdb/python: fix 'exited' event when GDB exits from core file debugging
Date: Fri, 12 Jun 2026 15:38:19 +0100	[thread overview]
Message-ID: <47b2f267-ffcc-48a8-904c-0af5092c8df1@palves.net> (raw)
In-Reply-To: <7b7983979dfdb856c6968729ff8a4b37d90775aa.1781000323.git.aburgess@redhat.com>

Hi,

On 2026-06-09 11:19, Andrew Burgess wrote:

> +int
> +main (void)
> +{
> +  alarm (300);

Can you use gdb_watchdog, please?  It'll make this work on Windows too, in theory.
At least, the non-core parts of the tests.

> +# Load the Python script for this test.  Record the string
> +# representation of the current inferior.  Then exit GDB.  Ensure that
> +# during the exit we see a single Python 'exited' event associated
> +# with the expected inferior.
> +proc source_py_script_and_exit_checking_event {} {
> +    gdb_test_no_output "source $::remote_python_file" \
> +	"load python script"
> +
> +    set expected_inferior_string \
> +	[capture_command_output \
> +	     "python print(str(gdb.selected_inferior()))" ""]
> +
> +    set inferior_string ""
> +    set event_count 0
> +    gdb_test_multiple "with confirm off -- exit" "exit gdb" {

...

> +
> +	-re "^\[^\r\n\]*\r\n" {
> +	    exp_continue
> +	}

This looks like could use "-lbl".

Otherwise LGTM.

Approved-by: Pedro Alves <pedro@palves.net>


  reply	other threads:[~2026-06-12 14:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 16:47 [PATCH] " Andrew Burgess
2026-06-04 20:11 ` Lancelot SIX
2026-06-06 17:35   ` Andrew Burgess
2026-06-06 17:32 ` [PATCHv2] " Andrew Burgess
2026-06-09 10:19   ` [PATCHv3] " Andrew Burgess
2026-06-12 14:38     ` Pedro Alves [this message]
2026-06-14 21:06       ` Andrew Burgess
2026-06-12 13:49   ` [PATCHv2] " 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=47b2f267-ffcc-48a8-904c-0af5092c8df1@palves.net \
    --to=pedro@palves.net \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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