GCC Plugin - Tracking memory accesses

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

 



Hello,

I'm trying to detect the addresses of the instructions which performs
a memory access to a specific global variable.

The problem I get is that instructions' addresses are only available
after linkage, so I thought about generating "false" instructions
(like SIMD/NEON which I don use in my code) to, posteriorly in the
disassembly view, identify where this mem accesses occur and extract
the instructions' addresses.

To do what I said above, I think I need to go as low as the pattern
matching phase of GCC. My idea is to use a callback when RTL nodes are
matched to real load/store instructions to my specific variables. With
this callback I could inject the false instruction and log the real
one.

Does anyone has an idea on how can I achieve this or if this is
possible at all using the Plugin API? Do I get any advantage by
compiling and linking at the same time?

Thanks.



[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