Message-ID: <38BDD2A7.7DD8B76A@caresystems.com.au> Date: Thu, 02 Mar 2000 12:32:07 +1000 From: leon X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: possible bug in DJGPP gdb build References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Hello everybody just wanted to say: the problem to be described was not replicated and behaved ok on mingw32 and cygwin (i have asked those users to test it for me - all came back ok) but it is evident in djgpp! //--------------------------------------------------------------------- the aim is to put a break point AND list the code within method Go() of template class Test it is important to have two files - since the error reported by gdb is "line 35 is out of range file tmpltest.cpp has 8 lines" i think it is becuase the header inclusion adds up to source file but then the gdb get confused - but more likely it is me who is confused ;-) overall setup - running djgpp gdb version 4.18 configured as i386-pc-msdosdjgpp compiler vesion 2.95.1 19990816 (release) //---------------------------------------- //main file: //---------------------------------------- #include "Test.h" int main() { Test myTest; myTest.Go(); return 1; } //---------------------------------------- //template class - to be put in a different file! //---------------------------------------- #ifndef _TEST_H_INCLUDED_ #define _TEST_H_INCLUDED_ template class Test { public: Test(); ~Test(); void Go(); T dataOfSomething; }; template Test::Test() { } template Test::~Test() { } template void Test::Go() { //some code here like: int dump1(0); int dump2(0); int dump3(0); dump1=dump3+=5; dump2=dump3-5; } #endif //---------------------- //makefile //---------------------- CC = gcc CFLAGS = -g DIRECTORY = C:/code OBJECTS = Tmpltest.o main.exe : $(OBJECTS) $(CC) $(CFLAGS) $(OBJECTS) -o main.exe Tmpltest.o : $(DIRECTORY)Tmpltest.cpp $(DIRECTORY)Test.h $(CC) $(CFLAGS) -c $(DIRECTORY)Tmpltest.cpp