From patchwork Mon Feb 20 14:13:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 65267 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6DF81383FB8E for ; Mon, 20 Feb 2023 14:14:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DF81383FB8E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676902494; bh=H6uoLkEtow79LBD8xJisAnGMkPZV0wUg0YZdlbBxx1s=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Gaq5l7Hbf0tdeTgov2sDr9OGCzXIvYeG7x79P/y/fu06E3MzoWoqhtNvjXUHJ1ZqQ rqvZR9IasjBhodPrqVpPKhHOZVB2GVoUblPAGLxDcmXla0oneW99+wznWVcC5WwvFD yDvzMGKlSmg125BVQk5ck7q1bHy3R+bv8iBvpk1k= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 60387383FDCE for ; Mon, 20 Feb 2023 14:14:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 60387383FDCE Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-456-Wa4pIxh0PZmZ3HmAnY0WhA-1; Mon, 20 Feb 2023 09:14:00 -0500 X-MC-Unique: Wa4pIxh0PZmZ3HmAnY0WhA-1 Received: by mail-wm1-f69.google.com with SMTP id bg22-20020a05600c3c9600b003e209b61ebbso572705wmb.3 for ; Mon, 20 Feb 2023 06:14:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H6uoLkEtow79LBD8xJisAnGMkPZV0wUg0YZdlbBxx1s=; b=JkIVxXUN5E37gtL4jEgEaxzxmFA+W3FRd5umbBN9cK4FcKk1TKvd0As9sNpkcgwzNW CBLfBRsAZqd0L60CNbkBvX5sh6Fy6LeVinVrpBlk5Uok+7oU9vsGfRsfvM+//u0VJzDT aHFKiP1FIqiNF14tEffRE33Pyab5owAxH2GQHh+6boNGPTanc4HxnAqaIMOnOXZ4Zo0n JKbNrsvOldiQOmL0sOMqeArbmcC13HgTbZ0q/aJi5WY0zRE4qYQ37RQjLE3a1hJAZogP uKH5Mutc6mFuZDa3Uy/6JJtgTo5RPR72nAZqlG0gZ97PuUkM+sdy62T4BA4ZGh2IUvyJ 92cg== X-Gm-Message-State: AO0yUKV0spDThA8KTE5jJC1KmJKvpPwpbzD/0FWpoquL2LHeFHssKzmM ncqNYDuy/UrIXvv/3oehMcRncLAgegSxApCqVMVdrf5hn1iq324fbgIfWsN33K3/01sVuQyJAw+ qXSaeJlciXJS8Wi8eaHo/iD//kySaeXlFTPrcI43H7s0DvVsctTjpV47vOYBJoQqlzJinU/4VG1 JKP08= X-Received: by 2002:a05:600c:30ca:b0:3df:12ac:7cc9 with SMTP id h10-20020a05600c30ca00b003df12ac7cc9mr6062588wmn.15.1676902439555; Mon, 20 Feb 2023 06:13:59 -0800 (PST) X-Google-Smtp-Source: AK7set8eC3DytKoOzkZk/cxcP3RKgQXubffIL38uU+E7qByxJmPx5ev6zgV+9YJEJ3WatgZTc6zwgA== X-Received: by 2002:a05:600c:30ca:b0:3df:12ac:7cc9 with SMTP id h10-20020a05600c30ca00b003df12ac7cc9mr6062570wmn.15.1676902439187; Mon, 20 Feb 2023 06:13:59 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id a8-20020adfed08000000b002c55cdb1de5sm1480617wro.116.2023.02.20.06.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 06:13:58 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 3/8] gdb/testsuite: make more use of mi-support.exp Date: Mon, 20 Feb 2023 14:13:48 +0000 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Burgess via Gdb-patches From: Andrew Burgess Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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. --- 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=\"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"