diff options
author | bloodstalker <thabogre@gmail.com> | 2017-04-26 02:50:37 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2017-04-26 02:50:37 +0000 |
commit | a21b0ff9a620a3f3d728f178d78f6c7e01bec163 (patch) | |
tree | 26c0953168372e504253c033972c1b405e34b0ad /bruiser | |
parent | Merge branch 'master' of https://github.com/bloodstalker/mutator (diff) | |
download | mutator-a21b0ff9a620a3f3d728f178d78f6c7e01bec163.tar.gz mutator-a21b0ff9a620a3f3d728f178d78f6c7e01bec163.zip |
added some xml-related stuff
Diffstat (limited to 'bruiser')
-rw-r--r-- | bruiser/bruiser.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/bruiser/bruiser.cpp b/bruiser/bruiser.cpp index 3df89ea..4ab1307 100644 --- a/bruiser/bruiser.cpp +++ b/bruiser/bruiser.cpp @@ -259,7 +259,7 @@ public: /*@DEVI-obviously the best way to do this is to use the main signature already used, instead of going with a general predefined one. the current form is a temp.*/ Rewrite.InsertTextAfter(SLE.getLocWithOffset(1U), StringRef("\n\nint main(int argc, const char **argv)\n{\n\treturn sub_main(argc, argv);\n}\n")); - //BruiseRep.PrintToLog("hijacked main main."); + BruiseRep.PrintToLog("hijacked main main."); } } @@ -318,8 +318,28 @@ int main(int argc, const char **argv) int RunResult = Tool.run(newFrontendActionFactory<BruiserFrontendAction>().get()); + BruiseRep.PrintToLog("bruiser exited with:"); BruiseRep.PrintToLog(RunResult); + bruiser::ReadM0 M0Rep; + tinyxml2::XMLError XMLErr; + + XMLErr = M0Rep.LoadXMLDoc(); + if (XMLErr != XML_SUCCESS) + { + std::cerr << "could not load m0 xml report.\n"; + return XMLErr; + } + + XMLErr = M0Rep.ReadFirstElement(); + if (XMLErr != XML_SUCCESS) + { + std::cerr << "could not read first element of m0 xml report.\n"; + return XMLErr; + } + + bruiser::SearchM0(M0Rep.getRootPointer()); + return RunResult; } /*last line interntionally left blank.*/ |