From: Andrew Burgess <aburgess@redhat.com>
To: Tom Tromey <tom@tromey.com>,
Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
Cc: Pedro Alves <pedro@palves.net>
Subject: Re: [PATCH 1/2] gdb: only allow one of thread or task on breakpoints or watchpoints
Date: Mon, 13 Feb 2023 11:26:04 +0000 [thread overview]
Message-ID: <87ttzpu7qr.fsf@redhat.com> (raw)
In-Reply-To: <87v8k6ebj6.fsf@tromey.com>
Tom Tromey <tom@tromey.com> writes:
> Andrew> I gave the test a more descriptive name, and pushed both patches in this
> Andrew> series.
>
> I didn't bisect but I suspect this caused:
>
> guile (set-breakpoint-thread! bp 1)
> ERROR: In procedure set-breakpoint-thread!:
> ERROR: In procedure gdbscm_set_breakpoint_thread_x: cannot set both task and thread attributes
> Error while executing Scheme code.
> (gdb) FAIL: gdb.ada/tasks.exp: attempt to set thread, but expect an error
Tom,
Oh, I see. You're getting a second 'ERROR:' prefix that I don't get. I
could only find one other test that tries to match an error string like
I'm doing, in gdb.guile/scm-parameter.exp, and in there we do treat this
extra 'ERROR: ' as optional.
I pushed the patch below which I think should fix the issue. Let me
know if you are still seeing failures.
Sorry for the breakage.
Thanks,
Andrew
---
commit 97c195191578e9a68bfbb810eea373f5f3efcb7d
Author: Andrew Burgess <aburgess@redhat.com>
Date: Mon Feb 13 11:19:57 2023 +0000
gdb/testsuite: handle differences in guile error string output
A new guile test added in commit:
commit 0a9ccb9dd79384f3ba3f8cd75940e8868f3b526f
Date: Mon Feb 6 13:04:16 2023 +0000
gdb: only allow one of thread or task on breakpoints or watchpoints
fails for some versions of guile. It turns out that some versions of
guile emit an error like this:
(gdb) guile (set-breakpoint-thread! bp 1)
ERROR: In procedure set-breakpoint-thread!:
In procedure gdbscm_set_breakpoint_thread_x: cannot set both task and thread attributes
Error while executing Scheme code.
while other versions of guile emit the error like this:
(gdb) guile (set-breakpoint-thread! bp 1)
ERROR: In procedure set-breakpoint-thread!:
ERROR: In procedure gdbscm_set_breakpoint_thread_x: cannot set both task and thread attributes
Error while executing Scheme code.
notice the extra 'ERROR: ' on the second line of output. This commit
updates the test regexp to handle this optional 'ERROR: ' string.
diff --git a/gdb/testsuite/gdb.ada/tasks.exp b/gdb/testsuite/gdb.ada/tasks.exp
index a73a1919419..eb7ee5c9951 100644
--- a/gdb/testsuite/gdb.ada/tasks.exp
+++ b/gdb/testsuite/gdb.ada/tasks.exp
@@ -127,7 +127,8 @@ if {[allow_guile_tests]} {
gdb_test "guile (set-breakpoint-thread! bp 1)" \
[multi_line \
"ERROR: In procedure set-breakpoint-thread!:" \
- "In procedure gdbscm_set_breakpoint_thread_x: cannot set both task and thread attributes" \
+ "(ERROR: )?In procedure gdbscm_set_breakpoint_thread_x:\
+ cannot set both task and thread attributes" \
"Error while executing Scheme code."] \
"attempt to set thread, but expect an error"
@@ -138,7 +139,8 @@ if {[allow_guile_tests]} {
gdb_test "guile (set-breakpoint-task! bp 1)" \
[multi_line \
"ERROR: In procedure set-breakpoint-task!:" \
- "In procedure gdbscm_set_breakpoint_task_x: cannot set both task and thread attributes" \
+ "(ERROR: )?In procedure gdbscm_set_breakpoint_task_x:\
+ cannot set both task and thread attributes" \
"Error while executing Scheme code."] \
"attempt to set task, but expect an error"
next prev parent reply other threads:[~2023-02-13 11:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 15:16 [PATCH 0/2] Prevent combining 'task' and 'thread' keywords Andrew Burgess
2023-02-08 15:16 ` [PATCH 1/2] gdb: only allow one of thread or task on breakpoints or watchpoints Andrew Burgess
2023-02-08 15:52 ` Eli Zaretskii
2023-02-08 18:10 ` Pedro Alves
2023-02-12 5:50 ` Andrew Burgess
2023-02-12 22:58 ` Tom Tromey
2023-02-13 11:26 ` Andrew Burgess [this message]
2023-02-08 15:16 ` [PATCH 2/2] gdb: use -1 for breakpoint::task default value Andrew Burgess
2023-02-08 18:10 ` Pedro Alves
2023-02-12 7:23 ` Andrew Burgess
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=87ttzpu7qr.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).