From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ikhGD+aRc2KwbAQAWB0awg (envelope-from ) for ; Thu, 05 May 2022 04:59:18 -0400 Received: by simark.ca (Postfix, from userid 112) id 34DDC1E058; Thu, 5 May 2022 04:59:18 -0400 (EDT) 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=FXbhK13U; 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=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 B7DFB1E00D for ; Thu, 5 May 2022 04:59:17 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C22923856260 for ; Thu, 5 May 2022 08:59:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C22923856260 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1651741156; bh=leE6HDAC/6M8FknnUVhCln8eRoVI732bxFfd6fpP+2s=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=FXbhK13U2DX7wlxYtsuma1y//FOoa7YuAsK5RLKorLiYSienWl1xoP2+sm8fouSmU IR8yvFAQE0wwOfTs6hXZCSyrGOdKUUmV1NGCJG7RIgr/cG5wM+WY7wDzDyse64xAWF frZxcbqiJAsuojWjPsVnzzPYTFVhdYpl+6K5iIfA= Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [170.10.129.74]) by sourceware.org (Postfix) with ESMTPS id 22CC43856240 for ; Thu, 5 May 2022 08:58:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 22CC43856240 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-ljeVadvZPQm07E-kgkDXJQ-1; Thu, 05 May 2022 04:58:44 -0400 X-MC-Unique: ljeVadvZPQm07E-kgkDXJQ-1 Received: by mail-wm1-f69.google.com with SMTP id r186-20020a1c44c3000000b00393f52ed5ceso4205587wma.7 for ; Thu, 05 May 2022 01:58:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=leE6HDAC/6M8FknnUVhCln8eRoVI732bxFfd6fpP+2s=; b=ZkgCt3nWsiCXWER6LuK54J7ZaEBHwQbqp8scUI8do8YrHXzPRWgBRKS1aH19Tg3aRl U77jwcHjLnhfWY0+t2HDnz7PW1bH6Md0hQhvOyga9ljEol6eN9aPkys458+bdn+SBXGE pCKg9P1OHfm81unBLIivSGglYeqwcEc2e1ld5wEG9PwRgoc2m3BzG+ymdrFUl6oIPEYc k6L8ljrAK1a0M7a4ahd6bgUKZbPYryfZ+TxScMhkaohspX6CpHCKkpugq9o4ERuVDX8k 4SuZePE+5P65bXtYyboWCxyirsoMu3HUaE/hNE+UvcipUgkVaXc1SmFnch9OqV4/O7kV 4N3w== X-Gm-Message-State: AOAM531CNphjuh7ZeK3UjdDCsFSqFY47mV8SIVaM7tF6CA7iETnp+Mps PI+BYUNJsd5PQg6dCyTCGoMs7API3YpMU5s8HumRSHvohUV2zw1ajbG+57famTWBwyr7E8Nzdzx 6uYpNU4aok/s= X-Received: by 2002:a05:600c:2844:b0:393:f6fb:5897 with SMTP id r4-20020a05600c284400b00393f6fb5897mr3680707wmb.66.1651741122918; Thu, 05 May 2022 01:58:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJ59jSQq16P5GG3hMw6NfpQ1DmrJUWQ8dOb8Ny1L9cwLhRiYtAbpz/bi+Pg7u3nZg2NcpV8Q== X-Received: by 2002:a05:600c:2844:b0:393:f6fb:5897 with SMTP id r4-20020a05600c284400b00393f6fb5897mr3680697wmb.66.1651741122654; Thu, 05 May 2022 01:58:42 -0700 (PDT) Received: from localhost (host81-136-113-48.range81-136.btcentralplus.com. [81.136.113.48]) by smtp.gmail.com with ESMTPSA id o1-20020a5d6701000000b0020c9520a940sm861367wru.54.2022.05.05.01.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 01:58:41 -0700 (PDT) To: Tim Newsome , gdb Subject: Re: gdb doesn't notice when a target resumes In-Reply-To: References: Date: Thu, 05 May 2022 09:58:40 +0100 Message-ID: <87h764mk3j.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Andrew Burgess via Gdb Reply-To: Andrew Burgess Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" Tim Newsome writes: > In a setup like this: > gdb --- OpenOCD --- hardware target > > I can download a program, debug, everything is fine. Let's say we're halted > somewhere. > Now something happens that causes the hardware target to be running again > and no longer halted. OpenOCD notices quickly because it polls the target. > But gdb doesn't ever notice that the target was resumed. There doesn't > appear to be a notification packet > > for > OpenOCD to even communicate to gdb that the target has resumed. > > Am I missing something? Have people attempted to tackle this problem? The following is my understanding, others might have a better understanding that contradicts what I say here. GDB expects to be the one driving the state of the target. It's not expected that the target will just resume execution without GDB being the one to set the target resumed. And that makes sense I think. GDB is primarily a debugger. If, as a user, I stop the target in order to examine the state, and the hardware suddenly resumes execution, that's a pretty poor user experience I think. Depending on what the "something" is that sets the target running, you might have more luck if that "something" could instead tell GDB to resume the target. Otherwise you'd need to change GDB I think. Maybe non-stop mode could support the concept of the targtet asynchronously resuming... but I suspect it would not be a trivial addition. Thanks, Andrew