Skip to content
Snippets Groups Projects
Commit 56d0ab91 authored by Anh Nguyen-Tuong's avatar Anh Nguyen-Tuong
Browse files

Add accessor functions to query for leaf and/or funcs with frame pointers

Former-commit-id: 3532f5ac904a9c1feed789a43abc44e916bfb8e5
parent fda067ad
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ using namespace std;
using namespace MEDS_Annotation;
//
// Class to handle one MEDS (integer vulnerability) annotation
// Class to handle one MEDS annotation
//
class MEDS_FuncAnnotation : public MEDS_AnnotationBase
{
......@@ -50,8 +50,16 @@ class MEDS_FuncAnnotation : public MEDS_AnnotationBase
virtual string getFuncName() const { return m_func_name; }
virtual void setFuncName(const string &p_func_name) { m_func_name=p_func_name; }
virtual bool isLeaf() const { return m_isleaf; }
virtual void setLeaf(const bool p_leaf) { m_isleaf = p_leaf; }
virtual bool hasFramePointer() const { return m_hasfp; }
virtual void setHasFramePointer(const bool p_hasfp) { m_hasfp = p_hasfp; }
private:
string m_func_name;
bool m_isleaf;
bool m_hasfp;
};
}
......
......@@ -39,6 +39,8 @@ MEDS_SafeFuncAnnotation::MEDS_SafeFuncAnnotation(const string &p_rawLine)
{
init();
m_rawInputLine=p_rawLine;
setLeaf(false);
setHasFramePointer(true);
parse();
}
......@@ -104,5 +106,27 @@ void MEDS_SafeFuncAnnotation::parse()
markUnsafe(); // sets valid
}
if (m_rawInputLine.find(" FUNC_LEAF ")!=string::npos)
{
if(getenv("VERBOSE"))
cout<<"Found FUNC_LEAF for "<<vo.to_string()<<endl;
setLeaf(true);
}
else
{
setLeaf(false);
}
if (m_rawInputLine.find(" NOFP ")!=string::npos)
{
if(getenv("VERBOSE"))
cout<<"Found NOFP (no frame pointer) for "<<vo.to_string()<<endl;
setHasFramePointer(false);
}
else
{
setHasFramePointer(true);
}
}
Subproject commit 4f05e83334ec6a10e1ed93018affe9091a576f84
Subproject commit bfa649ff1a0ed3807f94ac2d5690c5c3108cc75f
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment