mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-5189 Add range attributes to VarargsFilter
This commit is contained in:
parent
57df41297f
commit
e3aa064061
10 changed files with 128 additions and 28 deletions
|
@ -412,13 +412,22 @@ bool VarargsFilter::filter(const PrototypePieces &proto,int4 pos) const
|
|||
|
||||
{
|
||||
if (proto.firstVarArgSlot < 0) return false;
|
||||
return (pos >= proto.firstVarArgSlot);
|
||||
pos -= proto.firstVarArgSlot;
|
||||
return (pos >= firstPos && pos <= lastPos);
|
||||
}
|
||||
|
||||
void VarargsFilter::decode(Decoder &decoder)
|
||||
|
||||
{
|
||||
uint4 elemId = decoder.openElement(ELEM_VARARGS);
|
||||
for(;;) {
|
||||
uint4 attribId = decoder.getNextAttributeId();
|
||||
if (attribId == 0) break;
|
||||
if (attribId == ATTRIB_FIRST)
|
||||
firstPos = decoder.readSignedInteger();
|
||||
else if (attribId == ATTRIB_LAST)
|
||||
lastPos = decoder.readSignedInteger();
|
||||
}
|
||||
decoder.closeElement(elemId);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue