http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49407
Summary: unusable debuginfo for dll-imported functions. Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassig...@gcc.gnu.org ReportedBy: pl...@agmk.net Hi, i;m currently testing the 4,6-based i686-pc-mingw32 toolchain and afaics the debuginfo for dll-imported functions are quite unusable :/ $ cat d.cpp #include <stdio.h> extern "C" __declspec(dllexport) void bar( void ) { puts( "bar is here!" ); } $ cat m.cpp #include <stdio.h> extern "C" void bar( void ); int main() { bar(); } $ make /local/devel/toolchain46/i686-pc-mingw32/bin/i686-pc-mingw32-g++ -Wall -mthreads -g2 d.cpp -shared -o d.dll /local/devel/toolchain46/i686-pc-mingw32/bin/i686-pc-mingw32-objdump -xw d.dll > d.txt /local/devel/toolchain46/i686-pc-mingw32/bin/i686-pc-mingw32-g++ -Wall -mthreads -g2 m.cpp -o m.exe d.dll /local/devel/toolchain46/i686-pc-mingw32/bin/i686-pc-mingw32-objdump -xw m.exe > m.txt and now on windows host the gdb.exe shows me: D:\mingw.tests>d:\mingw32\bin\gdb.exe m.exe GNU gdb (GDB) 7.2.90.20110602-cvs (...) (gdb) b bar Breakpoint 1 at 0x402798 (gdb) r Starting program: D:\mingw.tests/m.exe (...) Breakpoint 1, 0x00402798 in bar () (gdb) disassemble Dump of assembler code for function bar: => 0x00402798 <+0>: jmp *0x406200 0x0040279e <+6>: nop 0x0040279f <+7>: nop End of assembler dump. (gdb) si 0x6b4414c0 in ?? () (gdb) disassemble No function contains program counter for selected frame. at this point i can't debug the 'bar' function :(