Monitoring reads to members of global_options

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

 



Hello everyone. I'm trying to instrument GCC to log reads of the
variables inside global_options. I managed to implement a (dumb)
version of this by wrapping all references of those variables with
a inline function, contained inside gcc/system.h.

To speed things up, I want to log only reads where the current
value is not the same of the previous one. After some frustrated
attempts with global variables, I'm now using a
singleton (class/members declared in system.h, implemented in a
new file) to store previous values and log the access if needed.

Now I need to compile this new file, and add the resulting object
file as input to the compilation of the instrumented source files.
Looking at the documentation, I guess that I need to edit
gcc/Makefile.in. However, I don't know exactly what to edit -
can you guys give me some pointers?

Ps: other implementation ideas are also welcome :)


Thanks,
Mateus




[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