[RFC] Change displayed line when execution direction is reversed

Christian Biesinger cbiesinger@google.com
Wed Jun 15 12:57:27 GMT 2022


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 <blarsen@redhat.com> wrote:
>
> 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 <blarsen@redhat.com> 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 <gdb@sourceware.org> 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
> >>>>
> >>>
> >>
> >
>


More information about the Gdb mailing list