mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Update varmap.cc
This commit is contained in:
parent
de5be96d8a
commit
b915c41764
1 changed files with 2 additions and 15 deletions
|
@ -289,17 +289,7 @@ bool RangeHint::compareRanges(const RangeHint *a,const RangeHint *b)
|
||||||
type_metatype bmeta = b->type->getMetatype();
|
type_metatype bmeta = b->type->getMetatype();
|
||||||
if (ameta != bmeta)
|
if (ameta != bmeta)
|
||||||
return (ameta < bmeta); // Order more specific types first
|
return (ameta < bmeta); // Order more specific types first
|
||||||
return true;
|
return false; //comp(x, x) must be false for strict weak ordering
|
||||||
}
|
|
||||||
|
|
||||||
bool RangeHint::rangesEqual(const RangeHint* a, const RangeHint* b)
|
|
||||||
{
|
|
||||||
if (a->sstart == b->sstart && a->size == b->size) {
|
|
||||||
type_metatype ameta = a->type->getMetatype();
|
|
||||||
type_metatype bmeta = b->type->getMetatype();
|
|
||||||
return (ameta == bmeta);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \param spc is the (stack) address space associated with this function's local variables
|
/// \param spc is the (stack) address space associated with this function's local variables
|
||||||
|
@ -793,9 +783,6 @@ void MapState::addRange(uintb st,Datatype *ct,uint4 fl,RangeHint::RangeType rt,i
|
||||||
sign_extend(sst,spaceid->getAddrSize()*8-1);
|
sign_extend(sst,spaceid->getAddrSize()*8-1);
|
||||||
sst = (intb)AddrSpace::addressToByte(sst,spaceid->getWordSize());
|
sst = (intb)AddrSpace::addressToByte(sst,spaceid->getWordSize());
|
||||||
RangeHint *range = new RangeHint(st,sz,sst,ct,fl,rt,hi);
|
RangeHint *range = new RangeHint(st,sz,sst,ct,fl,rt,hi);
|
||||||
if (std::find_if(maplist.begin(), maplist.end(), [range](RangeHint* rh) {
|
|
||||||
return RangeHint::rangesEqual(rh, range);
|
|
||||||
}) == maplist.end())
|
|
||||||
maplist.push_back(range);
|
maplist.push_back(range);
|
||||||
#ifdef OPACTION_DEBUG
|
#ifdef OPACTION_DEBUG
|
||||||
if (debugon) {
|
if (debugon) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue