added json for call graph

This commit is contained in:
ALEXks
2025-04-13 17:24:49 +03:00
parent 5acbd10a26
commit b068a49b0b
6 changed files with 77 additions and 66 deletions

View File

@@ -552,15 +552,7 @@ int SPF_GetGraphFunctions(void*& context, int winHandler, short *options, short
{
runPassesForVisualizer(projName, { FILL_PAR_REGIONS_LINES } );
string resVal = "";
resVal = to_string(allFuncInfo.size());
for (auto f = allFuncInfo.begin(); f != allFuncInfo.end(); ++f)
{
resVal += "|" + f->first + "|" + to_string(f->second.size());
for (int i = 0; i < f->second.size(); ++i)
resVal += convertToString(f->second[i]);
}
string resVal = convertToJson(allFuncInfo).dump();
copyStringToShort(result, resVal);
retSize = (int)resVal.size() + 1;
}
@@ -1429,15 +1421,7 @@ int SPF_SetFunctionsToInclude(void*& context, int winHandler, short *options, sh
{
runPassesForVisualizer(projName, { FIND_FUNC_TO_INCLUDE });
string resVal = "";
resVal = to_string(allFuncInfo.size());
for (auto f = allFuncInfo.begin(); f != allFuncInfo.end(); ++f)
{
resVal += "|" + f->first + "|" + to_string(f->second.size());
for (int i = 0; i < f->second.size(); ++i)
resVal += convertToString(f->second[i]);
}
string resVal = convertToJson(allFuncInfo).dump();
copyStringToShort(result, resVal);
retSize = (int)resVal.size() + 1;
}