Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3C799EB64DA for ; Sat, 8 Jul 2023 06:18:20 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qI1Fo-0003VV-9e; Sat, 08 Jul 2023 02:17:12 -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 1qI1Fm-0003Up-LT; Sat, 08 Jul 2023 02:17:10 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qI1Fk-0006O5-Ma; Sat, 08 Jul 2023 02:17:10 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 5573A126D3; Sat, 8 Jul 2023 09:17:07 +0300 (MSK) Received: from [192.168.177.130] (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with ESMTP id 6569813A02; Sat, 8 Jul 2023 09:17:03 +0300 (MSK) Message-ID: Date: Sat, 8 Jul 2023 09:17:03 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PULL 29/38] gdbstub: Permit reverse step/break to provide stop response Content-Language: en-US To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Nicholas Piggin , qemu-stable@nongnu.org, Matheus Tavares Bernardino , Taylor Simpson , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= References: <20230703134427.1389440-1-alex.bennee@linaro.org> <20230703134427.1389440-30-alex.bennee@linaro.org> From: Michael Tokarev In-Reply-To: <20230703134427.1389440-30-alex.bennee@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -69 X-Spam_score: -7.0 X-Spam_bar: ------- X-Spam_report: (-7.0 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.092, RCVD_IN_DNSWL_HI=-5, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 03.07.2023 16:44, Alex Bennée wrote: > 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 Hi! Are you guys sure this needs to be in -stable? To me it looks a sort of "partial revert" of a previous commit: commit 758370052fb602f9f23c3b8ae26a6133373c78e6 Author: Matheus Tavares Bernardino Date: Thu May 4 12:37:31 2023 -0300 Subject: gdbstub: only send stop-reply packets when allowed to which introduced `allow_stop_reply' field in GdbCmdParseEntry. This change ("gdbstub: Permit..") does not work in 8.0 without the above mentioned "gdbstub: only send" commit, and I guess it is *not* supposed to be in stable. Or is it? I'm not applying this one to stable for now. Thanks, /mjt > 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 > Message-Id: <20230630180423.558337-30-alex.bennee@linaro.org> > > 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;