Hello Alexandre, On 8/22/24 05:39, Alexandre Oliva wrote: > Hello, Bernd, > > Thanks for the fixes and improvements, your patch looks good to me. I > stand behind its approval by someone with authority to do so. > > I believe location views are somewhat problematic on RISC-V, because of > the object code relaxations. Its usefulness is also limited without > support from debug consumers. >
The main deficiency with the location view line-numbers I see, is that it is possible to have different line numbers on the same PC, which have different view numbers, but when debugging an inlined function, it is sometimes impossible to tell if the line number is from the inline function or from the calling function, especially at the end of an inline code range, that is because the DW_AT_ranges value of the inlined_subroutine has only begin and end PC, but to make it clear the begin and end PC+View number would be necessary. This means it is ambiguous, and that probably stated with the non-is-stmt line numbers. > It's unfortunate, in hindsight, that inline entry points ended up tied > to location views. I can't recall any strong reason for that. I > suppose lifting that requirement, so as to enable inline points even > without location views, would be desirable. Would you be interested in > pursuing that? > Thanks a lot for your support, yes, that sounds reasonable, I can look into breaking this connection. PS: I need to make a small fixup to the test cases, as the linaro folks indicated that my test cases should not include the comment sign in "# DW_AT_entry_pc", as that is target dependent. Thanks Bernd. > On Aug 21, 2024, Bernd Edlinger <bernd.edlin...@hotmail.de> wrote: > >> gcc/ChangeLog: > >> * dwarf2out.cc (dwarf2out_maybe_output_loclist_view_pair, >> output_loc_list): Correct handling of -gno-as-loc-support, >> use ZERO_VIEW_P to output view number as zero value. >> * toplev.cc (process_options): Do not automatically disable >> -gvariable-location-views when -gno-as-loc-support or >> -gno-as-locview-support is used. > >> gcc/testsuite/ChangeLog: > >> * gcc.dg/debug/dwarf2/inline2.c: Add checks for inline entry_pc. >> * gcc.dg/debug/dwarf2/inline6.c: Add -gno-as-loc-support and check >> the resulting location views. >