Results 1 to 5 of 5
I am not sure if this is the right forum but I hoping I will get some guidance, if not answer to my question.
I am looking for a method ...
- 01-06-2010 #1Just Joined!
- Join Date
- Jan 2010
- Posts
- 0
compiler ...
I am not sure if this is the right forum but I hoping I will get some guidance, if not answer to my question.
I am looking for a method to insert certain info to my source code in C and then I extract the same info later when the code gets converted to machine code.
Is there a way that this can be done using gcc?
- 01-06-2010 #2Registered Linux user #270181
TechieMoe's Tech Rants
- 01-06-2010 #3Just Joined!
- Join Date
- Jan 2010
- Posts
- 0
my requirement is simple -
* when I code my program, I put certain information (in the form of tokens)
* when the executable is generated, I would like to see association of final code
with information I put
* I would like to mainly extract the token along with the instruction address that is getting executed for some other processing ...
- 01-06-2010 #4
Sounds like a debugger to me. Couldn't you add a simple trace or logger line to your application to write information to a file at the points you want to record it?
Linux user #126863 - see http://linuxcounter.net/
- 01-08-2010 #5Just Joined!
- Join Date
- Jan 2010
- Posts
- 0
Debugger is probably close but not close enough for my problem.
The issue is that I am not trying to print any info as the program runs.
Once my code gets compiled and machine code gets generated, I would like to
extract the original info I put in my application code along with say the actual
target instruction.
Maybe if it helps, this is the end use of this:
1) when I write my program, I put unique tokens
2) once the code gets compiled, I extract the tokens and the instruction address associated with the token
3) an external entity (external to CPU) does the action specified by the token
when the instruction address associated with the token is getting executed
by the processor ...


Reply With Quote

