https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105108

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> Yeah, there is nothing we can do in the debug info about this.
> We really can't inline just for the purposes of debug stmts or something
> similar.
> Another similar case would be if l_144 is assigned b() but isn't actually
> used at all, if b() is pure (explicitly or implicitly detected), the call
> will be DCEd and there is no way how to express it in the debug info.

I wondered if one could extend DWARF to have an expression op that says
'call this abstract function described in DIE x [with arguments from stack]
and push the result'.  That could also be used to maybe abstract parts of
DWARF expressions into DWARF expression functions and in theory we could
compile functions into DWARF bytecode if there's no native copy emitted
to be called from the debugger in inferior context (to some extent at least).

Reply via email to