From: Andrew Burgess <aburgess@redhat.com>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCHv3] gdb/python: fix 'exited' event when GDB exits from core file debugging
Date: Sun, 14 Jun 2026 22:06:38 +0100 [thread overview]
Message-ID: <87ldcgq1b5.fsf@redhat.com> (raw)
In-Reply-To: <47b2f267-ffcc-48a8-904c-0af5092c8df1@palves.net>
Pedro Alves <pedro@palves.net> writes:
> 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>
I made the fixes you and Lancelot suggested and pushed this patch.
Thanks,
Andrew
next prev parent reply other threads:[~2026-06-14 21:07 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
2026-06-14 21:06 ` Andrew Burgess [this message]
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=87ldcgq1b5.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
/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