Debug symbols for libgpgme-11.dll

Daniel Lo Nigro d at
Wed Feb 6 08:04:19 CET 2019

I worked this out. Even though I passed CFLAGS and CXXFLAGS to the
./ or ./configure call in the root directory, it seems like the
gpg4win build process didn't pass the flags to the package builds.

I manually modified
src/playground/build/gpgme-1.12.1-beta43-build/src/Makefile and changed
these flags:

CFLAGS: Added -gdwarf -O0
CXXFLAGS: Changed -O2 to -gdwarf -O0

Then I re-ran make, and ran the resulting .dll through cv2pdb. Now the
debug symbols appear to be working in Visual Studio, although I haven't had
time to actually try and debug an issue yet.
Daniel Lo Nigro | Twitter <> | Facebook

On Tue, Feb 5, 2019 at 10:14 AM Daniel Lo Nigro <d at> wrote:

> Hey Andre, thanks for your reply. I also managed to compile my own
> version, however both my build and your build seem to be missing the debug
> symbols for libgpgme itself. I was trying to use a tool called "cv2pdb" (
> to convert the debug symbols into a
> PDB file that Visual Studio can use, however it didn't work properly, and
> its author said that the library is missing the symbols:
> There is only debug information for the mingw runtime in the original DLL.
>> You can check by dumping the output of `objdump.exe -W
>> libgpgme-11-original.dll` and searching for `DW_TAG_compile_unit`.
>> I guess something went wrong when building a debug version of that DLL.
> See
> Is there some build step that is unintentionally stripping out symbols
> from the object files before linking, or something like that? I don't write
> any C or C++ so I'm unfamiliar with the build processes.
> --
> Regards,
> Daniel Lo Nigro
> | Twitter <> | Facebook
> <>
> On Tue, Feb 5, 2019 at 2:40 AM Andre Heinecke <aheinecke at> wrote:
>> Hi,
>> On Monday, February 4, 2019 9:28:55 AM CET Daniel Lo Nigro wrote:
>> > In that case, is there a pre-compiled version with GDB debug symbols
>> > available? I should be able to attach GDB instead of Visual Studio and
>> at
>> > least get a stack trace of where the error is being thrown in the native
>> > library.
>> I would not be so sure, I had bad experiences using GDB in the past on
>> Windows. But you can of course try. Our code is compiled with gcc / mingw
>> from
>> debian stretch.
>> I've uploaded a dll of 1.12.1-beta43 (the version in Gpg4win-3.1.5) with
>> debugsyms (as created by the Gpg4win buildsystem) at:
>> div/libgpgme-11.dll <>
>> > Or would I need to compile it myself with optimizations disabled?
>> Might be better because then you could also add debug output in the
>> codepath
>> where it is crashing for you.
>> Regards,
>> Andre
>> --
>> GnuPG e.V., Rochusstr. 44, D-40479 Düsseldorf.  VR 11482 Düsseldorf
>> Vorstand: W.Koch, M.Gollowitzer, A.Heinecke.    Mail: board at
>> Finanzamt D-Altstadt, St-Nr: 103/5923/1779.   Tel: +49-2104-4938799
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Gnupg-devel mailing list