Re: Accessing Global variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

zahed khurasani <sdzahed@xxxxxxxxx> writes:

> I know that we can access the function parameters using DECL_ARGUMENTS
> and similary we can use gimple_bind_vars to access other variable
> declarations attached to a bind expression. But how about Global
> definitions? How can I access variables defined outside the scope of
> any function.

Access in what way?

GCC doesn't really have a symbol table--that is, outside of the parser,
you can't really look up global variables by name.  But you should be
able to use the cgraph to traverse all the global variables.


[Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

Add to Google