aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser/bruiser.cpp
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-04-26 02:50:37 +0000
committerbloodstalker <thabogre@gmail.com>2017-04-26 02:50:37 +0000
commita21b0ff9a620a3f3d728f178d78f6c7e01bec163 (patch)
tree26c0953168372e504253c033972c1b405e34b0ad /bruiser/bruiser.cpp
parentMerge branch 'master' of https://github.com/bloodstalker/mutator (diff)
downloadmutator-a21b0ff9a620a3f3d728f178d78f6c7e01bec163.tar.gz
mutator-a21b0ff9a620a3f3d728f178d78f6c7e01bec163.zip
added some xml-related stuff
Diffstat (limited to 'bruiser/bruiser.cpp')
-rw-r--r--bruiser/bruiser.cpp22
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.*/