[LLVMdev] Can I get the binary address of a for-loop statement?

陳韋任 chenwj at iis.sinica.edu.tw
Tue Apr 26 19:57:01 PDT 2011


Hi, all

  What I want to do is to locate the range of a for-loop statement in
a binary. For example, given a for-loop statement belows, 

for (stat1; stat2; stat3) {
  /* do something */
}

  Is it possible to get information about the range (binary address)
of the above for-loop, say, 0x0100 - 0x0120.

  One idea comes up in my mind is adding passes to retrieve such
information in LLVM, then use llvm-gcc to compile the code.

  Any suggestion appreciated.

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667




More information about the llvm-dev mailing list