Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] gdb, testsuite: use -no-prompt-anchor in step-over-thread-exit.exp
Date: Fri, 24 Apr 2026 16:19:55 +0200	[thread overview]
Message-ID: <20260424141955.4083734-1-tankut.baris.aktemur@intel.com> (raw)

Running gdb.threads/step-over-thread-exit.exp with the
native-gdbserver boardfile sometimes fails with

  p $_thread == 2
  $1 = 1
  (gdb) [New Thread 2790806.2790823 (id 3)]

  Thread 3 "step-over-threa" hit Breakpoint 2, 0x00005555555552ab in my_exit_syscall () at /.../testsuite/lib/my-syscalls.S:85
  85      SYSCALL (my_exit, __NR_exit)
  FAIL: gdb.threads/step-over-thread-exit.exp: step_over_mode=inline: non-stop=on: target-non-stop=on: schedlock=off: cmd=next: ns_stop_all=0: selected thread didn't change (timeout)

The passing case is

  p $_thread == 2
  $1 = 1
  (gdb) PASS: gdb.threads/step-over-thread-exit.exp: step_over_mode=inline: non-stop=on: target-non-stop=on: schedlock=off: cmd=next: ns_stop_all=0: selected thread didn't change
  Remote debugging from host 127.0.0.1, port 32932
  [New Thread 2784047.2784049 (id 3)]

  Thread 3 "step-over-threa" hit Breakpoint 2, 0x00005555555552ab in my_exit_syscall () at /.../testsuite/lib/my-syscalls.S:85
  85      SYSCALL (my_exit, __NR_exit)

Fix the problem by using -no-prompt-anchor.  Since this is non-stop
mode, it should be ok to use the flag.
---
 gdb/testsuite/gdb.threads/step-over-thread-exit.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.threads/step-over-thread-exit.exp b/gdb/testsuite/gdb.threads/step-over-thread-exit.exp
index f398538058d..1dd1191afdc 100644
--- a/gdb/testsuite/gdb.threads/step-over-thread-exit.exp
+++ b/gdb/testsuite/gdb.threads/step-over-thread-exit.exp
@@ -185,7 +185,7 @@ proc test {step_over_mode non-stop target-non-stop schedlock cmd ns_stop_all} {
 			pass $gdb_test_name
 		    }
 		}
-		gdb_test "p \$_thread == $thread" "= 1" \
+		gdb_test -no-prompt-anchor "p \$_thread == $thread" "= 1" \
 		    "selected thread didn't change"
 	    }
 	} else {
-- 
2.34.1

Intel Deutschland GmbH
Registered Address: Dornacher Strasse 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 Muenchen HRB 186928


             reply	other threads:[~2026-04-24 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24 14:19 Tankut Baris Aktemur [this message]
2026-04-27 20:44 ` Simon Marchi
2026-05-06 20:31   ` Simon Marchi

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=20260424141955.4083734-1-tankut.baris.aktemur@intel.com \
    --to=tankut.baris.aktemur@intel.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