Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Simon Marchi <simon.marchi@polymtl.ca>,
	Tom de Vries <tdevries@suse.de>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: use gdb_test_multiple in gdb_breakpoint
Date: Wed, 11 Jan 2023 19:05:18 +0000	[thread overview]
Message-ID: <aadbcf57-3931-2979-0336-49d75dc3af8a@palves.net> (raw)
In-Reply-To: <f1313e3c-0a28-853d-a960-a5d2a745bd9f@polymtl.ca>

On 2023-01-10 8:42 p.m., Simon Marchi wrote:
> On 1/10/23 14:56, Pedro Alves wrote:

>>
>> I think the intention of not issuing PASS by default, was that you can
>> use gdb_breakpoint to implement other procedures inside lib/gdb.exp.
>> If gdb_breakpoint starts issuing a PASS, then an implementation detail
>> of such procedures starts being visible, by ending up with two PASSes for
>> each call of the procedure that happens to use gdb_breakpoint, one for 
>> gdb_breakpoint, and one for the caller procedure proper.
> 
> And do you think this is important?  Personally, I don't think the
> multiple PASSes is a problem.

As mentioned, this is more of a generic concern of all procedures exposed
by lib/gdb.exp.  gdb_breakpoint was just one among many.  Seems better to look
at the overall design/direction rather than just one case in isolation.

Let's take runto.  It calls gdb_breakpoint (which used to use gdb_expect before your change),
and then gdb_run_cmd, and then gdb_expect directly.  gdb_run_cmd itself uses gdb_expect.
gdb_run_cmd may use gdb_reload, which calls gdb_load, which uses gdb_load_cmd, which uses
gdb_expect.

So changing any of these gdb_expect to gdb_test_multiple would result in intermediate PASSes
starting to be emitted.  Depending on refactoring, etc, you'd get different internal PASSes.
Depending on different target, you'd get wildly different internal PASSes, etc.  You'd get
a lot more mismatching PASS/FAIL cases when one of the internal gdb_test_multiple's failed.
Etc.  That doesn't seem like the ideal approach to me.

  reply	other threads:[~2023-01-11 19:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 19:22 Simon Marchi via Gdb-patches
2023-01-04  9:15 ` Lancelot SIX via Gdb-patches
2023-01-04 16:11   ` Simon Marchi via Gdb-patches
2023-01-04 16:18     ` Lancelot SIX via Gdb-patches
2023-01-04 16:22       ` Simon Marchi via Gdb-patches
2023-01-04 17:40         ` Lancelot SIX via Gdb-patches
2023-01-04 18:02           ` Lancelot SIX via Gdb-patches
2023-01-04 19:05             ` Simon Marchi via Gdb-patches
2023-01-04 19:12               ` Lancelot SIX via Gdb-patches
2023-01-05  9:04 ` Tom de Vries via Gdb-patches
2023-01-05 16:28   ` Simon Marchi via Gdb-patches
2023-01-05 16:31     ` Tom de Vries via Gdb-patches
2023-01-05 16:36       ` Simon Marchi via Gdb-patches
2023-01-10 15:33     ` Pedro Alves
2023-01-10 15:50       ` Simon Marchi via Gdb-patches
2023-01-10 19:56         ` Pedro Alves
2023-01-10 20:42           ` Simon Marchi via Gdb-patches
2023-01-11 19:05             ` Pedro Alves [this message]
2023-01-11 19:42               ` Simon Marchi via Gdb-patches

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=aadbcf57-3931-2979-0336-49d75dc3af8a@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    --cc=tdevries@suse.de \
    /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