1
0
Fork 0

DBG: added DbgFunctions->GetCallStackEx

This commit is contained in:
mrexodia 2017-04-08 15:16:14 +02:00
parent 6cc5f4d849
commit cbe5130061
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
2 changed files with 11 additions and 0 deletions

View File

@ -312,6 +312,14 @@ static bool _enumheaps(ListOf(HEAPINFO) heaps)
return BridgeList<HEAPINFO>::CopyData(heaps, heapInfoV);
}
static void _getcallstackex(DBGCALLSTACK* callstack, bool cache)
{
auto csp = GetContextDataEx(hActiveThread, UE_CSP);
if(!cache)
stackupdatecallstack(csp);
stackgetcallstack(csp, (CALLSTACK*)callstack);
}
void dbgfunctionsinit()
{
_dbgfunctions.AssembleAtEx = _assembleatex;
@ -373,4 +381,5 @@ void dbgfunctionsinit()
_dbgfunctions.EnumHeaps = _enumheaps;
_dbgfunctions.ThreadGetName = ThreadGetName;
_dbgfunctions.IsDepEnabled = dbgisdepenabled;
_dbgfunctions.GetCallStackEx = _getcallstackex;
}

View File

@ -174,6 +174,7 @@ typedef bool(*HANDLESENUMWINDOWS)(ListOf(WINDOW_INFO) windows);
typedef bool(*HANDLESENUMHEAPS)(ListOf(HEAPINFO) heaps);
typedef bool(*THREADGETNAME)(DWORD tid, char* name);
typedef bool(*ISDEPENABLED)();
typedef void(*GETCALLSTACKEX)(DBGCALLSTACK* callstack, bool cache);
//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.
@ -238,6 +239,7 @@ typedef struct DBGFUNCTIONS_
HANDLESENUMHEAPS EnumHeaps;
THREADGETNAME ThreadGetName;
ISDEPENABLED IsDepEnabled;
GETCALLSTACKEX GetCallStackEx;
} DBGFUNCTIONS;
#ifdef BUILD_DBG