Mail Archives: cygwin/2009/12/23/23:06:47
Thanks. Csaba,
I still not so clear about gdb, I am usually use microsoft Visual Studio
1. With g++ -g -o executable_name a.o b.o ...
Can I set break point? or this one only display the place the code has prob=
lem, then go to there to modify it?
2. For ddd, Emacs, Eclipse
Are they IDC with debug inside and can set break point? I just wondering if=
there has a software like Visual Studio IDE, so I can debug it inside it.
--- On Wed, 12/23/09, Csaba Raduly <rcsaba AT gmail DOT com> wrote:
> From: Csaba Raduly <rcsaba AT gmail DOT com>
> Subject: Re: Questions about gnu debug
> To: cygwin AT cygwin DOT com
> Cc: linhaiyxs AT yahoo DOT com
> Date: Wednesday, December 23, 2009, 5:56 PM
> On Wed, Dec 23, 2009 at 6:48 PM,
> Liming <linhaiyxs AT yahoo DOT com>
> wrote:
> > I read the FAQ, but still very confused, please help.
> >
> > 1.
> > I have a project written by C++, I want to debug it
> under Cygwin. I
> > know I can use g++ -g, but I think this is for a
> single .cpp file.
>=20
> Hi Liming,
> If you have a project with multiple C++ files, you can
> compile each
> C++ file with "g++ -g" into an object file (usually with .o
> suffix).
> Then you can link the object files together with ... "g++
> -g", like
> this:
>=20
> g++ -g -o executable_name=A0 a.o b.o ...
>=20
> Then you have an executable with debug info, which you can
> load with gdb.
>=20
> > How
> > to debug a whole Project? Anyway to debug the project
> inside a windows like editor?
> >
>=20
> If you used Windows IDEs, GDB needs time to get used to. It
> has an
> extensive manual (search for "Debugging with GDB").
>=20
> There are many GDB front-ends. I've been using ddd
> successfully. It
> has a Cygwin package, I think (under Devel).
>=20
> Emacs has gdb integration. It is a very powerful editor,
> but takes a
> long time to learn.
>=20
> Anther possibility is Eclipse (it has GDB integration too,
> but a bit
> of an overkill, really). But it's fiddly to set up because
> it is a
> Windows program and sometimes paths have to be translated
> between
> Windows format and Cygwin.
>=20
> Hope this helps,
> Csaba
> --=20
> Life is complex, with real and imaginary parts
>=20
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -