From: bjvh <bj...@mi...> - 2008-08-11 20:14:02
|
Brian Dessent wrote: > bjvh wrote: > > >> $ gcc --version >> gcc.exe (GCC) 4.2.1-sjlj (mingw32-2) >> Copyright (C) 2007 Free Software Foundation, Inc. >> >> $ g++ --version >> g++.exe (GCC) 4.2.1-sjlj (mingw32-2) >> Copyright (C) 2007 Free Software Foundation, Inc. >> > > The 4.2.1 MinGW version of gcc uses DWARF2 debug format by default. > Previously on this list it has been reported that MinGW gdb does not > work well with DWARF2 debug info, and thus you should try the older > STABS format by using -gstabs instead of -g. > > Personally, I find this fact entirely mystifying because personally I > make it a point to always use DWARF2 debug (via -gdwarf-2) even with > those toolchains where STABS format is default (such as the MinGW 3.4 > gcc) and I never have had such a problem with gdb. In fact one would > expect gdb's DWARF2 reader to be much more polished and bugfree than its > STABS reader because DWARF2 has long been the default for practically > every other target, e.g. Linux. > > I suspect this is a MinGW gdb specific problem however, because the > majority of my use of gdb is with the Cygwin gdb which as I said has > never suffered from this. > > Brian > > Thank you Brian, -gstabs works, and is indeed mystifying as you say. Bruce |