Open neeraj9 opened 1 year ago
Apparently, https://github.com/davea42/libdwarf-code is an actively maintained project instead of the non-existent reference in this project readme for libdwarf (a broken link).
Any next steps to implement DWARF 5 support to fix this issue is appreciated. I am new to this project and any details or reading material (which includes PRs I should look at) to get started quickly will be of great help.
cc: @rainers
Sorry for the delay. Thanks for the detailed report. Not sure I can help in this case (see below), but is the DLL with debug information available for download somewhere? The one from https://www.gyan.dev/ffmpeg/builds/ doesn't seem to have any.
re DWARF5: Actually, I'm not using this tool anymore myself, as the reference D compiler natively supports emitting usable CodeView debug information for quite some time now. Maybe this might change if GDC (the D compiler in the GCC compiler suite) is made easily available and becomes more popular on Windows.
Apart from the initial implementation, DWARF support is mostly added by other contributors. The basic DWARF5 implementation PRs are https://github.com/rainers/cv2pdb/pull/67 and https://github.com/rainers/cv2pdb/pull/69 (name similarity a coincidence?).
First of all. Thanks for this tool . It is a great start.
Operating System: Windows 11 22H2 x64 Library avfilter-9.dll (from FFmpeg release/6.0 built with debug symbols for win64) via Linux mingw.
Overview
I noticed that some of the symbols are missing, while others exist. I believe there is a case where cv2pdb is able to recognize few in DWARF and not others.
How did I verify this?
Take FFmpeg (release/6.0)
avfilter-9.dll
which was built with debug symbols and then runllvm-dwarfdump
on it. Note thatllvm-dwarfdump
also has an issue, but it still generates sufficient info to validate the claim.The associated source code in FFmpeg
avfilter-9.dll
is as follows:A snippet of the dwarf output is as follows (for reference). Notice that
Notice that the DWARF has all the symbols within the function. Now, lets generate PDB and inspect that with Microsoft cvdump.exe application. I even checked with WinDbg while debugging the application and got same results (so they match).
A snippet of
avfilter-9.pdb.txt
for reference.We can clearly notice that the function
avfilter_graph_create_filter
is missing many symbols. If I look at some of the other functions then they are missing symbols entirely. It appears that cv2pdb is missing implementation of DWARF 5 standard.The DWARF version can be determined via the
.debug_info contents
from the output from llvm-dwarfdump tool.Update: I used
dia2dump
utility provided as a sample from Visual Studio 2022 as well and got similar results as cvdump.exe.The sample output for the same function from
dia2dump
is as follows: