Message-ID: <39047BEE.306C88F@jps.net> From: Dennis Yelle X-Mailer: Mozilla 4.72 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: gdb problem or just silly me - please help References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 25 Date: Mon, 24 Apr 2000 09:53:02 -0700 NNTP-Posting-Host: 216.119.44.14 X-Complaints-To: abuse AT onemain DOT com X-Trace: nntp3.onemain.com 956595028 216.119.44.14 (Mon, 24 Apr 2000 12:50:28 EDT) NNTP-Posting-Date: Mon, 24 Apr 2000 12:50:28 EDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > > On Thu, 2 Mar 2000, leon wrote: > > > I run the program and it hits a breakpoint. I then type "l" (for > > listing of source code around break point). Then it says that the line > > number of a breakpoint is out of range with the length of file test.cpp > > (the one containing entry method int main()). In other words gdb reports > > a breakpoint to be at line say 175 while the total lines it test.cpp is > > 35 (because header file of template is included in test.cpp?) > > This is in the FAQ (sections 12.1 and 12.6). In a nutshell, you need > to build your program with the -gstabs+ switch instead of -g. I really think that this information should be in the readme.1st file. Why even support the -g option if it is not usable? I myself have already completely given up trying to use gdb. It just never seems to work right, and I also see that lots people have lots of problems with RHIDE, so I never bothered to try RHIDE. I find that debugging with printf() is not too bad, since the compiler is fast enough for that. Dennis Yelle