RE: [PATCH] Fix reverse stepping multiple contiguous PC ranges over the line table.

Carl Love via Gdb-patches
2023-05-04T14:52:54Z

Bruno:

On Thu, 2023-05-04 at 11:24 +0200, Bruno Larsen wrote:
> On 04/05/2023 04:55, Carl Love wrote:
> > Bruno:
> >
> > On Wed, 2023-05-03 at 11:53 +0200, Bruno Larsen wrote:
> > > On 27/04/2023 22:59, Carl Love wrote:
> > <snip>
> <snip>
> > > > +
> > > > +# This test uses the gcc no-column-info command.
> > > Correct me if I'm wrong, but it seems to me that the other test
> > > is a
> > > more generic version of this one, so this test could check for a
> > > gcc
> > > recent enough to support this feature, instead of just
> > > generically
> > > gcc.
> > > That said, gcc added it on version
> > > 7(
> > > https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=0029b929c9719a
> > > ), is it
> > > old enough that we don't care?
> > GCC supports line tables, I don't know that clang or other
> > compilers
> > do. So all we really need is to check for gcc. The line table
> > stuff
> > was added a long time ago so not sure that we really need to check
> > for
> > version 7 at this point. So just checked that we are using
> > gcc. The
> > "other test" func-map-to-same-line.exp expects the line table so it
> > should probably also be checking that we are using gcc.
>
> GCC 7.1 (first gcc 7 release) was on May 2nd 2017, almost exactly 6
> years ago, and there was a gcc 6.8 release in october 2018. I don't
> know
> if 5 years is long enough to assume that everyone has abandoned the
> old
> version (especially seeing as we sometimes test for gcc 4 or 3, but
> that
> might just be old cruft). That said, it's not a blocker for me, so
> /shrug

OK, I would think that it has been there long enough. But it does
sound like there is the occasional test on an old gcc. So, OK lets
restrict it to GCC 7 and later.

>
> Also, clang will have line tables - otherwise almost nothing on our
> test
> suite would work. It doesn't have column info, though, which is why
> I'm
> fine with it being ignored in the test that uses -gno-column-info.
>
> > > > +if ![is_c_compiler_gcc] {
> > > > + unsupported "gcc is required for this test"
> > > > + return 0
> > > > +}
> > > > +
> > > >

<snip>

> From my understanding, you could have architectures or inferiors
> that
> support reverse execution without needing to record, that's why
> "supports_reverse" and "supports_process_record" are different.
>
> However, if you want to restrict this to record-only, that's fine, I
> just think it should be a requirement at the top of the test, not in
> the
> middle of the execution.

I can't imagine how you can do remote execution without recording but
if they can do that OK. The test really should be at the top, missed
that part. So, I will change this to "supports_reverse" and get it at
the top where it belongs.

Thanks for the clarification and help with this.

Carl