public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: gdb-patches@sourceware.org
Subject: [PATCH v3 2/2] gdb/testsuite: Clarify -lbl option in gdb_test_multiple
Date: Mon,  4 Mar 2024 16:47:06 -0300	[thread overview]
Message-ID: <20240304194706.3384389-2-thiago.bauermann@linaro.org> (raw)
In-Reply-To: <20240304194706.3384389-1-thiago.bauermann@linaro.org>

I was a bit confused about the -lbl option in gdb_test_multiple, and needed
to read its implementation to determine that it would be useful for my
needs.  Explicitly mention what the option does and why it's useful to
hopefully help other developers.
---
 gdb/testsuite/lib/gdb.exp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index fe4ac7d27190..9a2a64fa9ba1 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -921,7 +921,10 @@ proc fill_in_default_prompt {prompt_regexp with_anchor} {
 #   if one of them matches.  If MESSAGE is empty COMMAND will be used.
 # -prompt PROMPT_REGEXP specifies a regexp matching the expected prompt
 #   after the command output.  If empty, defaults to "$gdb_prompt $".
-# -lbl specifies that line-by-line matching will be used.
+# -lbl specifies that line-by-line matching will be used.  This means
+#   that lines from GDB not matched by any pattern will be consumed from
+#   the output buffer.  This helps avoid buffer overflows and timeouts
+#   when testing verbose commands.
 # EXPECT_ARGUMENTS will be fed to expect in addition to the standard
 #   patterns.  Pattern elements will be evaluated in the caller's
 #   context; action elements will be executed in the caller's context.

      reply	other threads:[~2024-03-04 19:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 19:47 [PATCH v3 1/2] gdb/testsuite: Consume all debug output in gdb.base/osabi.exp Thiago Jung Bauermann
2024-03-04 19:47 ` Thiago Jung Bauermann [this message]

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=20240304194706.3384389-2-thiago.bauermann@linaro.org \
    --to=thiago.bauermann@linaro.org \
    --cc=gdb-patches@sourceware.org \
    /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).