1
0
Fork 0

DBG: added the LoadTypes command

This commit is contained in:
mrexodia 2016-11-21 10:16:54 +01:00
parent 910319a576
commit 943aa09b4f
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
3 changed files with 19 additions and 1 deletions

View File

@ -5,6 +5,7 @@
#include "types.h"
#include "memory.h"
#include "variable.h"
#include "filehelper.h"
using namespace Types;
@ -593,3 +594,18 @@ bool cbInstrEnumTypes(int argc, char* argv[])
}
return true;
}
bool cbInstrLoadTypes(int argc, char* argv[])
{
if(IsArgumentsLessThan(argc, 2))
return false;
auto owner = FileHelper::GetFileName(argv[1]);
ClearTypes(owner);
if(!LoadTypesFile(argv[1], owner))
{
dputs(QT_TRANSLATE_NOOP("DBG", "LoadTypes failed"));
return false;
}
dputs(QT_TRANSLATE_NOOP("DBG", "Types loaded"));
return true;
}

View File

@ -34,4 +34,5 @@ bool cbInstrSizeofType(int argc, char* argv[]);
bool cbInstrVisitType(int argc, char* argv[]);
bool cbInstrClearTypes(int argc, char* argv[]);
bool cbInstrRemoveType(int argc, char* argv[]);
bool cbInstrEnumTypes(int argc, char* argv[]);
bool cbInstrEnumTypes(int argc, char* argv[]);
bool cbInstrLoadTypes(int argc, char* argv[]);

View File

@ -353,6 +353,7 @@ static void registercommands()
dbgcmdnew("ClearTypes", cbInstrClearTypes, false); //ClearTypes
dbgcmdnew("RemoveType", cbInstrRemoveType, false); //RemoveType
dbgcmdnew("EnumTypes", cbInstrEnumTypes, false); //EnumTypes
dbgcmdnew("LoadTypes", cbInstrLoadTypes, false); //LoadTypes
//plugins
dbgcmdnew("StartScylla\1scylla\1imprec", cbDebugStartScylla, false); //start scylla