delorie.com/archives/browse.cgi | search |
Message-ID: | <38BDD2A7.7DD8B76A@caresystems.com.au> |
Date: | Thu, 02 Mar 2000 12:32:07 +1000 |
From: | leon <Leon AT caresystems DOT com DOT au> |
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: | <Pine DOT HPP DOT 3 DOT 96 DOT 1000301172922 DOT 5901A-100000 AT hp2 DOT xraylith DOT wisc DOT edu> |
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<double> myTest; myTest.Go(); return 1; } //---------------------------------------- //template class - to be put in a different file! //---------------------------------------- #ifndef _TEST_H_INCLUDED_ #define _TEST_H_INCLUDED_ template <class T> class Test { public: Test(); ~Test(); void Go(); T dataOfSomething; }; template <class T> Test<T>::Test() { } template <class T> Test<T>::~Test() { } template <class T> void Test<T>::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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |