From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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-il1-x135.google.com with SMTP id h26so6855843ila.11 for ; Thu, 05 Jan 2023 07:24:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=/iwxqJdirvLRTZULuT3hZ3DWUlK4YBz/oballTs1O1s=; b=LxyN1wWM8UuMYELLC17X72PCITqOB6HGwi4/V/gSqwPyl0Lj4TsfrQ+mVV6a1cBR4P JWUcLHZwpVQ2WE1TQh5qnTGhyZYj1aLyvb+9LJgmM1i0c73D4R0IxBnWYxgbYlcGcCLd sn6LMcIrD/CNA6yyT8K8cc63bBSiCPbbh/JVYS5K/xdY84cToqRojO3J4yEU0+MudnXQ W9QU8ny42EYeCyDHI264HZftOKkfBNiCBZKFhPsFsCQGz8WwYjwd3gxkYSIeVAoUCFXq fZnwFACul2iCUIiMDJm0bqPj223U/OZkovr0szSn5UKFyyHXvfNz1EhfiRLXn+CGjncl Sy2A== 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) From: Tom Tromey 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-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: >>>>> "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