Re: Dumb question about fonts

Andrew Gaylard <[email protected]>
Newsgroups gmane.comp.debugging.ddd.general
Message-ID <[email protected]>
Atwood, Robert C wrote:

>Okay I thought I would start looking into this by debugging ddd in ddd
>but I find that I am stumped by something that seems like it should be
>quite basic.
>I am getting a 'No symbol xxxx in current context' when as far as I am
>aware, the symbol DOES exist in the current context, at least the
>program (ddd) seems to run! . I have endeavoured to  ensure that the
>instance that is being debugged has not been optimized (so the varible
>is not optimized out, I believe) using CXXFLAGS=-ggdb (also tried -g )
>Why else might a variable not be in scope when it looks like it is? 
>
>Thanks , 
>Robert
>[Ps Also "$Id$" at line 1 and 31 of options.C probably is meant to be
>"$Id:$"  This is similar in several other files... umm .. almost all
>other files... ]
>
>I can get the same result in command line gdb, which is easier to
>represent here.. 
>
>Breakpoint 1, save_options (flags=1024) at options.C:2346
>2346        const bool create        = (flags & CREATE_OPTIONS);
>(gdb) list
>2341        return ok;
>2342    }
>2343
>2344    bool save_options(unsigned long flags)
>2345    {
>2346        const bool create        = (flags & CREATE_OPTIONS);
>2347        const bool save_session  = (flags & SAVE_SESSION);
>2348        const bool save_geometry = (flags & SAVE_GEOMETRY);
>2349        const bool interact      = (flags & MAY_INTERACT);
>2350
>(gdb)
>2351        string session =
>2352            (save_session ? app_data.session :
>DEFAULT_SESSION.chars());
>2353
>2354        create_session_dir(session);
>2355        const string file = session_state_file(session);
>2356
>2357        string options = (save_session ? "session" : "options");
>2358        string status = (create ? "Creating " : "Saving ") + options
>+ " in ";
>2359
>2360        StatusDelay delay(status + quote(file));
>(gdb) next
>2347        const bool save_session  = (flags & SAVE_SESSION);
>(gdb)
>2348        const bool save_geometry = (flags & SAVE_GEOMETRY);
>(gdb)
>2349        const bool interact      = (flags & MAY_INTERACT);
>(gdb)
>2352            (save_session ? app_data.session :
>DEFAULT_SESSION.chars());
>(gdb)
>2354        create_session_dir(session);
>(gdb) print session
>No symbol "session" in current context.
>(gdb) whatis session
>No symbol "session" in current context.
>(gdb) 
>(gdb) whatis create
>type = <text variable, no debug info>
>(gdb) whatis save_session
>No symbol "save_session" in current context.
>(gdb) whatis save_geometry
>No symbol "save_geometry" in current context.
>

Yes, we've all been in these situations before.

I wish I understood why it sometimes happens that most of the
debugging information is present, but not the one bit that's of
interest...

Does "objdump" on the .o provide any information?
Have you tried asking the gdb list?

Andrew.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.