I’ve got input files like these:
The Branch PC is e05f56f8
The Branch Type is branch_type_1
The Branch is Taken
The Branch Target is e045ac20
jal__ 1141512
The Branch PC is e045ac44
The Branch Type is branch_type_1
The Branch is Taken
The Branch Target is e05f57d4
jal__ 1562101
The Branch PC is e05f57fc
The Branch Type is branch_type_1
The Branch is Taken
The Branch Target is e05f578c
jal__ 1562083
I need to get the information of the branch PC from line “The Branch PC is ********“, and whether the branch is Taken for Not Taken from line “The Branch is Taken/Not Taken“. And store this two information into a 2-D array for all the Branches.
I was wondering after I use fopen, how can I check each line to get the information I want.
I guess you want something like:
Storing into array shouldn’t be a problem after parsing..