public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: make more use of mi-support.exp Date: Tue, 28 Feb 2023 11:09:15 +0000 (GMT) [thread overview] Message-ID: <20230228110915.374C23858430@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c8dfa492106ff57f3e1dd6731d5ba5b754f05616 commit c8dfa492106ff57f3e1dd6731d5ba5b754f05616 Author: Andrew Burgess <aburgess@redhat.com> Date: Fri Feb 17 14:33:03 2023 +0000 gdb/testsuite: make more use of mi-support.exp Building on the previous commit, now that the breakpoint related support functions in lib/mi-support.exp can now help creating the patterns for thread specific breakpoints, make use of this functionality for gdb.mi/mi-nsmoribund.exp and gdb.mi/mi-pending.exp. There should be no changes in what is tested after this commit. Reviewed-By: Pedro Alves <pedro@palves.net> Diff: --- gdb/testsuite/gdb.mi/mi-nsmoribund.exp | 7 ++++--- gdb/testsuite/gdb.mi/mi-pending.exp | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp index 55450e4621a..a08ba8ab2e7 100644 --- a/gdb/testsuite/gdb.mi/mi-nsmoribund.exp +++ b/gdb/testsuite/gdb.mi/mi-nsmoribund.exp @@ -73,9 +73,10 @@ mi_gdb_test "-thread-select 5" "\\^done.*" "select thread 5" mi_delete_breakpoints # Recreate the same breakpoint, but this time, specific to thread 5. -mi_gdb_test "234-break-insert -p 5 $srcfile:$bkpt_line" \ - "234\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\".*\",func=\"thread_function\",file=\".*\",fullname=\".*\",line=\".*\",thread-groups=\\\[\".*\"\\\],thread=\"5\",times=\"0\",original-location=\".*\"\}" \ - "thread specific breakpoint at thread_function" +mi_create_breakpoint "-p 5 $srcfile:$bkpt_line" \ + "thread specific breakpoint at thread_function" \ + -number "3" -type "breakpoint" -disp "keep" -enabled "y" \ + -func "thread_function" -line "$bkpt_line" -thread "5" -times "0" # Resume all threads. Only thread 5 should report a stop. diff --git a/gdb/testsuite/gdb.mi/mi-pending.exp b/gdb/testsuite/gdb.mi/mi-pending.exp index cd1301c21e3..a5c6ee5c906 100644 --- a/gdb/testsuite/gdb.mi/mi-pending.exp +++ b/gdb/testsuite/gdb.mi/mi-pending.exp @@ -97,8 +97,10 @@ mi_expect_stop "breakpoint-hit" "thread_func" ".*" ".*" ".*" \ mi_gdb_test "-break-delete 3" "\\^done" "delete breakpoint 3" # Set pending breakpoint with a thread via MI. -mi_gdb_test "-break-insert -p 2 -f pendfunc3" \ - ".*\\^done,bkpt=\{number=\"4\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"<PENDING>\",pending=\"pendfunc3\",thread=\"2\",times=\"0\",original-location=\"pendfunc3\"\}"\ +set bp [mi_make_breakpoint_pending -number "4" -type "breakpoint" \ + -disp "keep" -enabled "y" -pending "pendfunc3" -thread "2" \ + -times "0" -original-location "pendfunc3"] +mi_gdb_test "-break-insert -p 2 -f pendfunc3" ".*\\^done,$bp"\ "MI pending breakpoint on pendfunc3" mi_send_resuming_command "exec-continue" "continuing execution to thread condition"
reply other threads:[~2023-02-28 11:09 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230228110915.374C23858430@sourceware.org \ --to=aburgess@sourceware.org \ --cc=gdb-cvs@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: linkBe 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).