From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Andrew Burgess <aburgess@redhat.com>
Cc: Tom Tromey <tom@tromey.com>,
gdb-patches@sourceware.org, Simon Marchi <simark@simark.ca>
Subject: Re: [PATCH v2] Require async support for DAP tests [PR34548]
Date: Mon, 07 Sep 2026 12:43:58 +0200 [thread overview]
Message-ID: <yddtso1fij5.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <87wlsxqx2u.fsf@redhat.com> (Andrew Burgess's message of "Mon, 07 Sep 2026 09:34:17 +0100")
Hi Andrew,
>>>> + gdb_test_multiple "continue &" "" {
>>>> + -re "Continuing..*" {
>>>> + set res 1
>>>> + }
>>>> + -re ".*Asynchronous execution not supported on this target..*" {
>>>> + set res 0
>>>> + }
>>>
>>> Both of these would be better written as '-re -wrap "....etc..."' adding
>>> the -wrap will cause the $gdb_prompt to be matched. I don't think it
>>> really matters in this case as you do call gdb_exit immediately after,
>>> so I think any pending output from GDB is discarded, but it does make
>>> the gdb.log a little neater, and so easier to grok.
>>
>> Unfortunately this doesn't work for the same reason I'd removed the
>> explicit $gdb_prompt anchor
>>
>> -re "Continuing\\.\r\n$gdb_prompt $" {
>>
>> that I'd tried initially: in some cases, you get output like
>>
>> (gdb) continue &^M
>> Continuing.^M
>> (gdb) [Inferior 1 (process 3669382) exited normally]^M
>> FAIL: gdb.dap/ada-scopes.exp: continue & (timeout)
>>
>> instead of the expected
>>
>> (gdb) continue &^M
>> Continuing.^M
>> (gdb) gdb_caching_proc supports_target_async caused gdb_exit to be called
>>
>> causing supports_target_async to incorrectly return 0.
>>
>> So that's what I'd like to check in.
>
> OK, thanks for clarifying.
>
> The usual way to handle this is to run a synchronous command afterwars,
> and use that to discard any pending output,
>
> gdb_test "p 123" " = 123" "clear expect buffer"
>
> but in this case, as you immediately exit, I don't think that's really
> needed. I'm happy if you just fix the other issues which I think are
> still valid.
that's what I'd done in the patch version attached to my last message.
I've now committed the patch. Now there's only the issue of backporting
it to the gdb-18 branch.
Thanks.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
next prev parent reply other threads:[~2026-09-07 10:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 14:18 [PATCH] Skip gdb.dap/pause.exp on Solaris [PR34548] Rainer Orth
2026-08-21 14:27 ` Tom Tromey
2026-08-22 20:25 ` Rainer Orth
2026-08-24 9:42 ` Andrew Burgess
2026-08-25 8:19 ` Rainer Orth
2026-08-25 8:22 ` Rainer Orth
2026-08-27 15:42 ` Tom Tromey
2026-08-28 8:49 ` [PATCH v2] Require async support for DAP tests [PR34548] Rainer Orth
2026-09-01 16:20 ` Tom Tromey
2026-09-01 16:32 ` Andrew Burgess
2026-09-03 8:06 ` Rainer Orth
2026-09-07 8:34 ` Andrew Burgess
2026-09-07 10:43 ` Rainer Orth [this message]
2026-08-27 18:59 ` [PATCH] Skip gdb.dap/pauseR.exp on Solaris [PR34548] Andrew Burgess
2026-08-28 8:52 ` Rainer Orth
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=yddtso1fij5.fsf@CeBiTec.Uni-Bielefeld.DE \
--to=ro@cebitec.uni-bielefeld.de \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
--cc=tom@tromey.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