Hi,
does anybody know how to distinguish a global from a global static variable?
eg.
int glob;
static int moduleGlob;
void f() {static int inner;}
All of them go into the bss segment but the static int moduleGlob is
exported with a mangled name to a .so (so it doesn't conflict at link time)
from
https://gcc-python-plugin.readthedocs.org/en/latest/working-with-c.html#f...
i got:
for var in gcc.get_variables():
type_ = var.decl.type
It does not seem to be a attribute of a VAR_DECL or
anywhere near var, var.decl or var.decl.type
the static predicate found on var.decl is just saying it goes in the bss
segment (true in all of the above cases) and got nothing to do with the
static keyword which just controls visibility on link time.
At which pass should this be examined?
Regards