From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QLfYOcPrtmPF/A8AWB0awg (envelope-from ) for ; Thu, 05 Jan 2023 10:24:51 -0500 Received: by simark.ca (Postfix, from userid 112) id EAF231E222; Thu, 5 Jan 2023 10:24:51 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=vnBmAJmJ; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id A72E21E112 for ; Thu, 5 Jan 2023 10:24:51 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 430CA3858413 for ; Thu, 5 Jan 2023 15:24:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 430CA3858413 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1672932290; bh=/iwxqJdirvLRTZULuT3hZ3DWUlK4YBz/oballTs1O1s=; h=To:Cc:Subject:References:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=vnBmAJmJKXoewsV/u26z28DGc303Sx0iRoXlBUoRRJIIoMawppj16OrKUwFPqYbGc zhdh1yCLwH+ZDjLdfRU3S/tWhsxlkLW/UpUVWpr2zMmng76HnO9F2PabY8t8BTy+M3 4NsBwU4PrbkuDpgD5E95VEGxN2iPuYDLBGJIS3rk= Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id B71833858D35 for ; Thu, 5 Jan 2023 15:24:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B71833858D35 Received: by mail-il1-x135.google.com with SMTP id h26so6855843ila.11 for ; Thu, 05 Jan 2023 07:24:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/iwxqJdirvLRTZULuT3hZ3DWUlK4YBz/oballTs1O1s=; b=p6j2OoFmaeRPng+z0DZphFpRNX3VGrPd/qfuNxaoWmTIE3fKin46M8Pk0PWJugPlC+ a6yMlC00t/Ufq2u4AEFlijN0l/MIwxF4tSXbf7lHBjljXNZoTpebE6AogxRDIwbSekwY IYClyc4jkrRGpCB5TBqrCDyj0tgc5ebwRob0gKmgxJZRXFkU/ZvfmGN2FIIIYmvsGvG8 YP7zgGCHWZgBiHgqlMnR5KpBGRzoL4v7kd2ZPpLvZUNIf2Bq50ZWn/NJX2lqQpr1ESbW aamvkk9uokT7j/RK9qE4gY/Hf+W6dXp9C0ijup9Nx2irr4E27WeBJ9273dvir3qRko/J NMEg== X-Gm-Message-State: AFqh2kqk8B1Awl2DmaAtNORFvufQTRUZQRKn7T93g04Tz8uxFpSOVrxm oqmDhSZc2jOzDMe1ftPdyZV7iP/xU/5U9hih X-Google-Smtp-Source: AMrXdXszB2Yh61j+AhA6Bm5WUXdJ6fXGIioNmicPpQguV3MNV6dcBhvrD3d9q9UTVjEk5HomOqXf3Q== X-Received: by 2002:a92:ad06:0:b0:30b:fd11:8b2 with SMTP id w6-20020a92ad06000000b0030bfd1108b2mr26053007ilh.1.1672932270964; Thu, 05 Jan 2023 07:24:30 -0800 (PST) Received: from murgatroyd (97-122-76-186.hlrn.qwest.net. [97.122.76.186]) by smtp.gmail.com with ESMTPSA id m28-20020a026d1c000000b0037b319410c3sm11922977jac.44.2023.01.05.07.24.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 07:24:30 -0800 (PST) To: Tom de Vries Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Initial implementation of Debugger Adapter Protocol References: <20220901163059.3678708-1-tromey@adacore.com> <16a7949d-4a65-28a4-732e-44e6b99f9478@suse.de> X-Attribution: Tom Date: Thu, 05 Jan 2023 08:24:29 -0700 In-Reply-To: <16a7949d-4a65-28a4-732e-44e6b99f9478@suse.de> (Tom de Vries's message of "Thu, 5 Jan 2023 12:35:56 +0100") Message-ID: <87fscpf1hu.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: , From: Tom Tromey via Gdb-patches Reply-To: Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" >>>>> "Tom" == Tom de Vries writes: Tom> In case you haven't seen it, on IRC someone mentioned: I didn't. Tom> diff --git a/gdb/python/lib/gdb/dap/io.py b/gdb/python/lib/gdb/dap/io.py Tom> index 656ac08b4ec..1d561f07665 100644 Tom> --- a/gdb/python/lib/gdb/dap/io.py Tom> +++ b/gdb/python/lib/gdb/dap/io.py Tom> @@ -22,7 +22,7 @@ def read_json(stream): Tom> """Read a JSON-RPC message from STREAM. Tom> The decoded object is returned.""" Tom> # First read and parse the header. Tom> - content_length = None Tom> + content_length = 0 Tom> while True: Tom> line = stream.readline() Tom> line = line.strip() In this case, though, the protocol request is malformed and I think it's fine for gdb to just give up. TBH I am not sure what should officially happen for a malformed request. I don't think the docs I read address this. Tom