₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,327,252 members, 8,430,025 topics. Date: Friday, 19 June 2026 at 06:32 PM

Toggle theme

Sara2's Posts

Nairaland ForumSara2's ProfileSara2's Posts

1 (of 1 pages)

ProgrammingConstruct Control Flow Of The Program(c Programming) by sara2(op): 6:17pm On Jun 01, 2009
Hi,
i am constructing control flow of the program, by reading a compiler generated listing file. i used two pass to read the file.
in first pass:
i read all the listing file and form all the available nodes.
and store the label(L32,L4,, ) after the branch(e.g.,bne L32, Bra L4).

in Second pass:
i read all the listing file again and store the targetlabel(L32:, L4:, )
now we compare L32 and if matches then we send the targetlabel Address to the node.
see the datastructures,

the result is the control flow graph of the program,

now my problem is i am not able to do the 2nd pass, please help me with this information, i have being struggling with this for many days,
plz see in the attactments, i am sending the c coding , the output with i got and the listing file which i use to construct control flow,
thank you very much,

1 (of 1 pages)