Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
921 stars 208 forks source link

PDB Doesn't correct apply calling convention for fastcall #5761

Open plafosse opened 3 months ago

plafosse commented 3 months ago

Version and Platform (required):

Bug Description: Binary Ninja can properly figure out the difference between stdcall and fastcall in x86 windows binaries. However when debug info is applied at least in this particular case the calling convention is not correctly set.

Steps To Reproduce: Please provide all steps required to reproduce the behavior:

  1. Open the shcore.dll binary shared internally with debug info enabled
  2. Open the same binary again without debug info
  3. View 10024bd0 int32_t __stdcall InlineIsEqualGUID(struct _GUID const& arg1, struct _GUID const& arg2) on both
  4. Observe the calling convention is correct before debug info is applied and incorrect afterward
CouleeApps commented 3 months ago

So the pdb loader is accurately reflecting what the pdb says, namely ?InlineIsEqualGUID@@YGHABU_GUID@@0@Z which demangles to int __stdcall InlineIsEqualGUID(struct _GUID const &,struct _GUID const &). Not sure this is our bug...