🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by romolo albuquerque Tue, 24 Oct 1995 04:47
Debugging compiler generated code..?
#798
Author: romolo albuquerque
Date: Tue, 24 Oct 1995 04:47
53 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads