Article View: gnu.g++.help
Article #798Debugging compiler generated code..?
From: romolo albuquerque
Date: Tue, 24 Oct 1995 04:47
Date: Tue, 24 Oct 1995 04:47
53 lines
1744 bytes
1744 bytes
Hi all. Can someone tell me why is it that I can't debug the source
code of a "template generated" class from g++-2.7.0..?
Let me make myself clear:
If I use the "List" class, provided by the g++ library, or any class
provided by the library for that matter, I can't STEP into methods of that
class , or PRINT the contents of objects of that class.
Here is a really simple example..
I've generated a intList class from the List class using "genclass", and
got the files int.List.cc, int.List.h and int.defs.h.
" main.cc "
#include "int.List.h"
#include <iostream.h>
void main(void)
{
intList p(2); // p is object of class intList
exit(0);
}
When I compile this program " g++ -g -o mytest mylist.cc int.List.cc"
Everything is ok. Then when I try to run gdb on it to step into the
constructor of the object 'p'. I get into problems..
1) My system starts to crawl.
2) After 1-2 minutes, I get a message
"gdb out of virtual memory. Can not allocate 24 bytes".
And that is the end of the debugger.
Why can't I step into one of the methods of this class generated by the
compiler.. ? I have the source file, so I should be able to do it..
I have a Sparc 2, running SunOS 4.1.3, g++-2.7.0, libg++-2.7.0, gdb-4.9.
Any help is greatly appreciated..
thanks..
--Rom
Technical Details
Message-ID:
<199510240444.AAA16951@soho.ios.com>Path:
arc1-ca.pugleaf.net!soho.ios.com!sstShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!soho.ios.com!sst From: sst@soho.ios.com (romolo albuquerque) Newsgroups: gnu.g++.help,comp.lang.c++ Subject: Debugging compiler generated code..? Date: 24 Oct 1995 00:47:49 -0400 Organization: Gatewayed from the GNU Project mailing list help-g++@prep.ai.mit.edu Sender: daemon@cis.ohio-state.edu Distribution: world Message-ID: <199510240444.AAA16951@soho.ios.com>