From patchwork Mon Mar 14 04:17:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1604895 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=QSHXiKi/; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KH3Dg2PL6z9sG2 for ; Mon, 14 Mar 2022 15:18:11 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4KH3Dg1gt8z30Lp for ; Mon, 14 Mar 2022 15:18:11 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=QSHXiKi/; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::431; helo=mail-pf1-x431.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=QSHXiKi/; dkim-atps=neutral Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4KH3DS3rl8z30HJ for ; Mon, 14 Mar 2022 15:18:00 +1100 (AEDT) Received: by mail-pf1-x431.google.com with SMTP id z16so13194286pfh.3 for ; Sun, 13 Mar 2022 21:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B9SHa583BEZRGeBXevpOLzGwaOOgfirJSsRAQpSODSk=; b=QSHXiKi/RHrLxCCDKDCfhl8lXd+PXcaOc206m6wdXpiHmHpA6la2VFLbxT4s4/tW8/ xkdrV9p4ZoWHXlfvlLm2yGZVcn37G2oI9+HLvyGn0fQYvZwVjruZU4idX9JFaaFEsSPC ZtqKru16eV0FnRjHxVV+37Wgt0VFc1wZDyGU7SYVP+yx/CvC/fL1yLQiO7lgaalwUOHU WLMFM5JbrBxp1tOoZ8886RWlkPnTFkbq0HfSeAxoK2l4sHXVVufc2BR6nP/+6MzOAdgJ JnodIinnrozJZmbFh77ZflJOqOlImQ0qk9/mEyYpB4arSNfTE8SqmcGymFgPm92QifmY 0KvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B9SHa583BEZRGeBXevpOLzGwaOOgfirJSsRAQpSODSk=; b=hqC2Q/sS+yJIboBlcEhl32PGw2h1SNzx7fA1hZSTyNPqDTnt0bwCkpDxoP2dsqAjQH 1DllGdN2X2vbqooK3mUED224JVJwc/rJ3Wno3nP32x+J8aBPTzNAEOVIPu1J4KWquT2I rycp+ZZpbzpi0tZi656lDNi6u/gsHjAXFnM0jbo96CGNjPsaE8jT8dLLGBcCiYm8Y2zj AZ+a2O8AY3XpyAUmb1LQvhZmHEl9HnKT61wki3yqTIJiSUcmBVHrrLwb88wBuoLLeh4T CGh3dFZKRUsFWb5WtsNm7VSpl8ekWHWar9zVUUm0k+edQSK5nAajUYC8S4QutPhxsluJ o22A== X-Gm-Message-State: AOAM531dAQNeVBgm3yavrZvDjP/7PcuMnlFa3orw0bUQWuMBS4mtlNMa I+6pMA8TMNTM119eKyT73GKGY4K0S7U= X-Google-Smtp-Source: ABdhPJxkkeDIeUrK3xJ7qi7/hykGcjWhgu+SS6598ByAK4ljWV+kJyYqVNgXVlDJ50dNffftJJA3cg== X-Received: by 2002:a65:4c47:0:b0:37d:5eea:232d with SMTP id l7-20020a654c47000000b0037d5eea232dmr18797082pgr.536.1647231478363; Sun, 13 Mar 2022 21:17:58 -0700 (PDT) Received: from bobo.ibm.com (110-175-148-108.static.tpgi.com.au. [110.175.148.108]) by smtp.gmail.com with ESMTPSA id d16-20020a056a00245000b004f771b48736sm14283018pfj.194.2022.03.13.21.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Mar 2022 21:17:58 -0700 (PDT) From: Nicholas Piggin To: pdbg@lists.ozlabs.org Date: Mon, 14 Mar 2022 14:17:28 +1000 Message-Id: <20220314041735.542867-9-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220314041735.542867-1-npiggin@gmail.com> References: <20220314041735.542867-1-npiggin@gmail.com> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 07/14] gdbserver: fix interrupt double response X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Interrupt should not send a TRAP response, that should only be sent when the thread is stopped, which is what the main loop does after the interrupt performs the thread stop. Removing this prevents two TRAP responses being sent to the client after an interrupt. Signed-off-by: Nicholas Piggin --- src/pdbgproxy.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pdbgproxy.c b/src/pdbgproxy.c index 78b1236..ce52e9d 100644 --- a/src/pdbgproxy.c +++ b/src/pdbgproxy.c @@ -320,11 +320,8 @@ static void v_contc(uint64_t *stack, void *priv) static void interrupt(uint64_t *stack, void *priv) { - PR_INFO("Interrupt\n"); + PR_INFO("Interrupt from gdb client\n"); thread_stop(thread_target); - send_response(fd, TRAP); - - return; } static void poll(void)