This is the mail archive of the mailing list for the GCC 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]

Re: Debugging gcc-compiled programs on Windows

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

> 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.


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