This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb ignoring dll debugging symbols?


I'm trying to debug a program that uses a couple of DLLs, wich are also part of the program. All the .o files on the dlls are compiled with -g, and are built with a command I got from the 'cygin users guide' (I'm also using the '-mno-cyginw' flag):

gcc -shared -o lib${module}.dll \
-Wl,--out-implib=lib${module}.dll.a \
-Wl,--export-all-symbols \
-Wl,--enable-auto-import \
-Wl,--whole-archive ${object_files} \
-Wl,--no-whole-archive ${dependency_libs}

I got a .dll with all the debugging symbols, and a .dll.a with none. So I run gdb (I tried ver. 5.0 and 5.2.1) with a program linked with that library, and it doesn't load any of the debugging symbols from the dll, and when it crashes, I get several frames with '???????????????' and a memory address on the stack. I tried using the 'dll-symbols' command (with the dll file), in that case I can put breakpoints on files from the dll, but they are all ignored, and I get that same stack when the program crashes.
I also tried loading gdb with the dll as the 'main file' (like "gdb -nw libfoo.dll"), and then using the 'exec-file' command to load the main exe file, with no luck.

Is this a know problem? or do I not know how to use gdb? :) Any ideas?




Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]