From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by sourceware.org (Postfix) with ESMTPS id 3E38C385843E for ; Wed, 24 May 2023 16:37:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3E38C385843E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-76c75d32005so31316339f.1 for ; Wed, 24 May 2023 09:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1684946252; x=1687538252; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=KVu2bwbv/DyQATSnAMBlfrJVQJ6fm/UwNJC89cWdYTI=; b=bZJNRuG4/07GvIKbSPZ0t1nDLZeb+iusDd63+KNGyZCBDzODe56do4Jw2/32CSQ+y5 wdOjUf7PKYlQqA6K6RGEVo4W2WULvGOfsJyfHXvBruPcCPXJa2Qz6MGJF4k9I6uqGHC/ ydYcuUhV0tk/6gNTzfnEsZQcTI5xHAmslHXnnxUWxmqtmOBUuiFuSiNAhD8sCEqDHC59 HL0xrNg8cIMknDE9zw3sdez/mq4g1wwTRwe/2Lus9uchnuQ/xtmzoin2YpV1a52nUISE buPvYt+cXB4idCcpyb16DNeHHHm1IEz90Pwr17uVEDNqtLcPoYs4z49fc/a0c/BQDHuN Io0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684946252; x=1687538252; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KVu2bwbv/DyQATSnAMBlfrJVQJ6fm/UwNJC89cWdYTI=; b=ccTmlu+RvotRWIlBlNRbYd0ghBdO6KOYHN8faAwS83Pz1nd/11nHt9EdW5igEXx4+J z/YOopy4pNseGjNp+YglC61RY02i3ax5a/cbG7MB+aUcXBExCXmBfN4v1Ao5XJbELC43 denjsIxNh5YlObWfQJTNc4YaWtwuXXxg53IqYBlgsCcglqZQszSE8uffFOZ0cQnO+hvp nrHhxXdSRJ8ugu6gc/gjLjygNcC7zTENyoG+gRZ2ewh03kKwRpYobO4vqEb9XoL84GP9 dgEluNAs3CS4zkpXi/JrLsDNgbkMbWlSiEhJrKTD9/SLTBivVibJH+zZTUx+JFT03pZq 3gsQ== X-Gm-Message-State: AC+VfDyZEXguu4avA8SGC+YRl45mdNlEcS9HPqj7JTzO7R4SD7mx1EPh 0Q71Pn9gxWUbaICw38inrevHWSwOfHTw/MPKzATnqQ== X-Google-Smtp-Source: ACHHUZ7lJVOvosINARYd2YfKbk1wZohNG6oZ/JLJ3YJLqa2ZFygc/0cj63N8DRyXZTip49FGHXcTUw== X-Received: by 2002:a05:6602:2202:b0:760:ced3:4481 with SMTP id n2-20020a056602220200b00760ced34481mr10501588ion.4.1684946252539; Wed, 24 May 2023 09:37:32 -0700 (PDT) Received: from localhost.localdomain (71-211-130-244.hlrn.qwest.net. [71.211.130.244]) by smtp.gmail.com with ESMTPSA id o22-20020a6bcf16000000b0076c81bf2731sm3397266ioa.20.2023.05.24.09.37.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 09:37:32 -0700 (PDT) From: Tom Tromey Date: Wed, 24 May 2023 10:37:05 -0600 Subject: [PATCH 14/25] Add test for DAP pause request MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230427-ada-catch-exception-v1-14-947caa9905e3@adacore.com> References: <20230427-ada-catch-exception-v1-0-947caa9905e3@adacore.com> In-Reply-To: <20230427-ada-catch-exception-v1-0-947caa9905e3@adacore.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: I neglected to write a test for the DAP "pause" request. This patch adds one. --- gdb/testsuite/gdb.dap/pause.exp | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gdb/testsuite/gdb.dap/pause.exp b/gdb/testsuite/gdb.dap/pause.exp new file mode 100644 index 00000000000..27955d31526 --- /dev/null +++ b/gdb/testsuite/gdb.dap/pause.exp @@ -0,0 +1,41 @@ +# Copyright 2023 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Test "pause" in DAP. + +require allow_dap_tests + +load_lib dap-support.exp + +standard_testfile attach.c + +if {[build_executable ${testfile}.exp $testfile $srcfile] == -1} { + return +} + +if {[dap_launch $testfile] == ""} { + return +} + +dap_check_request_and_response "start inferior" configurationDone +dap_wait_for_event_and_check "inferior started" thread "body reason" started + +dap_check_request_and_response pause pause \ + {o threadId [i 1]} + +dap_wait_for_event_and_check "stopped by pause" stopped \ + "body reason" pause + +dap_shutdown -- 2.40.0