mirror of https://github.com/x64dbg/GleeBug
use unordered_map instead of vector
This commit is contained in:
parent
1533cc3e84
commit
604ce89673
|
|
@ -23,7 +23,7 @@ namespace GleeBug
|
||||||
{
|
{
|
||||||
//check if this address had a breakpoint that was recently deleted
|
//check if this address had a breakpoint that was recently deleted
|
||||||
auto& deletedBps = mProcess->recentlyDeletedSwbp;
|
auto& deletedBps = mProcess->recentlyDeletedSwbp;
|
||||||
auto foundIt = std::find(deletedBps.begin(), deletedBps.end(), exceptionAddress);
|
auto foundIt = deletedBps.find(exceptionAddress);
|
||||||
if(foundIt != deletedBps.end() && mThread)
|
if(foundIt != deletedBps.end() && mThread)
|
||||||
{
|
{
|
||||||
Registers(mThread->hThread, CONTEXT_CONTROL).Gip = exceptionAddress;
|
Registers(mThread->hThread, CONTEXT_CONTROL).Gip = exceptionAddress;
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ namespace GleeBug
|
||||||
return false;
|
return false;
|
||||||
FlushInstructionCache(hProcess, nullptr, 0);
|
FlushInstructionCache(hProcess, nullptr, 0);
|
||||||
|
|
||||||
recentlyDeletedSwbp.push_back(address);
|
recentlyDeletedSwbp.insert(address);
|
||||||
|
|
||||||
//remove the breakpoint from the maps
|
//remove the breakpoint from the maps
|
||||||
softwareBreakpointReferences.erase(info.address);
|
softwareBreakpointReferences.erase(info.address);
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ namespace GleeBug
|
||||||
MemoryBreakpointSet memoryBreakpointRanges;
|
MemoryBreakpointSet memoryBreakpointRanges;
|
||||||
MemoryBreakpointMap memoryBreakpointPages;
|
MemoryBreakpointMap memoryBreakpointPages;
|
||||||
|
|
||||||
std::vector<ptr> recentlyDeletedSwbp;
|
std::unordered_set<ptr> recentlyDeletedSwbp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Constructor.
|
\brief Constructor.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue