From patchwork Fri Jun 30 18:04:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 697976 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp597277wrs; Fri, 30 Jun 2023 11:15:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGwy5WcfbhpxeeSxtPrCMB8pobojQ+lHMFFJuDU+WgqgxOtk+IvKQ8S/sfMNtZjmJxLJl1u X-Received: by 2002:a05:6359:207:b0:133:595:1c with SMTP id ej7-20020a056359020700b001330595001cmr2454734rwb.31.1688148915537; Fri, 30 Jun 2023 11:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688148915; cv=none; d=google.com; s=arc-20160816; b=BRpxGh2Ss5yfmqGoDOhKAEhyR2KU1V47iX5Z1rG16UZXGewDXtFhIqxyMETQRE2rh5 UDE9mqK5i6gZ7p+YkqIvQgvhB5+xb2hCHyNyLoiwIGVADDsTiX2/6RrunT2G+x6rGx2x RRtduuT0dBkibCwQpnGkeKSdnZSBrp90rCti6BMa+NXJq8SM/XChF9I5DkYf3lzFuWQN QYmMAVK7xi+IB6K85xSMCXj/Jfn+CEDREs10HHTIW/YHYmpzthgAvBtaBMzB16f5b5In KERlr+B+3P0U783szKV0IcrE/4FDt0YIC7pjKnn8DDSgC9qdsn+91y5QB9Cm4XJ5ZLSE vdFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tV6uJjNfKxjFHFViquI0SJu1Ss2OiTFYxgVHQ5LvQag=; fh=ALxGmzvga6tIU6vn0TbLsO8BGacIzfZzO03C4YGEoho=; b=lGnsPC1VIAVlS2+rzQeGAybAQ4l1KFnUQleDmjlY7mOh/n6GO+u/pMYCE7nRU54J1i Ff4BNyQI64U4FAbTdv2jhrR9iewPsmynEp55CvNMiELvtUJRLoYzKe/sKRt4MrH5yX3D x61j8UEuLUoJ9VKLFBtSwnimZ1iDaWDlkvvvUFYDxUgxcIGqE56R8qTEArix6gOQggIE SpjsXFQbuOFL7Fiq19B4rHuPSfQwxeJcpsXs+oVKVwi0rcT+kYoh6nfF1vNrUl4V/Uc4 55GxRBphiuq4J/tM0GG0tEsvXfBNFGQl607zteblJmKTlZ2FhHn8hzUJtyKKi0hR8Pix 3Itw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OoJv59s6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z13-20020ac87f8d000000b003e4e9ddc6f9si8307028qtj.118.2023.06.30.11.15.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Jun 2023 11:15:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OoJv59s6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFId6-0005ki-78; Fri, 30 Jun 2023 14:14:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFIcl-0005T1-4f for qemu-devel@nongnu.org; Fri, 30 Jun 2023 14:13:39 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qFIcg-0003XY-LP for qemu-devel@nongnu.org; Fri, 30 Jun 2023 14:13:38 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3fb4146e8ceso24686915e9.0 for ; Fri, 30 Jun 2023 11:13:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688148813; x=1690740813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tV6uJjNfKxjFHFViquI0SJu1Ss2OiTFYxgVHQ5LvQag=; b=OoJv59s6DKWXwTqzOtPlJEpShOSxoQvzfmw/Q7NevrMIOxHOBPj5glmCOJaetH9Fml TAjkFFeaz6J4xW94nYXWNFN3YtlQPtIiBZOzZunzagKMmO4T9JjhumgvtNivnJr4bdoz 6pA96NB4/uc30H1ff2QVp5p6DGYjxO8Xgh3XhbWUj7UFzuIynyR7+R1NdJqobn1fyK1O PKUMiC4nR8f4lhDRGRK4epEosjIASKDcS9gUmSSc2j6ISNkUF08gfpIzTqoWnShQqbLH 4RP4Gir1WeR36WZJs3JjS6VWA+vy2ddNHUU3aoNL0QPYsyJw2j6RdcCUrgO9H5fXKZXc Z6oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688148813; x=1690740813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tV6uJjNfKxjFHFViquI0SJu1Ss2OiTFYxgVHQ5LvQag=; b=gtCkyGuD1z5fDzgtcPqICD9k+CXSgqa/A23XM6rVwgm2TQ4k+0adL7lPGRXd8zClWL i26xyNsvpZrSFJLafuSJjbmhj6JpdspF5VkkbV8YXRAyb+U1NicSCti0QIbNrJL3TRpi RaFnfa8G7LHXT1QrBxevSAyF31Ml/7wmUdfwS4cX/Ignokkz2xoKIhgFQYs5DxH45EGd FxuGINgys2E6sDdgY7lIhZiTi+d2L56vJMdZtaq01XM0Kakf/5M6CfSUb6zrElUcj+cf AijrxlnbDsIKvdaWwO6F6uyMCguRyyUOVCix8Qv9EtYtOxTRTzoZ+OZPrq/x8oXb+pMF uXpw== X-Gm-Message-State: AC+VfDzx0vfvOCNnk7VlariqOY3qtOBxThKAsrMJ/XN0O3Cju7x0bReF KRC1wISFMkEFLKb8EWQIE++AQw== X-Received: by 2002:a05:600c:22d4:b0:3fa:9850:8b12 with SMTP id 20-20020a05600c22d400b003fa98508b12mr2554049wmg.21.1688148813030; Fri, 30 Jun 2023 11:13:33 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 25-20020a05600c029900b003f42158288dsm22573094wmk.20.2023.06.30.11.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 11:13:30 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4FF8A1FFD3; Fri, 30 Jun 2023 19:04:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , Stefan Hajnoczi , Leonardo Bras , Laurent Vivier , Peter Xu , Juan Quintela , Beraldo Leal , Radoslaw Biernacki , Qiuhao Li , Peter Maydell , Yanan Wang , Riku Voipio , Wainer dos Santos Moschetta , Mahmoud Mandour , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Eduardo Habkost , Thomas Huth , Laurent Vivier , Bin Meng , Marcel Apfelbaum , Bandan Das , Cleber Rosa , Richard Henderson , Leif Lindholm , Marcin Juszkiewicz , qemu-arm@nongnu.org, Darren Kenny , Alexander Bulekov , Nicholas Piggin , qemu-stable@nongnu.org, Matheus Tavares Bernardino , Taylor Simpson Subject: [PATCH v4 29/38] gdbstub: Permit reverse step/break to provide stop response Date: Fri, 30 Jun 2023 19:04:14 +0100 Message-Id: <20230630180423.558337-30-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230630180423.558337-1-alex.bennee@linaro.org> References: <20230630180423.558337-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Nicholas Piggin The final part of the reverse step and break handling is to bring the machine back to a debug stop state. gdb expects a response. A gdb 'rsi' command hangs forever because the gdbstub filters out the response (also observable with reverse_debugging.py avocado tests). Fix by setting allow_stop_reply for the gdb backward packets. Fixes: 758370052fb ("gdbstub: only send stop-reply packets when allowed to") Cc: qemu-stable@nongnu.org Cc: Matheus Tavares Bernardino Cc: Alex Bennée Cc: Taylor Simpson Signed-off-by: Nicholas Piggin Acked-by: Matheus Tavares Bernardino Message-Id: <20230623035304.279833-1-npiggin@gmail.com> Signed-off-by: Alex Bennée --- gdbstub/gdbstub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index be18568d0a..9496d7b175 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -1814,6 +1814,7 @@ static int gdb_handle_packet(const char *line_buf) .handler = handle_backward, .cmd = "b", .cmd_startswith = 1, + .allow_stop_reply = true, .schema = "o0" }; cmd_parser = &backward_cmd_desc;