X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <502220.96666.qm@web110510.mail.gq1.yahoo.com> Date: Wed, 23 Dec 2009 20:06:35 -0800 (PST) From: Liming Subject: Re: Questions about gnu debug To: cygwin AT cygwin DOT com Cc: Csaba Raduly In-Reply-To: <1ef5a52f0912231156i2cf55043q8b787d276c04bdae@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 wrote: > From: Csaba Raduly > 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 > 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