InstructionFilter: make unused EIP a default 0 parameter
Change-Id: I972be71af70934eef98bc67b27e32a98ecb8be3b
This commit is contained in:
@ -48,7 +48,7 @@ public:
|
|||||||
* @returns \c true if the instruction lies within the predefined range,
|
* @returns \c true if the instruction lies within the predefined range,
|
||||||
* \c false otherwise
|
* \c false otherwise
|
||||||
*/
|
*/
|
||||||
bool isValidInstr(address_t ip, char const *instr) const
|
bool isValidInstr(address_t ip, char const *instr = 0) const
|
||||||
{ return (beginAddress <= ip && ip <= endAddress); }
|
{ return (beginAddress <= ip && ip <= endAddress); }
|
||||||
private:
|
private:
|
||||||
address_t beginAddress; //<! the beginning of the address range
|
address_t beginAddress; //<! the beginning of the address range
|
||||||
@ -69,11 +69,11 @@ public:
|
|||||||
RangeSetInstructionFilter(char const *filename);
|
RangeSetInstructionFilter(char const *filename);
|
||||||
~RangeSetInstructionFilter() {}
|
~RangeSetInstructionFilter() {}
|
||||||
|
|
||||||
bool isValidInstr(address_t ip, char const *instr) const
|
bool isValidInstr(address_t ip, char const *instr = 0) const
|
||||||
{
|
{
|
||||||
std::vector<RangeInstructionFilter>::const_iterator it;
|
std::vector<RangeInstructionFilter>::const_iterator it;
|
||||||
for (it = _filters.begin(); it != _filters.end(); ++it) {
|
for (it = _filters.begin(); it != _filters.end(); ++it) {
|
||||||
if (it->isValidInstr(ip, instr))
|
if (it->isValidInstr(ip))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user