次のような入力ファイルがあります。
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
行 " " から分岐 PC の情報を取得する必要があり、行 " The Branch PC is ********
" から分岐が未取得または取得されているかどうかを取得する必要がありThe Branch is Taken/Not Taken
ます。そして、この 2 つの情報をすべてのブランチの 2 次元配列に格納します。
fopen
を使用した後、各行をチェックして必要な情報を取得するにはどうすればよいか疑問に思っていました。