On Thu, Sep 4, 2025 at 12:28 AM Jeff Law <jeffreya...@gmail.com> wrote: > > > > On 9/3/25 1:27 PM, Sam James wrote: > > Back in GCC 8, with r8-5241-g8697bf9f46f361 (-gstatement-frontiers), > > r8-6658-g58006663903200, r8-6657-gbd2b9f1e2d67ec > > (-gvariable-location-views), > > some advanced GNU extensions to DWARF were introduced and enabled by default > > with the aim of improving debugging optimized code. > > > > Unfortunately, as of yet, consumer support has't materialised in neither > > GDB nor LLDB and there's no sign of any progress on those fronts. On the > > GCC side, there's a large number of -fcompare-debug issues involving > > -gstatement-frontiers, and some others involving -gvariable-location-views, > > and there's nobody working on those at present. > And cases where statement frontiers and/or location views cause compile > time to explode. > > > > > > Alexandre Oliva was the architct of the work and has recommended they > > be turned off by default for the foreseeable future. Implement that. > And I believe I green-lit the effort from the Red Hat side at the time > with the expectation that the GDB effort would follow shortly after we > had the GCC bits ready. That didn't materialize for "reasons". > > > > > > gcc/ChangeLog: > > PR debug/99654 > > PR debug/104277 > > PR middle-end/103836 > > PR debug/121045 > > > > * common.opt (gvariable-location-views): Default to 0, not 1. > > (gvariable-location-views=incompat5): Default to 0, not 2. > > * opts.cc (finish_options): Don't default-enable > > opts->x_debug_nonbind_markers_p for DWARF. > > * toplev.cc (process_options): Don't default-enable > > debug_variable_location_views. > > > > gcc/testsuite/ChangeLog: > > > > * g++.dg/debug/dwarf2/deallocator.C: Adjust test. > > * gcc.dg/debug/dwarf2/inline2.c: Pass -gstatement-frontiers > > -gvariable-location-views. > > * gcc.dg/debug/dwarf2/inline6.c: Ditto. > > --- > > Bootstrapped and tested on x86_64-pc-linux-gnu. OK? > I'm generally supportive. But given the nature of the change I'd like > to hear from Jakub & Richi before acking.
I'm in favor of disabling but I also fear the code will bitrot quickly if so? We might also want to have a set of testcases for the -fcompare-debug issues that are fixed by the change of defaults? Otherwise I defer to Jakub who will better remember why we didn't do this earlier. Richard. > > jeff >