[Compile] Inserting compiled code via jumps

Paul Naert paul.naert@polymtl.ca
Wed Dec 12 16:09:00 GMT 2018


I am a masters student and I would like to devote my research to  
improving GDB's GCC Compile and Execute by adding the possibility to  
jump directly to the compiled code without having to hit a breakpoint.

The idea is to reuse the same principle that was used in fast  
tracepoints to insert code in a compiled program, except that instead  
of jumping to GDB's collector function we would execute the code  
compiled by GCC each time we hit the selected instruction.

Given the code for compiling a snippet of C through GCC and the code  
for inserting fast tracepoint already exist, I think that this should  
be feasible.

What I was wondering is :
    -  Has someone already worked on this ? On the wiki page there are  
mentions to future projects that seem related (fast breakpoint  
conditions most notably)
    -  Do you see any reason why that would not work that I missed,  
except for the limitations of the existing Compile project?

Thank you,


More information about the Gdb mailing list