1
0
Fork 0

DBG: decent valfromstring function exported (should make the Goto dialog and calculator much faster)

This commit is contained in:
Mr. eXoDia 2015-06-06 20:28:03 +02:00
parent 732e22b1cd
commit c0c9e1acdf
2 changed files with 9 additions and 1 deletions

View File

@ -192,6 +192,11 @@ static bool _getsourcefromaddr(duint addr, char* szSourceFile, int* line)
return true;
}
static bool _valfromstring(const char* string, duint* value)
{
return valfromstring(string, value);
}
void dbgfunctionsinit()
{
_dbgfunctions.AssembleAtEx = _assembleatex;
@ -228,4 +233,5 @@ void dbgfunctionsinit()
_dbgfunctions.VaToFileOffset = valvatofileoffset;
_dbgfunctions.GetAddrFromLine = _getaddrfromline;
_dbgfunctions.GetSourceFromAddr = _getsourcefromaddr;
_dbgfunctions.ValFromString = _valfromstring;
}

View File

@ -66,7 +66,8 @@ typedef bool (*SETCMDLINE)(const char* cmdline);
typedef duint (*FILEOFFSETTOVA)(const char* modname, duint offset);
typedef duint (*VATOFILEOFFSET)(duint va);
typedef duint (*GETADDRFROMLINE)(const char* szSourceFile, int line);
typedef bool(*GETSOURCEFROMADDR)(duint addr, char* szSourceFile, int* line);
typedef bool (*GETSOURCEFROMADDR)(duint addr, char* szSourceFile, int* line);
typedef bool (*VALFROMSTRING)(const char* string, duint* value);
typedef struct DBGFUNCTIONS_
{
@ -104,6 +105,7 @@ typedef struct DBGFUNCTIONS_
VATOFILEOFFSET VaToFileOffset;
GETADDRFROMLINE GetAddrFromLine;
GETSOURCEFROMADDR GetSourceFromAddr;
VALFROMSTRING ValFromString;
} DBGFUNCTIONS;
#ifdef BUILD_DBG