to use this ,you have to put the CFG_pb2.py file,which from the mcsema/tools/mcsema_disass/ida7/ ,into the same dir with this script
type python show_cfg.py "xxx.cfg" "xxx.txt"
the first arg is the location of the cfg file you want to see, like "./maze.cfg"
the second arg is the location of the generated cfg details if the cfg file, like "./cfgdetails.txt"
* Updated README.md to build with LLVM versions
Updated instructions for building with LLVM versions 9, 10, 11 and 12
* Updated README.md ro remove commit history limit
As commits in `remill` increase, no point in keeping a hard limit of 100.
* Quick fix for weak linking problem
ExportFunctions would override the weak linkage set before
Signed-off-by: Fabian Kilger <kilger@sec.in.tum.de>
* Fix formatting.
Co-authored-by: Peter Goodman <peter.goodman@gmail.com>
* Try reworking Docker image
* Fix some old behavior for building abi libraries
I don't think the result is actually usable...
* Remove most Python2 references
Still left some references to python2 for helper scripts since they
aren't tested (afaik) in CI
* Fix CI
* Remove old CMakeLists.txt and remove support for old TRAILOFBITS_LIBRARIES method of building
* Update README
Had to rename the directory where the Python 3 module is installed so
that we could hard-code the PYTHONPATH to it, e.g. `lib/python3.6` ->
`lib/python3` on Ubuntu 18.04 with default Python version installed by
`apt install python3` or `lib/python3.8` -> `lib/python3` for Ubuntu
20.04.
* Fixes and updates for McSema to build on Windows
* Enable C CXX ASM languages from beginning
Workaround for issue after finding Clang using Clang's own CMake
find-scripts
* Support aarch64 and Windows release triplets
* Conditional link to remill_settings for new vcpkg build
The x86 and x86_64 binaries are re-compiled with clang-10 from the
vcpkg, cxx-common libraries, because KLEE would fail with segfault if
the LLVM bitcode is lifted from binaries compiled with GCC (10.2.0). It
may be worth looking into why KLEE fails with the bitcodes lifted from
GCC compiled binaries in this case.
The AArch64 binary is re-compiled with aarch64-linux-gnu-gcc (10.2.0),
but mcsema-lift-10.0 fails with the following message.
```
F1228 23:41:38.079257 120074 Analyze.cpp:491] Check failed: dest_size < 64u (64 vs. 64)
*** Check failure stack trace: ***
@ 0x11601cc google::LogMessageFatal::~LogMessageFatal()
@ 0x785c3c anvill::XrefExprFolder::VisitTrunc()
@ 0x786108 anvill::XrefExprFolder::VisitICmp()
@ 0x660113 mcsema::(anonymous namespace)::LowerXrefs()::$_1::operator()()
@ 0x65b388 mcsema::(anonymous namespace)::LowerXrefs()
@ 0x65a458 mcsema::OptimizeModule()
@ 0x657bdc mcsema::LiftCodeIntoModule()
@ 0x66e9ee main
@ 0x7ffb0e016152 __libc_start_main
@ 0x61bafe _start
@ (nil) (unknown)
```
I have not tried compiling the AArch64 binary with clang
(`-target aarch64-linux-gnu`). It may be worth trying and see if the
resulting bitcode works with KLEE.
First step towards transitioning away from cxx-common's `pkgman.py` dependency management system towards compatibility with and use of vcpkg (https://github.com/microsoft/vcpkg) to manage dependencies.
This commit attempts to support both the new and old build systems until we can phase out the old completely.
Please see the updated remill, anvill, and trailofbits/cxx-common repositories to learn how to fetch the required dependencies.
* cmake: Set c++ standard to c++17.
* dyninst: Properly set is_referenced_by_data if bb is target of data reference.
* dyninst: Always set some value to is_reference_by_data field.
Co-authored-by: Peter Goodman <peter@trailofbits.com>
* Python 3 support for mcsema-disass.
* Conditional Python3 installation libraries
* Add conditional check for Python2 also
* Update CMakeLists.txt
Make the install options for py2/3 always available.
* Fix CI tool name
* Update flow.py
Co-authored-by: Eric Kilmer <eric.d.kilmer@gmail.com>
* Update to latest remill APIs and way of using CMake.
* Minor fixes
* Bug fixes for AArch64
* Tweaks
* Adds some nifty functionality useful for debugging some aarch64 bugs
* Fixes a subtle bug
* Bug fixes
* Make the test suite use explicit args
* Bug fix in xrefs
* Disable tests for now
* Fix mcsema-disass tool in final Docker image
* Update some README instructions
* Update more documentation
* Test that the disassembler has at least runtime dependencies to show help message
* API improvements. Must be used with the api_improvements branch of both Remill and McSema
fixes for x86 and running the lifted code with klee
* Update dockerfile to clone anvill
* update remill commit id
* Add python3 to dockerfile
* update python3
* disable abi script
* Updated cmake to find anvill
* Update main.cpp
* update find_package for anvill
* WIP:updated prebuild cfg
* update prebuild cfg files
* enable abi build for testsuite
* Fix memory leak
* install missing package for testcases
* frontend: Reflect cfg file changes in dyninst frontend.
* frontend: Update local files copyrights to reflect overall change to agplv3.
* fix failing testcases
* update test cfgs
* Fix test failure with local state pointer
* set the flag to use local state_ptr in default mode
Co-authored-by: kumarak <iit.akshay@gmail.com>
Co-authored-by: Lukas Korencik <xkorenc1@fi.muni.cz>