Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: kdsfinger@gmail.com
To: gdb@sourceware.org
Subject: no symbol in current context problem
Date: Fri, 27 Jul 2007 00:39:00 -0000	[thread overview]
Message-ID: <cac7ac540707261653k72dd0f15u811023a659698f@mail.gmail.com> (raw)

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.


             reply	other threads:[~2007-07-26 23:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-27  0:39 kdsfinger [this message]
2007-07-27  5:57 ` Daniel Jacobowitz
2008-09-15 16:55 Peng Yu
2008-09-15 17:00 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cac7ac540707261653k72dd0f15u811023a659698f@mail.gmail.com \
    --to=kdsfinger@gmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox