NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
52.09k stars 5.9k forks source link

[PDB] Local variables names are not recognized #7099

Open SmileyAG opened 1 month ago

SmileyAG commented 1 month ago

Describe the bug

Here is CBasePlayer::Jump function from source code of the project on the basis of which another project was made that is shown in the screenshot below: https://github.com/HLSources/Paranoia/blob/c2d8018e3fa9de209ba76c0bbe8491bc09d8d797/code_src/dlls/player.cpp#L1892

In the screenshot you can clearly see the absolute similarity of the names of local variables in the result from IDA decompiler shown in the screenshot in comparison with the provided source code, so this data indeed matches. Meanwhile, Ghidra cannot recognize local variable names from a PDB file.

To Reproduce Steps to reproduce the behavior:

Screenshots

comparison-of-pdb-parsers-in-the-decompiler

Attachments

Get from #6463

Environment (please complete the following information):

ghizard commented 4 weeks ago

Thank you for submitting this as a separate issue. As indicated in #6463, the setting of local variables is a tough issue due to the Decompiler transformations, but it is a very important issue. I've kept the naming local variable and parameters in tight association, but recently had new ideas for how to tackle the parameters part of the problem.

I believe that both of these might play a part in #7101. I will discuss more about this in that issue.