[PATCH] D135166: [DebugInfo] getMergedLocation: Maintain the line number if they match

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 10 02:25:43 PDT 2022


Orlando added a comment.

Hi, sorry, I have been meaning to comment here but it's taken me a while to get to.

> Use column 0 instead of leftmost-column

+1 I think this is the right move (please update the patch description / comment before you commit).

"line 0" has a special meaning - that the instruction can't be attributed a single line number (e.g. because the instruction represents some merged instruction). I don't think that is actually mentioned anywhere in the DWARF spec but is more of a convention between DWARF emitters and consumers. Does column 0 convey the same meaning I wonder? I guess if your debugger uses column info and points at the start of the line (column 0) then that is an intuitive indication that column number isn't known, even if it's not explicit.

I think this kind of change might be worth documenting somewhere (release notes? I'm not sure how they work), given that it could reasonably affect DWARF consuming tools, @dblaikie wdyt?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135166



More information about the llvm-commits mailing list