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

Bruno Larsen via Gdb-patches
2023-05-11T16:23:37Z

On 11/05/2023 18:01, Simon Marchi wrote:
>> +with_test_prefix "with-column-info" {
>> + run_tests
>> +}
> So, the above assumes that the compiler generates column-info by
> default, which has not historically been the case for GCC (it started to
> emit columns by default with version 8, according to my tests). Other
> compilers may choose to not emit them by default.
Yes, column info started being generated in gcc7 and was made default in
gcc 8
>
> I think it would make sense to make gdb_compile recognize the new
> "column-info" and "no-column-info" options, which would translate to the
> right flags for the given compiler. gdb_compile already handles the
> nitty gritty details of choosing compiler flags for specific compiler
> versions. This way, individual tests don't contain compiler flags that
> are possibly compiler-specific.
>
I was going to suggest something similar in an earlier revision, but
when I tried to look for how to control it in clang, I couldn't see it
at all, that's why I thought it was OK to restrict it to gcc only. Can
clang (or other compilers for that matter) emit this information?

Also, how would gdb_compile handle if the current compiler doesn't
support a given option, but the others do? Should it loudly fail, or
silently ignore the "broken" option? If the second, I guess there is no
harm in allowing clang to run these tests and testing the same scenario
twice

--
Cheers,
Bruno