This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

how to tweak x86 code generation to instrument certain opcodes with CC trap?


Hello,

I am new to the GCC code. I want to make a simple modification to the
back end. I want to add a debug exception (int3) to be generated
before any instance of certain x86 instructions.

I tried to modify gcc/config/i386/i386.md by adding a "int3" to the
define_insn for instructions of interest. But that just caused
configure to fail (cannot run generated C programs).

Any pointers on how to approach this? Also, suggestions for
alternative approaches are also welcome.

Thanks!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]