* [PATCH] Adjust gdb.arch/amd64-watchpoint-downgrade.exp for Cygwin
@ 2025-06-06 16:59 Pedro Alves
2025-06-06 17:29 ` Kevin Buettner
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2025-06-06 16:59 UTC (permalink / raw)
To: gdb-patches
The gdb.arch/amd64-watchpoint-downgrade.exp testcase is assuming the
output of debugging a single-thread program, like so, on e.g.,
GNU/Linux:
starti
Starting program: .../gdb.arch/amd64-watchpoint-downgrade/amd64-watchpoint-downgrade
warning: watchpoint 1 downgraded to software watchpoint
Program stopped.
0x00007ffff7fe32b0 in _start () from /lib64/ld-linux-x86-64.so.2
However, on Cygwin, where all inferiors are multi-threaded (because
both Windows and the Cygwin runtime spawn a few helper threads), we
get:
starti
Starting program: .../gdb.arch/amd64-watchpoint-downgrade/amd64-watchpoint-downgrade
[New Thread 4652.0x17e4]
warning: watchpoint 1 downgraded to software watchpoint
Thread 1 stopped.
0x00007ffbfc1c0911 in ntdll!LdrInitShimEngineDynamic () from C:/Windows/SYSTEM32/ntdll.dll
This commit adjusts the testcase to work with either output.
Change-Id: I3aedfec04924ea3fb3bb87ba3251e2b720f8d59c
---
gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.exp b/gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.exp
index dcee0407094..72db13e141c 100644
--- a/gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.exp
+++ b/gdb/testsuite/gdb.arch/amd64-watchpoint-downgrade.exp
@@ -58,7 +58,7 @@ gdb_test "starti" \
[multi_line \
"warning: watchpoint $num downgraded to software watchpoint" \
"" \
- "Program stopped\\." \
+ "(Program|Thread 1) stopped\\." \
".*"]
# Watchpoint should now have downgraded to a s/w watchpoint.
--
2.49.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Adjust gdb.arch/amd64-watchpoint-downgrade.exp for Cygwin
2025-06-06 16:59 [PATCH] Adjust gdb.arch/amd64-watchpoint-downgrade.exp for Cygwin Pedro Alves
@ 2025-06-06 17:29 ` Kevin Buettner
2025-06-09 16:43 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2025-06-06 17:29 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
On Fri, 6 Jun 2025 17:59:30 +0100
Pedro Alves <pedro@palves.net> wrote:
> The gdb.arch/amd64-watchpoint-downgrade.exp testcase is assuming the
> output of debugging a single-thread program, like so, on e.g.,
> GNU/Linux:
>
> starti
> Starting program: .../gdb.arch/amd64-watchpoint-downgrade/amd64-watchpoint-downgrade
> warning: watchpoint 1 downgraded to software watchpoint
>
> Program stopped.
> 0x00007ffff7fe32b0 in _start () from /lib64/ld-linux-x86-64.so.2
>
> However, on Cygwin, where all inferiors are multi-threaded (because
> both Windows and the Cygwin runtime spawn a few helper threads), we
> get:
>
> starti
> Starting program: .../gdb.arch/amd64-watchpoint-downgrade/amd64-watchpoint-downgrade
> [New Thread 4652.0x17e4]
> warning: watchpoint 1 downgraded to software watchpoint
>
> Thread 1 stopped.
> 0x00007ffbfc1c0911 in ntdll!LdrInitShimEngineDynamic () from C:/Windows/SYSTEM32/ntdll.dll
>
> This commit adjusts the testcase to work with either output.
Approved-by: Kevin Buettner <kevinb@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Adjust gdb.arch/amd64-watchpoint-downgrade.exp for Cygwin
2025-06-06 17:29 ` Kevin Buettner
@ 2025-06-09 16:43 ` Pedro Alves
0 siblings, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2025-06-09 16:43 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
Pushed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-09 16:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-06 16:59 [PATCH] Adjust gdb.arch/amd64-watchpoint-downgrade.exp for Cygwin Pedro Alves
2025-06-06 17:29 ` Kevin Buettner
2025-06-09 16:43 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox