* [PUSHED] gdb/testsuite: small fix for amd64-extended-prologue-analysis.exp
@ 2025-09-08 9:25 Andrew Burgess
2025-09-08 9:31 ` Andrew Burgess
2025-09-08 13:48 ` Tom de Vries
0 siblings, 2 replies; 3+ messages in thread
From: Andrew Burgess @ 2025-09-08 9:25 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Burgess
I noticed I was sometimes getting this failure:
FAIL: gdb.arch/amd64-extended-prologue-analysis.exp: offset \
initialization: ASM source: gdb_breakpoint: set breakpoint \
at *0x0000000000401151
The problem was introduced in commit:
commit f9aa48dc545ef511e19f4dfab88a196b820fd2da
Date: Thu Aug 28 11:50:13 2025 +0000
gdb, amd64: extend the amd64 prologue analyzer to skip register pushes
A gdb_test_multiple exits early when processing the results of a
'disassemble' command, without waiting for the prompt to be seen.
This can leave unhandled output in expect's input buffer, which will
then throw off the next test.
Update the gdb_test_multiple to wait for the prompt before declaring
the test passed.
After this I'm no longer seeing the above failure.
There should be no change in what is tested after this commit.
---
.../gdb.arch/amd64-extended-prologue-analysis.exp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp b/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
index b2fcbe66034..356afc7e668 100644
--- a/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
+++ b/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
@@ -59,9 +59,13 @@ proc offset_test_run {} {
set addr_past_prologue "null"
gdb_test_multiple "disassemble" "Disassemble foo" -lbl {
- -re "($::hex) <\\+($::decimal)>:\\s*mov.*" {
+ -re "\r\n\\s*($::hex) <\\+($::decimal)>:\\s*mov.*(?=\r\n)" {
set addr_past_prologue $expect_out(1,string)
- pass $gdb_test_name
+ exp_continue
+ }
+
+ -re -wrap "" {
+ gdb_assert { $addr_past_prologue ne "null" } $gdb_test_name
}
}
base-commit: 5d0ac9ee8fd007e90ba3fef3b95fd756cc191401
--
2.47.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PUSHED] gdb/testsuite: small fix for amd64-extended-prologue-analysis.exp
2025-09-08 9:25 [PUSHED] gdb/testsuite: small fix for amd64-extended-prologue-analysis.exp Andrew Burgess
@ 2025-09-08 9:31 ` Andrew Burgess
2025-09-08 13:48 ` Tom de Vries
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Burgess @ 2025-09-08 9:31 UTC (permalink / raw)
To: gdb-patches
Andrew Burgess <aburgess@redhat.com> writes:
> I noticed I was sometimes getting this failure:
>
> FAIL: gdb.arch/amd64-extended-prologue-analysis.exp: offset \
> initialization: ASM source: gdb_breakpoint: set breakpoint \
> at *0x0000000000401151
>
> The problem was introduced in commit:
>
> commit f9aa48dc545ef511e19f4dfab88a196b820fd2da
> Date: Thu Aug 28 11:50:13 2025 +0000
>
> gdb, amd64: extend the amd64 prologue analyzer to skip register pushes
>
> A gdb_test_multiple exits early when processing the results of a
> 'disassemble' command, without waiting for the prompt to be seen.
> This can leave unhandled output in expect's input buffer, which will
> then throw off the next test.
>
> Update the gdb_test_multiple to wait for the prompt before declaring
> the test passed.
>
> After this I'm no longer seeing the above failure.
>
> There should be no change in what is tested after this commit.
I've also pushed this to the gdb-17-branch.
Thanks,
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PUSHED] gdb/testsuite: small fix for amd64-extended-prologue-analysis.exp
2025-09-08 9:25 [PUSHED] gdb/testsuite: small fix for amd64-extended-prologue-analysis.exp Andrew Burgess
2025-09-08 9:31 ` Andrew Burgess
@ 2025-09-08 13:48 ` Tom de Vries
1 sibling, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2025-09-08 13:48 UTC (permalink / raw)
To: Andrew Burgess, gdb-patches
On 9/8/25 11:25, Andrew Burgess wrote:
> I noticed I was sometimes getting this failure:
>
> FAIL: gdb.arch/amd64-extended-prologue-analysis.exp: offset \
> initialization: ASM source: gdb_breakpoint: set breakpoint \
> at *0x0000000000401151
>
> The problem was introduced in commit:
>
> commit f9aa48dc545ef511e19f4dfab88a196b820fd2da
> Date: Thu Aug 28 11:50:13 2025 +0000
>
> gdb, amd64: extend the amd64 prologue analyzer to skip register pushes
>
> A gdb_test_multiple exits early when processing the results of a
> 'disassemble' command, without waiting for the prompt to be seen.
> This can leave unhandled output in expect's input buffer, which will
> then throw off the next test.
>
> Update the gdb_test_multiple to wait for the prompt before declaring
> the test passed.
>
> After this I'm no longer seeing the above failure.
>
Hi Andrew,
thanks for fixing this.
I've managed to reproduce the problem reliably using check-read1, and
verified that the patch fixes it.
Thanks,
- Tom
> There should be no change in what is tested after this commit.
> ---
> .../gdb.arch/amd64-extended-prologue-analysis.exp | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp b/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
> index b2fcbe66034..356afc7e668 100644
> --- a/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
> +++ b/gdb/testsuite/gdb.arch/amd64-extended-prologue-analysis.exp
> @@ -59,9 +59,13 @@ proc offset_test_run {} {
>
> set addr_past_prologue "null"
> gdb_test_multiple "disassemble" "Disassemble foo" -lbl {
> - -re "($::hex) <\\+($::decimal)>:\\s*mov.*" {
> + -re "\r\n\\s*($::hex) <\\+($::decimal)>:\\s*mov.*(?=\r\n)" {
> set addr_past_prologue $expect_out(1,string)
> - pass $gdb_test_name
> + exp_continue
> + }
> +
> + -re -wrap "" {
> + gdb_assert { $addr_past_prologue ne "null" } $gdb_test_name
> }
> }
>
>
> base-commit: 5d0ac9ee8fd007e90ba3fef3b95fd756cc191401
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-08 13:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-08 9:25 [PUSHED] gdb/testsuite: small fix for amd64-extended-prologue-analysis.exp Andrew Burgess
2025-09-08 9:31 ` Andrew Burgess
2025-09-08 13:48 ` Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox