From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) by sourceware.org (Postfix) with ESMTPS id A62583858287 for ; Wed, 15 Jun 2022 12:58:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A62583858287 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-31336535373so60236957b3.2 for ; Wed, 15 Jun 2022 05:58:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=AljLMi1IlKuiDSjZZBITeDquX+NY+P0RzkT2L9oI+gY=; b=lRnAEcX4ExCf7l+MfNuDEvE0XBJ8k3D2yIh5/p00NFdfZ+O5OBlkpNsu0xiiy/Aby6 Qn6X3QGQEnN9zT33BOGcjAmrnQXedOMejC0pBUugLR1vRMTHJseIgHGf9y9qmX5mtxQn WyngQ/7uM6U6JtfM0US4F7D9nWORpDqHO+v83gpTqgmEp9SPKY+YDmYuS9LOifErbSf4 MHVj+wGkwkuVGpH0ZAw70M0JVzV7nP6IfK8W+GutUT+wIEqDbgc0lGC/7B3X7nwxXPlb j6ab+E5jFD/DyRLNpgRXOVoNTU4Q+z5jPFmPVCPHt3ZbTIb279sJr+IHk08pC+i6XqOG OVKQ== X-Gm-Message-State: AJIora+fNlBRYWSpnfvtZKLM2Mg3YYSNkCrZL/BI/fi6kNb0yT1dmTyL tV8+qSlfJAH8gdzBfv20HJuyXaOz2fH3s+clZdE/7fQR+aS9OA== X-Google-Smtp-Source: AGRyM1trlVLz47p+xCu6pdirvfpuwpyBcTpYAdqXeEHeKI1d3rTqjkkfbSkx7zYrbob617V4jPpB4jcmFZTw5byHfK8= X-Received: by 2002:a0d:f707:0:b0:314:27cb:b7e9 with SMTP id h7-20020a0df707000000b0031427cbb7e9mr11610797ywf.335.1655297885903; Wed, 15 Jun 2022 05:58:05 -0700 (PDT) MIME-Version: 1.0 References: <040e723a-1f8b-3fb2-a076-85664243513f@redhat.com> <4ed767fb-f9d6-7dbd-47ce-1691a0a4ee38@redhat.com> In-Reply-To: From: Christian Biesinger Date: Wed, 15 Jun 2022 08:57:27 -0400 Message-ID: Subject: Re: [RFC] Change displayed line when execution direction is reversed To: Bruno Larsen Cc: Reuben Thomas via Gdb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-16.7 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 15 Jun 2022 12:58:08 -0000 In that case I think this change makes a lot of sense! (I was not aware of that option until just now, heh) Christian On Wed, Jun 15, 2022 at 8:50 AM Bruno Larsen wrote: > > You are correct. I would only want to print differently when the user exp= licitly changes the direction. Otherwise it would get confusing very quickl= y, as you mentioned. > > Cheers! > Bruno Larsen > > On 6/15/22 09:47, Christian Biesinger wrote: > > Sorry, just to clarify, you are not suggesting a change when using > > "reverse-next" without "set exec-direction reverse"? > > > > Christian > > > > On Wed, Jun 15, 2022 at 8:39 AM Bruno Larsen wrote= : > >> > >> It would only happen if the user explicitly used the command `set exec= -direction reverse`. If the previous line was printed right after this comm= and is run, I imagine the user would understand what is going on through co= ntext. That said, I'm open to suggestions on other messages or documentatio= ns of the feature to avoid confusion. > >> > >> Cheers! > >> Bruno Larsen > >> > >> On 6/15/22 09:34, Christian Biesinger wrote: > >>> My personal opinion: > >>> In general, the state of the program when gdb is stopped is the state > >>> at the start of the displayed line (I concede that it gets more > >>> complicated when "step"ping) > >>> This change would make it so the state is the state at the end of the > >>> displayed line. > >>> > >>> I think that could be confusing? Perhaps could be mitigated by > >>> printing a message explaining that in some way. > >>> > >>> Christian > >>> > >>> On Wed, Jun 15, 2022 at 8:26 AM Bruno Larsen via Gdb wrote: > >>>> > >>>> Hello all, > >>>> > >>>> I was doing some reverse debugging and noticed that setting the exec= ution direction to reverse does not change how GDB displays lines. The prob= lem with this is that the user doesn't see what will be executed if a step = is taken, which makes the user experience quite annoying. How would the com= munity feel if GDB printed the previous line, instead of current line, when= the execution direction is reversed? > >>>> > >>>> Sorry if this is the wrong list. It didn't feel like a bug, and I do= n't have a patch yet, so this felt like the best place to send. > >>>> -- > >>>> Cheers! > >>>> Bruno Larsen > >>>> > >>> > >> > > >