Constructor parameters for global object initialization

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

 



Hello,

I just started with developping GCC plugins. It works pretty well,
but there is one case I cannot seem to work out and I don't
find any specific information about it in the internet and GCC
internals docs.

In the case of test.cpp:

class test {
public:
    test(int i) { _x = i; }
private:
    int _x;
};

test glob_test(4);

int main() {
    return 0;
}

How can I get the constructor statement of the VAR_DECL glob_test
and the given parameters? There seems to be no direct access to
any sort of constructor node and no __static_initialization..
FUNCTION_DECL seems to provide this information. debug_tree() does
not provide any hints on where the constructor information can be
found.

Kind regards,
Philipp




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

  Powered by Linux