1 This directory contains supporting code and tools for Mono AST checker analysis.
3 This tool uses [CppSharp](https://github.com/mono/CppSharp) to read the source code of Mono
4 into an AST. It is a work-in-progress and in development.
6 Right now the tool is OSX-specific but should easily work on other OS's provided you
7 compile the dependencies for your platform. Contact @tritao if you need assistance.
9 It relies on the presence of a compile_commands.json file which is a JSON compilation
10 database. I have provided a sample database generated by using [Bear](https://github.com/rizsotto/Bear)
15 First you'll need to build the tool by running `make`.
17 It will first clone the needed CppSharp binaries from the [CppSharpBinaries](https://github.com/tritao/CppSharpBinaries)
18 repository and then build the tool which should look like this:
22 mcs MonoChecker.cs -r:CppSharp/CppSharp.dll -r:CppSharp/CppSharp.AST.dll -r:CppSharp/CppSharp.Parser.CSharp.dll -r:CppSharp/CppSharp.Generator.dll -r:Newtonsoft.Json.6.0.8/lib/net45/Newtonsoft.Json.dll
27 For easier debugging we can generate a Xamarin Studio project by running `make gen-proj`.
29 If everything works correctly, you should get an output like:
32 mac:aot joao$ make gen-proj
33 CppSharp/premake5 vs2012
34 Building configurations...
35 Running action 'vs2012'...
36 Generating MonoChecker.sln...
37 Generating MonoChecker.csproj...
38 Generating MonoChecker.csproj.user...
42 Then just load the solution in Xamarin Studio and you should be able to put breakpoints