[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: static variables: "no symbol X in current context"
From: |
Jim Blandy |
Subject: |
Re: static variables: "no symbol X in current context" |
Date: |
10 Apr 2002 14:27:41 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
address@hidden (Michael Hamilton) writes:
> System: Linux 2.2.16-22 (Redhat 7.?)
> GDB 5.0 (run inside of xemacs)
>
> I don't know if this is a bug or just my problem, but, I haven't been
> able to figure out how to fix it despite looking at FAQs and docs and
> websearches.
>
> I have a local variable declared static in a subroutine my code. In
> gdb, when inside the subroutine, I use
>
> > p x
> No symbol "x" in current context.
>
> This only seems to happen when running GDB on Linux. When I run it on
> a solaris/sun machine, it gives me the value. Non-static vars seem to
> work fine.
>
> What am I missing?
I'm able to print function-local static variables fine. Can you
provide a specific test case we can compile to see the problem on our
own systems?