Module: wine Branch: master Commit: de3a836629dbce1324c1bc35894ca4756197cbe7 URL: https://gitlab.winehq.org/wine/wine/-/commit/de3a836629dbce1324c1bc35894ca47...
Author: Eric Pouech eric.pouech@gmail.com Date: Thu Nov 17 10:49:35 2022 +0100
dbghelp: Fix handling of BA_OP_ChangeCodeLength (PDB).
This op is heavily used by clang with PDB debug info, while MSVC barely uses it.
This fixes a bunch of problems when loading PDB files generated by clang (eg. the PDB files from wine-gecko).
Signed-off-by: Eric Pouech eric.pouech@gmail.com
---
dlls/dbghelp/msc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 85d12063076..5e7a1badadf 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -2199,8 +2199,9 @@ static struct symt_function* codeview_create_inline_site(const struct msc_debug_ inlined->ranges[index++].high = top_func->ranges[0].low + offset; break; case BA_OP_ChangeCodeLength: - /* this op doesn't seem widely used... */ - inline_site_update_last_range(inlined, index, inlined->ranges[index - 1].low + cvba.arg1); + /* this op isn't widely used by MSVC, but clang uses it a lot... */ + offset += cvba.arg1; + inline_site_update_last_range(inlined, index, top_func->ranges[0].low + offset); break; case BA_OP_ChangeFile: chksms = CV_RECORD_GAP(hdr_files, cvba.arg1);