This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: no symbol in current context problem when debug the program in gdb
- From: "Peng Yu" <pengyu dot ut at gmail dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>, gcc at gcc dot gnu dot org
- Date: Fri, 19 Sep 2008 19:48:19 -0500
- Subject: Re: no symbol in current context problem when debug the program in gdb
- References: <366c6f340809151254n72ea3279j3716299d994e2d04@mail.gmail.com>
On Mon, Sep 15, 2008 at 2:54 PM, Peng Yu <pengyu.ut@gmail.com> wrote:
>
> 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);
> }
Can somebody take a look at this issue? As installing a new compiler
takes a lot of effort, I'd like to know if this has been solved in the
newer version of gcc. If this has not been solved in the newer version
of gcc, can somebody put this thing in the schedule?
Thanks,
Peng