Sketch out an CFG reconstruction mode for llvm-objdump.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 20 Jul 2011 19:37:35 +0000 (19:37 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 20 Jul 2011 19:37:35 +0000 (19:37 +0000)
commit685a2501b20baf688f6cc087f4b92bbafcd8028e
tree3f0fca76506239b383567c664fbc53c820cebabd
parenta4d0bd84f7bdc78784e44b623ded448988022e4b
Sketch out an CFG reconstruction mode for llvm-objdump.

- Not great yet, but it's a start.
- Requires an object file with a symbol table. (I really want to fix this, but it'll need a whole new algorithm)
- ELF and COFF won't work at the moment due to libObject shortcomings.

To try it out run
$ llvm-objdump -d --cfg foo.o

This will create a graphviz file for every symbol in the object file's text section containing a CFG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135608 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-objdump/MCFunction.cpp [new file with mode: 0644]
tools/llvm-objdump/MCFunction.h [new file with mode: 0644]
tools/llvm-objdump/llvm-objdump.cpp