From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id O/htKbEw+F9QKAAAWB0awg (envelope-from ) for ; Fri, 08 Jan 2021 05:15:13 -0500 Received: by simark.ca (Postfix, from userid 112) id 967E31E99A; Fri, 8 Jan 2021 05:15:13 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 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 A10241E4F4; Fri, 8 Jan 2021 05:15:12 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 53A753973013; Fri, 8 Jan 2021 10:15:12 +0000 (GMT) Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 0D6F2384A01A for ; Fri, 8 Jan 2021 10:15:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0D6F2384A01A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x432.google.com with SMTP id a12so8412950wrv.8 for ; Fri, 08 Jan 2021 02:15:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=wmOtKHyj4+rZBUikVeNsvtSpansoxvt1bWJpHwbweDY=; b=hc57q8bywvg939yQaAUeXaiHx/HIzgC48iotEvVNU+gEl/z+RVSzXqj33qhIeQE5T2 IFn/r33pUwxhMaurw7ck/jpnmmKcczguECgdQFgoBiwGafN0AP4jZ/KLTc4V1Ty6quZY FXb4GVvb6p1XzO4ovz83dnJ/bokaWMOjIW12kfUvTyrc6bkH1YEsSGkcfskoirlDMjuG TsfRwzfb2RuFK33LC+FiZsP+FzlI1jTOx5EYI6qiAyEW49AQsCbZjMSioFL4igS2Sg75 aUr4f4iOTVTVfguYBCanDiufEkMP2NiP/OhnRQapfPH2+aIxO1gxcFH1288vg9sNmdFo Cwbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wmOtKHyj4+rZBUikVeNsvtSpansoxvt1bWJpHwbweDY=; b=Jshf0dtMX9SsdgwZU0jwTQwj05g+ydzt5W/2KQuSKWXkQ3GIoM+JSRfitflfpa51E7 jF8xPzciQ0RkJ+efUvYgSG5h7r0SvXj9aAj2a7wqoWGy7UtkROiOSKubecb66LCY/I0I CnTH4eMdVSWbMpW7P6+FT7BwiwWJaa8CtMhgrkEX/WwK4trbcPvsL3Cb+oPvjRDGVxQL XvSfCLTGv+GL/H+IsHecJ3HmxIx/nA+fTz3g9EULlfVYQ7DcjvKe75sNAwEj0/JduJGI KVkz0tWq2CqNQbwjpxfy2Ek3XtZwWs4FNM57SpxO/s1tYqyS/kHtMbNIVQa7C0x7XANS iXZw== X-Gm-Message-State: AOAM532g6vv6/K+LNGSy9z00poXHCASJZEpWmAOENN/CpGXWlhy0BP1h 1qMuUFyxgsfMYD++tRvoSGi0eA== X-Google-Smtp-Source: ABdhPJy3Hj0vNwbzqCbGLtHcX+MR2hScgWV8++EOqx/OGYyusPj2lmRoUWKGiUKMpI2z13yrS6GY3w== X-Received: by 2002:a5d:5913:: with SMTP id v19mr2915119wrd.207.1610100908230; Fri, 08 Jan 2021 02:15:08 -0800 (PST) Received: from localhost (host86-166-129-230.range86-166.btcentralplus.com. [86.166.129.230]) by smtp.gmail.com with ESMTPSA id j15sm12802803wrr.85.2021.01.08.02.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jan 2021 02:15:07 -0800 (PST) Date: Fri, 8 Jan 2021 10:15:06 +0000 From: Andrew Burgess To: Simon Marchi Subject: Re: [PATCH] gdb: better handling of 'S' packets Message-ID: <20210108101506.GW2945@embecosm.com> References: <20201111153548.1364526-1-andrew.burgess@embecosm.com> <22799d1d-7713-7ab5-f029-d914eafbf624@polymtl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22799d1d-7713-7ab5-f029-d914eafbf624@polymtl.ca> X-Operating-System: Linux/5.8.13-100.fc31.x86_64 (x86_64) X-Uptime: 10:08:30 up 30 days, 14:52, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] 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: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" * Simon Marchi [2021-01-07 22:00:14 -0500]: > Hi Pedro, > > It looks like you reviewed v1, but Andrew had posted v2: > > https://sourceware.org/pipermail/gdb-patches/2020-December/174277.html > > I don't know if that was on purpose. > > On 2021-01-07 7:51 p.m., Pedro Alves wrote: > > I'll look at Simon's patch next, and your thread/frame patches after. > > Hopefully tomorrow. > > I adapted Andrew's v2 to work on top of my patch that makes the remote > target track the threads' resume state, and so far it looks good (Andrew's > test still passes). I'll give it a test run and send a combined series. Thanks Simon. I think this is the best approach. The V2 patch addresses the core issue that was raised in the bug only, while the V1 patch goes beyond this. The reason the V1 patch came about is that originally I struggled to find a way to reproduce exactly the issue that was reported in the bug. To reproduce I was testing gdbserver with 'T' and 'Tthread' disabled and I kept running into other bugs in cases where I would tell myself, yes the remote is wrong not to include a thread-id, but GDB _should_ be able to figure out what I'm doing here. As Pedro points out in his V1 patch review, we should probably go for simplicity over complexity in the face of a badly behaving remote target. So long as GDB doesn't crash/assert, just throwing a warning at the user is fine. NOTE: The V2 patch does address a _real_ bug in GDB, so absolutely should still go in. Once V2 is merged I'll rebase the V1 patch and see how complex it actually looks. I might repost it if it doesn't add too much complexity, but I might just drop it. Thanks. Andrew