Skip to content
Snippets Groups Projects
Commit 3237e77c authored by an7s's avatar an7s
Browse files

Distinguish between critical args and function pointers

Former-commit-id: b18a4747e92f2f1262668991ced6ad9584ca3b62
parent 47c7b6df
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,8 @@ class MEDS_FPTRShadowAnnotation : public MEDS_ShadowAnnotation
const RegisterName getRegister() const;
const string& getExpression() const { return m_expression; }
const bool isFunctionPointerShadow() const { return m_functionPointerShadow; }
const bool isCriticalArgumentShadow() const { return m_criticalArgumentShadow; }
private:
void parse();
void setExpression(const string p_expression) {
......@@ -80,9 +82,14 @@ class MEDS_FPTRShadowAnnotation : public MEDS_ShadowAnnotation
int parseRegisterOffset(const char*);
void parseRegister(const char *p_buf, RegisterName *p_register, int *p_registerOffset);
void setFunctionPointerShadow(const bool p_val) { m_functionPointerShadow = p_val; }
void setCriticalArgumentShadow(const bool p_val) { m_criticalArgumentShadow = p_val; }
private:
string m_rawInputLine;
string m_expression;
bool m_functionPointerShadow;
bool m_criticalArgumentShadow;
};
}
......
......@@ -61,11 +61,15 @@ using namespace MEDS_Annotation;
MEDS_FPTRShadowAnnotation::MEDS_FPTRShadowAnnotation() : MEDS_ShadowAnnotation()
{
setInvalid();
setCriticalArgumentShadow(false);
setFunctionPointerShadow(false);
}
MEDS_FPTRShadowAnnotation::MEDS_FPTRShadowAnnotation(const string &p_rawLine) : MEDS_ShadowAnnotation()
{
setInvalid();
setCriticalArgumentShadow(false);
setFunctionPointerShadow(false);
m_rawInputLine=p_rawLine;
parse();
}
......@@ -79,10 +83,16 @@ void MEDS_FPTRShadowAnnotation::parse()
setDefineShadowId();
if (m_rawInputLine.find(MEDS_ANNOT_ARGSHADOW)!=string::npos)
{
setCriticalArgumentShadow(true);
setDefineShadowId();
}
if (m_rawInputLine.find(MEDS_ANNOT_FPTRCHECK)!=string::npos)
{
setFunctionPointerShadow(true);
setCheckShadowId();
}
if (m_rawInputLine.find(MEDS_ANNOT_ARGCHECK)!=string::npos)
setCheckShadowId();
......
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