List Info

Thread: no symbol in current context problem




no symbol in current context problem
user name
2007-07-26 18:53:22
hi, all
I got the "no symbol 'xxx' in current context"
message when I am using
DDD to debug a very simple c++ program. Following is the
trouble code.

Test::Test(){
  int n = 100; //breakpoint
  for (int i = 0; i < 3; i++) //breakpoint
    std::cout<<i<<std::endl; //breakpoint
}

int main(){
Test test;
int n = 10;//ok to print n
for (int i = 0; i < 3; i++)//ok to print i
std::cout<<i<<std::endl;//ok to print i
return 1;
}

When I run into the breakpoints and try to print the n or i
in DDD, I
got the no symbol message. The global variables are fine.

Here are the versions of the software I am using

GNU DDD 3.3.11 (i486-pc-linux-gnu)
GNU gdb 6.6-debian
cmake version 2.4-patch 6, using "-ggdb -W -Wall
-O0" in CMakeLists.txt
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
OS Kubuntu 7.0.4, kernel 2.6.20-16-generic

Is that a known bug for any of the software I am using
listed above?
Thanks for help.

Re: no symbol in current context problem
country flaguser name
United States
2007-07-26 19:39:22
On Thu, Jul 26, 2007 at 07:53:22PM -0400, kdsfingergmail.com
wrote:
> Is that a known bug for any of the software I am using
listed above?
> Thanks for help.

I believe you can find a description of this bug in the GCC
bugzilla
somewhere; it omits local variables from constructors when
generating
debug info.  I don't remember if it's been fixed or not,
though.

-- 
Daniel Jacobowitz
CodeSourcery

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )