public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Pedro Alves <pedro@palves.net>,
	Simon Marchi <simon.marchi@efficios.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdb: make "start" breakpoint inferior-specific
Date: Thu, 10 Nov 2022 12:53:47 -0500	[thread overview]
Message-ID: <24950a15-f7c9-5da7-734c-51e11b6b2089@simark.ca> (raw)
In-Reply-To: <1fe7e127-e23a-5563-68e8-47c13f14679e@palves.net>



On 11/10/22 12:47, Pedro Alves wrote:
> On 2022-11-10 5:33 p.m., Simon Marchi wrote:
> 
>>>> +proc do_test {} {
>>>> +    # With remote, to be able to start an inferior while another one is
>>>> +    # running, we need to use the non-stop variant of the protocol.
>>>> +    save_vars { ::GDBFLAGS } {
>>>> +	if { [target_info gdb_protocol] == "extended-remote"} {
>>>> +	    append ::GDBFLAGS " -ex \"maintenance set target-non-stop on\""
>>>> +	}
>>>> +
>>>> +	clean_restart ${::binfile_other}
>>>> +    }
>>>> +
>>>> +    gdb_test "run&" "Starting program: .*" "start background inferior"
>>>
>>> I was going to point out that if the inferior prints something, this can
>>> timeout, as that output would appear after the prompt.  I then looked around
>>> the tree for "run&" uses, to confirm we are using gdb_test_multiple with that,
>>> and found that you just recently added "gdb_test -no-prompt-anchor", for exactly
>>> this scenario.  :-)  I think that should be used here.
>>
>> Even if, in this case, we know the inferior won't print anything?
> 
> Admitedly it's a bit pedantic, but it seems to me to be safer.  Say
> someones adds some logging to the program or something.  It just looks
> like good practice to me to not have an anchor when the inferior is left
> running after the prompt is printed.

Ack, I will add it.

Simon

  reply	other threads:[~2022-11-10 17:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 17:40 [PATCH] " Simon Marchi
2022-08-17 17:56 ` Simon Marchi
2022-08-31 14:03 ` Bruno Larsen
2022-11-04 16:52   ` Simon Marchi
2022-11-07  8:14     ` Bruno Larsen
2022-11-08 17:24     ` Tom Tromey
2022-09-01 10:42 ` Andrew Burgess
2022-11-04 17:24   ` Simon Marchi
     [not found]     ` <8735asb7cj.fsf@redhat.com>
2022-11-09 13:19       ` Simon Marchi
2022-11-08 19:43 ` Pedro Alves
2022-11-08 20:14   ` Simon Marchi
2022-11-08 21:09     ` Pedro Alves
2022-11-08 21:20       ` [PATCH v2] " Simon Marchi
2022-11-10 16:45         ` Pedro Alves
2022-11-10 17:33           ` Simon Marchi
2022-11-10 17:36             ` Simon Marchi
2022-11-10 17:47             ` Pedro Alves
2022-11-10 17:53               ` Simon Marchi [this message]
2022-11-11 12:37         ` Tom de Vries
2022-11-11 13:53           ` Simon Marchi
2022-11-11 15:21             ` Tom de Vries
2022-11-11 19:03               ` Simon Marchi
2022-11-12 10:43                 ` Tom de Vries
2022-11-14 11:29                 ` Tom de Vries
2022-11-14 13:19                   ` Simon Marchi
2022-11-14 14:18                     ` Tom de Vries
2022-11-16 16:22                     ` Tom Tromey
2022-11-16 16:26                       ` 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=24950a15-f7c9-5da7-734c-51e11b6b2089@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    --cc=simon.marchi@efficios.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).