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

2015-10-26 Thread Yasser Shalabi
need to modify with to get GCC to emit additional opcodes for certain instructions? Yasser On Fri, Oct 23, 2015 at 10:43 AM, William Cohen wrote: > On 10/23/2015 11:37 AM, Yasser Shalabi wrote: >> Hey Will, >> >> Thanks for the quick reply. Yeah I need the int3 instructio

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

2015-10-23 Thread Yasser Shalabi
Hey Will, Thanks for the quick reply. Yeah I need the int3 instruction to be statically included in he binary so I can't use any dynamic instrumentation tool. On Fri, Oct 23, 2015 at 10:32 AM, William Cohen wrote: > On 10/23/2015 01:37 AM, Yasser Shalabi wrote: >> Hello, >>

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

2015-10-22 Thread Yasser Shalabi
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 intere