[PATCH] D67723: [DebugInfo] Add option to disable inline line tables.

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 14 16:00:41 PDT 2019


dblaikie added a comment.

In D67723#1708671 <https://reviews.llvm.org/D67723#1708671>, @aprantl wrote:

> > Since that change, we treat line zero the same as "no location". If there are no locations in a basic block, then the whole block inherits the line number from the block layout predecessor, which could be unrelated. Keeping the inlined call site location gives us the highest likelihood that "step over" will stop at the next statement.
>
> Who is "we" in this context? The CodeView backend?
>  As far as DWARF is concerned (and LLVM mostly inherits the DWARF semantics) line 0 is well-defined and means compiler-generated code or otherwise no unambiguous source location. DWARF-based debuggers know to skip over instructions with line 0.
>
> Is the problem that CodeView doesn't have this concept, or does the Windows debugger no know how to deal with it (or both)?
>
> I'm feeling rather strongly that that LLVM should not be emitting wrong debug info to work around bugs in a debugger. I understand that sometimes this isn't possible because we don't control the consumers. The correct thing to do here is to guard the workaround by a debugger tuning flag. For DWARF, we do want line 0 here.


(+1 to all that, FWIW)

Though I think in this case since it's got to be handled during the transformation (rather than as an after the fact choice at debug-info-emission time) it might not be practical to guard by a debugger tuning flag. It could/should be guarded though, but may just have to be guarded by the format (not that we have any other debuggers consuming CodeView anyway, so I think it's sufficient here).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67723/new/

https://reviews.llvm.org/D67723





More information about the cfe-commits mailing list