From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id 10A623858D32 for ; Tue, 20 Jun 2023 10:00:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10A623858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f86a7a5499so3486255e87.2 for ; Tue, 20 Jun 2023 03:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687255229; x=1689847229; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tlCrcmkxdwosGCqx86zOyJypCnX4brvaSq/snF1t+u4=; b=scwt0TvHwggva1k3c6r0JsoPq7KrhnoiBC7J3De0vDS00ArD4TFUniRbo3Xvl54zpN bCsug7xZ1KR6QoERdTxMD/4WYoZoz9fJY60r86Pkp4TqROR7Ip3+9Y2su6i0aJZAIwan +4d8IVPxantb8HemAPvzIjTpm2QrUr/X4N0qo49zHd4ZmlUzYtyQZK3Z+wmaEt4JMyfe PuTBIWJZcWPYkVRTPlwR23wXZ9c+WcI3QQxHT4URsGtQiF3y0jSDcJ5A6WMF9PkJZRen 7c1VG27BPY8SavjqUWbjaCrzbDoCpme4fw+6xwNIWBqif70TMP9QdY4Sytv/3NCi+lnC tytQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687255229; x=1689847229; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tlCrcmkxdwosGCqx86zOyJypCnX4brvaSq/snF1t+u4=; b=W3f6zC4ZR3Nl/mCtH2EFh+q15u9D5ZHvmPuXTnIr9Bi/vU20qTY/fg1NJvKu/4edI0 QDnVre7GwEE2XHWK2PKJqzdsKlxAk7iRTBxk/Xd+Ys+1dCe7PJzWrKI1ozCQW8PPF/7m nGF9uN/Tj9wRWwyB38HzXAKqia1v0MXtK8YrSo38fM5RGUsdvYML7zI7zGwqfsm08TgF p7Frd4shPRoU7FIfIEp9U68cqiQ5prUliOBzWuPrFOK9MPwa7CYleEGBHpWlXkCm8Mm7 73hvLcs9p4NNg/QjTiYJ0Qijfuot/vTLEG3IgQ1vRIA3WN9NtIk20lCGk6cN3PLZ2BW1 tTww== X-Gm-Message-State: AC+VfDwcPKzaHCkOI0of36Xcc8TtDvir5kcGupO325eFCIHFaRwsIc4M IsX1q7EzM7vc7CYa4GUOKD729cyyBI06Mw== X-Google-Smtp-Source: ACHHUZ6Ab4VRYvcSaa5odnUiWBG9cdyv054vthGq8hEIluyIDNF/bk5gkvCsdupTDX/7h8vm4xRuuw== X-Received: by 2002:a05:6512:3106:b0:4f8:6c40:8fad with SMTP id n6-20020a056512310600b004f86c408fadmr3687422lfb.10.1687255228941; Tue, 20 Jun 2023 03:00:28 -0700 (PDT) Received: from fedora.. (78-73-77-63-no2450.tbcn.telia.com. [78.73.77.63]) by smtp.gmail.com with ESMTPSA id j17-20020ac253b1000000b004f76684329esm296125lfh.234.2023.06.20.03.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 03:00:28 -0700 (PDT) From: Simon Farre To: gdb-patches@sourceware.org Cc: tom@tromey.com, aburgess@redhat.com, Simon Farre Subject: [PATCH v2] gdb/dap - Add support for additional target types Date: Tue, 20 Jun 2023 12:00:17 +0200 Message-Id: <20230620100017.229708-1-simon.farre.cx@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,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: After discussion with Tom and Andrew we decided that the best approach is the simple one - make the "target" field contain a string that performs the desired command. So for instance "extended-remote 127.0.0.1:50505" or "remote foohost" etc. --- gdb/python/lib/gdb/dap/launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/python/lib/gdb/dap/launch.py b/gdb/python/lib/gdb/dap/launch.py index c3c09bc3dd0..7eae8a1916c 100644 --- a/gdb/python/lib/gdb/dap/launch.py +++ b/gdb/python/lib/gdb/dap/launch.py @@ -74,7 +74,7 @@ def attach(*, pid: Optional[int] = None, target: Optional[str] = None, **args): if pid is not None: cmd = "attach " + str(pid) elif target is not None: - cmd = "target remote " + target + cmd = "target " + target else: raise Exception("attach requires either 'pid' or 'target'") # Use send_gdb_with_response to ensure we get an error if the -- 2.40.1