Message ID | 20231201-dap-cancel-v1-0-872022fc328a@adacore.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> 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 6F40B385ED72 for <patchwork@sourceware.org>; Fri, 1 Dec 2023 15:41:18 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by sourceware.org (Postfix) with ESMTPS id AA347385C6FC for <gdb-patches@sourceware.org>; Fri, 1 Dec 2023 15:41:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AA347385C6FC Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AA347385C6FC Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d2b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701445262; cv=none; b=VKzO2IhCoq2mSfo/s3OcihzKwZIlD+6TX/YHs+JIgTSmKR7/P1OXOCumkUp/BdYfzC38fNpXoDlNvFvKMcJzZ5l1MPn3HID/tf+DxG7VS40dpfjGRYenK5JDYIEkFbC9nVXhgQsKZ7a9lRRDF2tnZv+OtzicuvolxyugTysfTQk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701445262; c=relaxed/simple; bh=xKMaBTX914UluPifWmGGroYdONtuC7QvNxpv+1ThVoA=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=daa801v3gv/MjwoB8CLwqiIrf3uPVFw9QS6c/ebyRa6d2L3R5VfDU0QjgfhHBGjPw8AeftjYsTgk+d550/dDEYfe93MDt6wPSG83T8kiL55l6vqXLRiGI6JxZ0qBoBxmYEVqnrz6TnRJqfVlQRc8GBCMb3AR16ITIeWbYhI3wAQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7b35cd915b4so69328339f.0 for <gdb-patches@sourceware.org>; Fri, 01 Dec 2023 07:41:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1701445260; x=1702050060; darn=sourceware.org; h=to:content-transfer-encoding:mime-version:message-id:date:subject :from:from:to:cc:subject:date:message-id:reply-to; bh=G7s6zDE5PYGcxfAk0ORUIOU/xnkF91V3LqcbWF58Z08=; b=FbFr24z1ExEuyOMKLbVgjbgTqG7SL3gGOc49U4H4X++UXwhGxUTvsouuhoeYqTfGlA u/Jfo38ocBFU5dkvtkLpzmlXS2TY5AVsVTVGQ0SlMvf9W56u0h5a8qA9SjI5k5UEWlrP XzvQeWZde6hYlJlSHmjmv0YXXUzsc3jNvE4urYwRz899lbOfuPN/awqsMeT8mdJvBl/j 51ZL9ePj8bNq2U4+a8J6S4CM66VFIZcXukjNh2tF3WMZAFgnbVXtFJEMyycNbWRhlRHa LfotfmuT9GkabzhXvlRTX52PnyVj6Y3QjuHwpgxeF8AI8yAUOsMlfLjNq3V2TOPtY9nd VX4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701445260; x=1702050060; h=to:content-transfer-encoding:mime-version:message-id:date:subject :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=G7s6zDE5PYGcxfAk0ORUIOU/xnkF91V3LqcbWF58Z08=; b=dRHhxfkp9FNXlupv0VOISpvU9X1RtBJdq5TZmNPha6o3/j2S/tXKIcSNBuw1w2+Tol 3P6ASDUlY0TquXZ687uN1raAPAgV3V39nlxIZgaGagXSv8qKN07FOb5DJd4CGE8B3Kf+ mA36twhs0ZYeTi9nDXL6fQql8xlr3orqRLGsfjEFoAkw6gie7cpNm8B7ixUj9WQpwj5v skpdQLAiesvnGE+6eQAYDa2uDPVlGqbG80eLI1cekH5ok5BXSIFcmJRNfIA+2Hn8nFss fBWpssmEh/xPoQgIkMZMCJP7F9TXJdlyQfXtkJmy4fctYlbZDQQL8UjWhJe5Ef9kynk1 dNQA== X-Gm-Message-State: AOJu0YxQ1B0ultSYpdThl9Zrapakm0tgLzZVsT+4hEpmM7zpIfAuse2D zUaVM9wEzlZ3hLYG6D5TtTTScth6XuDLCIpE+v4= X-Google-Smtp-Source: AGHT+IEmgup4xDbmTGFUU/WPngXTWm+WG9SvebFur43mQEtQna5tAydOh3y0i+0WQ0HFtRtZrY2J4A== X-Received: by 2002:a05:6602:2254:b0:7ac:cede:7b4 with SMTP id o20-20020a056602225400b007accede07b4mr22048964ioo.17.1701445259851; Fri, 01 Dec 2023 07:40:59 -0800 (PST) Received: from localhost.localdomain (97-122-77-73.hlrn.qwest.net. [97.122.77.73]) by smtp.gmail.com with ESMTPSA id f4-20020a02cac4000000b0046662226e54sm906829jap.168.2023.12.01.07.40.59 for <gdb-patches@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 07:40:59 -0800 (PST) From: Tom Tromey <tromey@adacore.com> Subject: [PATCH 0/6] Implement DAP cancellation Date: Fri, 01 Dec 2023 08:40:56 -0700 Message-Id: <20231201-dap-cancel-v1-0-872022fc328a@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAIj+aWUC/x3MQQrCQAyF4auUrA3MpIuqVxEXmZloAzqWREQov buxyw/e+1dwMRWH87CCyUddXz2QDwPUmftdUFsYKNGYKWVsvGDlXuWBVOlE7ZgKjxPEYTG56Xe PXa7hwi5YLMbzP/Fkf4vBtv0ALM3MunUAAAA= To: gdb-patches@sourceware.org X-Mailer: b4 0.12.4 X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org |
Series | Implement DAP cancellation | |
Message
Tom Tromey
Dec. 1, 2023, 3:40 p.m. UTC
DAP specifies a way to cancel requests. Previously, I didn't implement this, because it didn't seem necessary. However, I realized later that a 'repl' evaluation can cause the inferior to continue (or gdb to invoke a long-running CLI or Python command), and a request like this will not finish -- cancellation is necessary. This series implements this feature. I've split it into bite-sized pieces. Tested on x86-64 Fedora 38. --- Tom Tromey (6): Clean up handling of DAP not-stopped response Move DAP JSON reader to its own thread Introduce gdb.interrupt Rename a couple of DAP procs in the testsuite Catch BaseException in send_gdb_with_response Implement DAP cancellation gdb/NEWS | 2 + gdb/doc/gdb.texinfo | 16 ++++++ gdb/doc/python.texi | 11 ++++ gdb/python/lib/gdb/dap/server.py | 115 ++++++++++++++++++++++++++++++++++++-- gdb/python/lib/gdb/dap/startup.py | 4 +- gdb/python/python.c | 19 +++++++ gdb/testsuite/gdb.dap/pause.exp | 71 +++++++++++++++++++++++ gdb/testsuite/lib/dap-support.exp | 10 ++-- 8 files changed, 236 insertions(+), 12 deletions(-) --- base-commit: 946df73fa09e782b15f75fc82729bff6a00d2554 change-id: 20231201-dap-cancel-2c292d80ba37 Best regards,
Comments
Tom Tromey <tromey@adacore.com> writes: > DAP specifies a way to cancel requests. Previously, I didn't > implement this, because it didn't seem necessary. However, I realized > later that a 'repl' evaluation can cause the inferior to continue (or > gdb to invoke a long-running CLI or Python command), and a request > like this will not finish -- cancellation is necessary. > > This series implements this feature. I've split it into bite-sized > pieces. > > Tested on x86-64 Fedora 38. > > --- > Tom Tromey (6): > Clean up handling of DAP not-stopped response > Move DAP JSON reader to its own thread > Introduce gdb.interrupt > Rename a couple of DAP procs in the testsuite > Catch BaseException in send_gdb_with_response > Implement DAP cancellation > > gdb/NEWS | 2 + > gdb/doc/gdb.texinfo | 16 ++++++ > gdb/doc/python.texi | 11 ++++ > gdb/python/lib/gdb/dap/server.py | 115 ++++++++++++++++++++++++++++++++++++-- > gdb/python/lib/gdb/dap/startup.py | 4 +- > gdb/python/python.c | 19 +++++++ > gdb/testsuite/gdb.dap/pause.exp | 71 +++++++++++++++++++++++ > gdb/testsuite/lib/dap-support.exp | 10 ++-- > 8 files changed, 236 insertions(+), 12 deletions(-) > --- > base-commit: 946df73fa09e782b15f75fc82729bff6a00d2554 > change-id: 20231201-dap-cancel-2c292d80ba37 > > Best regards, Beside my remark re. BaseException, nothing more to add, this looks good to me. For the series: Reviewed-By: Kévin Le Gouguec <legouguec@adacore.com>