From: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>
To: Kevin Buettner <kevinb@redhat.com>,
Tankut Baris Aktemur via Gdb-patches <gdb-patches@sourceware.org>
Subject: RE: [PATCH v2] gdb/infrun: do not restart a stepped thread if not running (was: gdb/infrun: reset thread control's step info in end_stepping_range)
Date: Mon, 23 Feb 2026 10:34:06 +0000 [thread overview]
Message-ID: <DM4PR11MB7303CDC28A07B824FFD2978BC477A@DM4PR11MB7303.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20260221134458.51f80ad5@f42-zbm-amd>
Hi Kevin,
On Saturday, February 21, 2026 9:45 PM, Kevin Buettner wrote:
> Hi Baris,
>
> I've taken a look at your patch and have found a few nits that'll
> merit a v3, though some, I think, are due to changes made to the
> testing framework since you originally posted your patch.
>
> The C code looks okay to me, but posting a v3 with the testsuite nits
> fixed might get a few more pairs of eyes on it before it goes in.
Thank you.
> On Tue, 20 Jun 2023 17:24:55 +0200
> Tankut Baris Aktemur via Gdb-patches <gdb-patches@sourceware.org> wrote:
>
> [...]
> > diff --git a/gdb/testsuite/gdb.multi/detach-stepi.exp
> > b/gdb/testsuite/gdb.multi/detach-stepi.exp new file mode 100644
> > index 00000000000..28ef8c4f9f7
> > --- /dev/null
> > +++ b/gdb/testsuite/gdb.multi/detach-stepi.exp
> > @@ -0,0 +1,66 @@
> > +# This testcase is part of GDB, the GNU debugger.
> > +
> > +# Copyright 2022 Free Software Foundation, Inc.
>
> I think that the copyright year should be updated.
>
> [...]
> > +standard_testfile
> > +
> > +if {[use_gdb_stub]} {
> > + untested "using gdb stub"
> > + return 0
> > +}
>
> The above should be replaced with:
>
> require !use_gdb_stub
>
> Other tests in gdb.multi also use:
>
> require allow_multi_inferior_tests
>
> ...so I recommend adding this too.
I removed use_gdb_stub and added `require allow_multi_inferior_tests` only
because it checks for use_gdb_stub, too.
> > +
> > +if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
> > + return -1
> > +}
> > +
> > +if {![runto_main]} {
> > + return -1
> > +}
> > +
> > +delete_breakpoints
> > +
> > +# Setup inferior 2.
> > +gdb_test "add-inferior" "Added inferior .*" \
> > + "add empty inferior"
> > +gdb_test "inferior 2" "Switching to inferior .*" \
> > + "switch to inferior"
> > +
> > +gdb_load $binfile
> > +runto "a_function"
> > +gdb_test "info inferiors"
>
> Is there something that you want to look for with "info inferiors"?
> Or is it for debugging purposes?
It was only for logging purposes. I changed it to
gdb_test "info inferiors" ".*" "info inferiors for logging"
> > +
> > +# The bug for which this regression test is written appears in
> > +# schedule-multi mode.
> > +gdb_test_no_output "set schedule-multiple on"
> > +
> > +# Single-step the thread in Inferior 2, then detach Inferior 1.
> > +gdb_test "info threads" ".*" "threads before stepi"
> > +gdb_test "stepi"
>
> Is there some pattern which might be usefully matched for the stepi?
Nothing interesting, really. I added ".*" to make this clear.
> > +gdb_test "info threads" ".*" "threads after stepi"
> > +
> > +gdb_test "set debug infrun on"
>
> Use gdb_test_no_output for the above command.
I removed the command completely.
> > +gdb_test_multiple "detach inferior 1" "" {
> > + -re "resuming previously stepped thread.*$gdb_prompt" {
> > + fail $gdb_test_name
> > + }
> > + -re "$gdb_prompt $" {
> > + pass $gdb_test_name
> > + }
> > +}
I'll send v3 soon. Thanks for the review!
-Baris
Intel Deutschland GmbH
Registered Address: Dornacher Straße 1, 85622 Feldkirchen, Germany
Tel: +49 89 991 430, www.intel.de
Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell
Chairperson of the Supervisory Board: Nicole Lau
Registered Seat: Munich
Commercial Register: Amtsgericht München HRB 186928
next prev parent reply other threads:[~2026-02-23 10:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-20 15:24 Tankut Baris Aktemur via Gdb-patches
2023-06-21 12:35 ` Bruno Larsen via Gdb-patches
2023-06-22 7:02 ` Aktemur, Tankut Baris via Gdb-patches
2023-06-22 7:39 ` Bruno Larsen via Gdb-patches
2023-06-22 8:01 ` Aktemur, Tankut Baris via Gdb-patches
2023-11-21 20:00 ` Aktemur, Tankut Baris
2025-02-19 12:52 ` Aktemur, Tankut Baris
2025-03-18 18:11 ` Aktemur, Tankut Baris
2025-04-04 13:44 ` Aktemur, Tankut Baris
2025-04-23 7:59 ` Aktemur, Tankut Baris
2026-02-20 12:11 ` Aktemur, Tankut Baris
2026-02-21 20:44 ` Kevin Buettner
2026-02-23 10:34 ` Aktemur, Tankut Baris [this message]
2026-02-23 10:36 ` [PATCH v3] gdb/infrun: do not restart a stepped thread if not running Tankut Baris Aktemur
2026-02-28 18:33 ` Kevin Buettner
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=DM4PR11MB7303CDC28A07B824FFD2978BC477A@DM4PR11MB7303.namprd11.prod.outlook.com \
--to=tankut.baris.aktemur@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@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