This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Debugging gcc-compiled programs on Windows
- From: Brian Dessent <brian at dessent dot net>
- To: Andrew Smith <andrew at littlesvr dot ca>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 16 Nov 2007 13:35:01 -0800
- Subject: Re: Debugging gcc-compiled programs on Windows
- References: <473E02E7.4070307@littlesvr.ca>
- Reply-to: gcc-help at gcc dot gnu dot org
Andrew Smith wrote:
> Im using mingw to build it. There is a gdb package for mingw, but that
> doesn't work - when I press ctrl-c gdb quits, so since I'm not getting
> crashes the utility of it is.. not there.
You can use Cygwin's gdb, or use current CVS HEAD gdb which has support
for MinGW native debugging without patches. I don't know exactly what
you mean here about it being useless, but if you use the HEAD version
you should report whatever doesn't work to the gdb list. But if you're
using the version from the MinGW site you'll have to report that to the
MinGW list, as those are all non-FSF versions that are built with local
patches.
> Is it possible to compile programs using gcc on windows so that the
> visual studio debugger will be able to load the symbols for it?
No, not if you want symbols.
> Or is there some way to attach any debugger to a such a program and
> break execution while it's running?
You can use any Windows debugger (e.g. ollydbg) and you can certainly
attach to a running process. But you won't get symbols unless both the
compiler and debugger are compatible -- you can mostly partition the
windows tools into [gcc + gdb] and [MS visual studio + everything else]
for the purposes of this.
Brian