1
0
Fork 0

DBG: added MemBpSize function

This commit is contained in:
mrexodia 2017-08-13 17:17:37 +02:00
parent 1b27b951ee
commit f484108fd7
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
2 changed files with 10 additions and 0 deletions

View File

@ -342,6 +342,13 @@ static void _enumexceptions(ListOf(CONSTANTINFO) exceptions)
BridgeList<CONSTANTINFO>::CopyData(exceptions, exceptionsV);
}
static duint _membpsize(duint addr)
{
SHARED_ACQUIRE(LockBreakpoints);
auto info = BpInfoFromAddr(BPMEMORY, addr);
return info ? info->memsize : 0;
}
void dbgfunctionsinit()
{
_dbgfunctions.AssembleAtEx = _assembleatex;
@ -408,4 +415,5 @@ void dbgfunctionsinit()
_dbgfunctions.EnumConstants = _enumconstants;
_dbgfunctions.EnumErrorCodes = _enumerrorcodes;
_dbgfunctions.EnumExceptions = _enumexceptions;
_dbgfunctions.MemBpSize = _membpsize;
}

View File

@ -184,6 +184,7 @@ typedef bool(*ISDEPENABLED)();
typedef void(*GETCALLSTACKEX)(DBGCALLSTACK* callstack, bool cache);
typedef bool(*GETUSERCOMMENT)(duint addr, char* comment);
typedef void(*ENUMCONSTANTS)(ListOf(CONSTANTINFO) constants);
typedef duint(*MEMBPSIZE)(duint addr);
//The list of all the DbgFunctions() return value.
//WARNING: This list is append only. Do not insert things in the middle or plugins would break.
@ -253,6 +254,7 @@ typedef struct DBGFUNCTIONS_
ENUMCONSTANTS EnumConstants;
ENUMCONSTANTS EnumErrorCodes;
ENUMCONSTANTS EnumExceptions;
MEMBPSIZE MemBpSize;
} DBGFUNCTIONS;
#ifdef BUILD_DBG