Fix BpGetCount and some warnings
This commit is contained in:
parent
a80f6f0bf9
commit
f161227174
|
|
@ -43,7 +43,7 @@ bool BpSetName(uint Address, BP_TYPE Type, const char* Name);
|
|||
bool BpSetTitanType(uint Address, BP_TYPE Type, int TitanType);
|
||||
bool BpEnumAll(BPENUMCALLBACK EnumCallback, const char* Module);
|
||||
bool BpEnumAll(BPENUMCALLBACK EnumCallback);
|
||||
int BpGetCount(BP_TYPE Type, bool EnabledOnly);
|
||||
int BpGetCount(BP_TYPE Type, bool EnabledOnly = false);
|
||||
void BpToBridge(const BREAKPOINT* Bp, BRIDGEBP* BridgeBp);
|
||||
void BpCacheSave(JSON Root);
|
||||
void BpCacheLoad(JSON Root);
|
||||
|
|
|
|||
|
|
@ -109,9 +109,9 @@ void FunctionDelRange(uint Start, uint End)
|
|||
}
|
||||
else
|
||||
{
|
||||
// The start and end address must be in the same module
|
||||
uint moduleBase = ModBaseFromAddr(Start);
|
||||
|
||||
// The start and end address must be in the same module
|
||||
if(moduleBase != ModBaseFromAddr(End))
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -65,10 +65,10 @@ bool SymGetModuleList(std::vector<SYMBOLMODULEINFO>* List)
|
|||
auto EnumModules = [](LPCTSTR ModuleName, DWORD64 BaseOfDll, PVOID UserContext) -> BOOL
|
||||
{
|
||||
SYMBOLMODULEINFO curModule;
|
||||
curModule.base = BaseOfDll;
|
||||
curModule.base = (duint)BaseOfDll;
|
||||
|
||||
// Terminate module name if one isn't found
|
||||
if(!ModNameFromAddr(BaseOfDll, curModule.name, true))
|
||||
if(!ModNameFromAddr(curModule.base, curModule.name, true))
|
||||
curModule.name[0] = '\0';
|
||||
|
||||
((std::vector<SYMBOLMODULEINFO>*)UserContext)->push_back(curModule);
|
||||
|
|
|
|||
|
|
@ -86,14 +86,12 @@ ExclusiveSectionLocker::~ExclusiveSectionLocker()
|
|||
void ExclusiveSectionLocker::Lock()
|
||||
{
|
||||
AcquireSRWLockExclusive(m_Lock);
|
||||
|
||||
m_LockCount++;
|
||||
}
|
||||
|
||||
void ExclusiveSectionLocker::Unlock()
|
||||
{
|
||||
m_LockCount--;
|
||||
|
||||
ReleaseSRWLockExclusive(m_Lock);
|
||||
}
|
||||
|
||||
|
|
@ -106,13 +104,11 @@ SharedSectionLocker::SharedSectionLocker(SectionLock LockIndex)
|
|||
void SharedSectionLocker::Lock()
|
||||
{
|
||||
AcquireSRWLockShared(m_Lock);
|
||||
|
||||
m_LockCount++;
|
||||
}
|
||||
|
||||
void SharedSectionLocker::Unlock()
|
||||
{
|
||||
m_LockCount--;
|
||||
|
||||
ReleaseSRWLockShared(m_Lock);
|
||||
}
|
||||
Loading…
Reference in New Issue