This is an archive of the discontinued LLVM Phabricator instance.

[llvm-symbolizer][Windows] Add start line when searching in line table sections.
ClosedPublic

Authored by akhuang on Dec 15 2020, 8:29 AM.

Details

Summary

Fixes issue where if a line section doesn't start with a line number
then the addresses at the beginning of the section don't have line numbers.

For example, for a line section like this

0001:00000010-00000014, line/column/addr entries = 1
   7 00000013 !

a line number wouldn't be found for addresses from 10 to 12.

This matches behavior when using the DIA SDK.

Diff Detail

Event Timeline

akhuang created this revision.Dec 15 2020, 8:29 AM
akhuang requested review of this revision.Dec 15 2020, 8:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 15 2020, 8:29 AM
rnk added inline comments.Dec 15 2020, 12:04 PM
llvm/test/tools/llvm-symbolizer/pdb/pdb-line-numbers.test
1 ↗(On Diff #311920)

The input is an object file, not an executable, right? The input should end in .obj, not .exe, in that case.

However, why not make this an assembly test? Check in the generated .s file, which should have .cv_loc directives with line info, and it should be relatively readable.

5 ↗(On Diff #311920)

This corresponds with the location of the brace, right? I think this will make more sense if you interleave it in a .s file after the corresponding .cv_loc directive with the t.cpp:2:13 location.

akhuang updated this revision to Diff 312231.Dec 16 2020, 9:11 AM

Add assembly test

akhuang updated this revision to Diff 312235.Dec 16 2020, 9:15 AM

Remove other binary test

rnk accepted this revision.Dec 16 2020, 9:50 AM

lgtm

This revision is now accepted and ready to land.Dec 16 2020, 9:50 AM
This revision was landed with ongoing or failed builds.Dec 17 2020, 7:58 AM
This revision was automatically updated to reflect the committed changes.