From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 977463858287 for ; Wed, 15 Jun 2022 12:50:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 977463858287 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-408-ADGQS9XYOGKsfTRLEJfGjA-1; Wed, 15 Jun 2022 08:50:01 -0400 X-MC-Unique: ADGQS9XYOGKsfTRLEJfGjA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D9E18299E776; Wed, 15 Jun 2022 12:50:00 +0000 (UTC) Received: from [10.97.116.32] (ovpn-116-32.gru2.redhat.com [10.97.116.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5851D2166B26; Wed, 15 Jun 2022 12:50:00 +0000 (UTC) Message-ID: Date: Wed, 15 Jun 2022 09:49:58 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [RFC] Change displayed line when execution direction is reversed To: Christian Biesinger Cc: Reuben Thomas via Gdb References: <040e723a-1f8b-3fb2-a076-85664243513f@redhat.com> <4ed767fb-f9d6-7dbd-47ce-1691a0a4ee38@redhat.com> From: Bruno Larsen In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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:50:05 -0000 You are correct. I would only want to print differently when the user explicitly changes the direction. Otherwise it would get confusing very quickly, 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 command is run, I imagine the user would understand what is going on through context. That said, I'm open to suggestions on other messages or documentations 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 execution direction to reverse does not change how GDB displays lines. The problem 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 community 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 don't have a patch yet, so this felt like the best place to send. >>>> -- >>>> Cheers! >>>> Bruno Larsen >>>> >>> >> >