On Mon, 9 Aug 2021, Eric Botcazou wrote: > > But it is okay that we can set a breakpoint on defs__struct1IP, > > in the test case of PR 101598. > > And the debugger shall only show assembler here. > > Right? > > The defs__struct1IP procedure should be totally transparent for the user, so > setting a breakpoint in it is not supposed to come into play. > > > Do you have an example where this location information is used in the > > compiler itself for debugging? > > That's useful when you compile the code with -gnatD, i.e when you debug the > intermediate code generated by the front-end. > > > I assume You would agree that having the location for Test2 is better > > than no debug info at all? > > But we want no debug info at all for these IP functions. > > > What do you think? > > I guess I still don't understand why DECL_IGNORED_P was changed.
ISTR it was changed because at least with location info generated by gas there's no way to have "no location" for a portion of code. Instead the assigned location will be that of the previous .loc directive which results in random and confusing results for the pc range of the DECL_INGORED_P function. I guess we should really revisit the decision to rely on gas to produce line info. What's the advantage of doing so (apart from "nice" annotated assembly)? Richard.