Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line number annotation match fails on edge case #57

Closed
disinvite opened this issue Jan 3, 2025 · 0 comments · Fixed by #58
Closed

Line number annotation match fails on edge case #57

disinvite opened this issue Jan 3, 2025 · 0 comments · Fixed by #58
Labels
bug Something isn't working

Comments

@disinvite
Copy link
Collaborator

See isledecomp/isle#1309. We want to annotate a function like this (line numbers added):

34     // FUNCTION: LEGO1 0x10002380
35     // FUNCTION: BETA10 0x1000fd90
36     float (*Matrix4::GetData())[4]
37     {
38     	return m_data;
39     }

The LINES section in the PDB shows that this function begins on line 36. All other functions so far have "started" on the line with the curly brace (37), and this is what we expect when parsing. The curly brace is always on its own line because we enforce Allman-style indenting via clang-format.

You may ask: What is special about this function that causes MSVC to behave differently? I don't think this is worth pursuing (except for one's own curiosity) because other compilers can do as they please (re: line-to-address reporting) and reccmp has to work with the data it gets.

I think the short term solution is to match any of the lines between the end of the marker comments and the curly brace. This is prone to problems if you edit the file without recompiling (and updating the PDB), but this is already a limitation of the parser.

@disinvite disinvite added the bug Something isn't working label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant