no symbol in current context problem when debug the program in gdb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have the following program. When I step in to test's constructor, I
would be able to print the variable three. It says
(gdb) n
7             T three = 3;
(gdb) n
8             std::cout << three << std::endl;
(gdb) p three
No symbol "three" in current context.

According to gdb mailing list, this is a bug in GCC. I'm wondering if
this issue has been resolved in the later versions of GCC.

Thanks,
Peng

#include <iostream>

template <typename T>
class test {
 public:
   test(const T &a) : _a(a) {
     T three = 3;
     std::cout << three << std::endl;
   }
 private:
   T _a;
};

int main() {
 test<double> p(10);
}

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux