Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
SVF::SVFBugEvent Class Reference

#include <SVFBugReport.h>

Public Types

enum  EventType {
  Branch = 0x1 , Caller = 0x2 , CallSite = 0x3 , Loop = 0x4 ,
  SourceInst = 0x5
}
 

Public Member Functions

 SVFBugEvent (u32_t typeAndInfoFlag, const ICFGNode *eventInst)
 
virtual ~SVFBugEvent ()=default
 
u32_t getEventType () const
 
virtual const std::string getEventDescription () const
 
virtual const std::string getFuncName () const
 
virtual const std::string getEventLoc () const
 

Protected Attributes

u32_t typeAndInfoFlag
 
const ICFGNodeeventInst
 

Detailed Description

Bug Detector Recoder

Definition at line 49 of file SVFBugReport.h.

Member Enumeration Documentation

◆ EventType

Enumerator
Branch 
Caller 
CallSite 
Loop 
SourceInst 

Definition at line 52 of file SVFBugReport.h.

53 {
54 Branch = 0x1,
55 Caller = 0x2,
56 CallSite = 0x3,
57 Loop = 0x4,
58 SourceInst = 0x5
59 };

Constructor & Destructor Documentation

◆ SVFBugEvent()

SVF::SVFBugEvent::SVFBugEvent ( u32_t  typeAndInfoFlag,
const ICFGNode eventInst 
)
inline

Definition at line 66 of file SVFBugReport.h.

◆ ~SVFBugEvent()

virtual SVF::SVFBugEvent::~SVFBugEvent ( )
virtualdefault

Member Function Documentation

◆ getEventDescription()

const std::string SVFBugEvent::getEventDescription ( ) const
virtual

Definition at line 291 of file SVFBugReport.cpp.

292{
293 switch(getEventType())
294 {
296 {
298 {
299 return "True";
300 }
301 else
302 {
303 return "False";
304 }
305 break;
306 }
308 {
309 std::string description("calls ");
310 assert(SVFUtil::isa<CallICFGNode>(eventInst) && "not a call ICFGNode?");
311 const FunObjVar *callee = SVFUtil::cast<CallICFGNode>(eventInst)->getCalledFunction();
312 if(callee == nullptr)
313 {
314 description += "<unknown>";
315 }
316 else
317 {
318 description += callee->getName();
319 }
320 return description;
321 break;
322 }
324 {
325 return "None";
326 }
327 default:
328 {
329 assert(false && "No such type of event!");
330 abort();
331 }
332 }
333}
#define BRANCHFLAGMASK
u32_t getEventType() const
virtual const std::string & getName() const
Definition SVFValue.h:184
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76

◆ getEventLoc()

const std::string SVFBugEvent::getEventLoc ( ) const
virtual

Definition at line 286 of file SVFBugReport.cpp.

287{
288 return eventInst->getSourceLoc();
289}
virtual const std::string getSourceLoc() const
Definition SVFValue.h:194

◆ getEventType()

u32_t SVF::SVFBugEvent::getEventType ( ) const
inline

Definition at line 69 of file SVFBugReport.h.

70 {
72 }
#define EVENTTYPEMASK

◆ getFuncName()

const std::string SVFBugEvent::getFuncName ( ) const
virtual

Definition at line 281 of file SVFBugReport.cpp.

282{
283 return eventInst->getFun()->getName();
284}
virtual const FunObjVar * getFun() const
Return the function of this ICFGNode.
Definition ICFGNode.h:75

Member Data Documentation

◆ eventInst

const ICFGNode* SVF::SVFBugEvent::eventInst
protected

Definition at line 63 of file SVFBugReport.h.

◆ typeAndInfoFlag

u32_t SVF::SVFBugEvent::typeAndInfoFlag
protected

Definition at line 62 of file SVFBugReport.h.


The documentation for this class was generated from the following files: