This is the mail archive of the gcc-help@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]

Dynamic code changes


I am trying to implement dynamic code changes in programs compiled with gcc.

I have used the CFG (Control Flow Graph) implementation in GCC 3.2 to
break the code into basic blocks.

In each block, I have inserted a unique ID for the block.  This unique
ID is used to identify the flow of the program.

The code looks something like this:

pushl  (Unique ID)
call    Some_func

Some_func will use the unique ID in an arbitrary manner, which is not important.

What I would like to do, is go through the program and recalculate these unique ID's for each of
the blocks EVERY time it is run.


I really don't know where to start. ANY help would be much appreciated.

Brian



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