| Title: | Digital Ladebug debugger |
| Moderator: | TLE::LUCIA |
| Created: | Fri Feb 28 1992 |
| Last Modified: | Fri Jun 06 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 969 |
| Total number of notes: | 3959 |
I know there are known problems here, so you may know if this already
-- or maybe it's a GEM bug?
The new template debugging support doesn't work 100%, even when the
template definitions are in a header file. I was adding this test to
our test system when I noticed that the breakpoint buttons show up
for only some member functions.
If you start use dxladebug 4.0-35 and DEC C++ T5.6-001, step in
t_s's constructor, you'll see breakpoint buttons for T::T() and
T::output(), but no breakpoint buttons for T::~T() and T::setdata()
// x_template5.cxx
#include <iostream.h>
#include "x_template5.hxx"
main()
{
T<short int> t_s;
T<long int> t_l;
t_s.setdata(5);
t_l.setdata(10);
t_s.output();
t_l.output();
}
------------------------------------------------------------
// x_template5.hxx
template <class t> class T {
t data;
public:
void output();
void setdata(t toset);
T();
~T();
};
template <class t> void T<t>::setdata(t toset)
{
cout << "Setting data" << endl;
data = toset;
cout << "Set data to " << data << endl;
}
template <class t> T<t>::T()
{
cout << "In ctor" << endl;
cout << "sizeof(t) == " << sizeof (t) << endl;
setdata(0);
}
template <class t> T<t>::~T()
{
cout << "In dtor" << endl;
}
template <class t> void T<t>::output()
{
cout << "Starting to output data" << endl;
cout << "Data is " << data << endl;
cout << "Finished outputting data" << endl;
}
- Matt
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 917.1 | May be non-template related | TLE::MERRITT | Steve Merritt, Ladebug Team | Wed Apr 09 1997 11:17 | 9 |
I'm not sure whats happening on the template side of this, but I do know that Ladebug supporting v5.6 C++ still has some lingering problems accessing members from inside classes. I have a fix for that problem, so I'll try it out and see if it fixes your problem as well. - Steve | |||||
| 917.2 | No such luck... | TLE::MERRITT | Steve Merritt, Ladebug Team | Wed Apr 09 1997 11:45 | 5 |
Well, this problem does not appear to be related to .2 - Steve | |||||