DBG: shit with label
This commit is contained in:
parent
4d1245c046
commit
fcbdf27c55
|
@ -16,6 +16,7 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <functional>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <tlhelp32.h>
|
#include <tlhelp32.h>
|
||||||
#include "..\dbg_types.h"
|
#include "..\dbg_types.h"
|
||||||
|
|
|
@ -289,3 +289,24 @@ bool LabelGetInfo(duint Address, LABELSINFO* info)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LabelEnumCb(std::function<void(const LABELSINFO & info)> cbEnum, const char* module)
|
||||||
|
{
|
||||||
|
SHARED_ACQUIRE(LockLabels);
|
||||||
|
|
||||||
|
for(auto i = labels.begin(); i != labels.end();)
|
||||||
|
{
|
||||||
|
auto j = i;
|
||||||
|
++i; // Increment here, because the callback might remove the current entry
|
||||||
|
|
||||||
|
if(module && module[0] != '\0')
|
||||||
|
{
|
||||||
|
if(strcmp(j->second.mod, module) != 0)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
SHARED_RELEASE();
|
||||||
|
cbEnum(j->second);
|
||||||
|
SHARED_REACQUIRE();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -20,4 +20,5 @@ void LabelCacheLoad(JSON root);
|
||||||
bool LabelEnum(LABELSINFO* List, size_t* Size);
|
bool LabelEnum(LABELSINFO* List, size_t* Size);
|
||||||
void LabelClear();
|
void LabelClear();
|
||||||
void LabelGetList(std::vector<LABELSINFO> & list);
|
void LabelGetList(std::vector<LABELSINFO> & list);
|
||||||
bool LabelGetInfo(duint Address, LABELSINFO* info);
|
bool LabelGetInfo(duint Address, LABELSINFO* info);
|
||||||
|
void LabelEnumCb(std::function<void(const LABELSINFO & info)> cbEnum, const char* module = nullptr);
|
Loading…
Reference in New Issue