svf-lib 1.0.1683 → 1.0.1684

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,7 +84,10 @@ public:
84
84
 
85
85
  virtual const std::string toString() const
86
86
  {
87
- return _icfgEdge->toString();
87
+ std::string str;
88
+ std::stringstream rawstr(str);
89
+ rawstr << "CFBBGEdge: [CFBBGNode" << getDstID() << " <-- CFBBGNode" << getSrcID() << "]\t";
90
+ return rawstr.str();
88
91
  }
89
92
 
90
93
  inline const ICFGEdge *getICFGEdge() const
@@ -575,13 +578,21 @@ struct DOTGraphTraits<SVF::CFBasicBlockGraph *> : public DOTGraphTraits<SVF::SVF
575
578
  {
576
579
  CFBasicBlockEdge* edge = *(EI.getCurrent());
577
580
  assert(edge && "No edge found!!");
578
- if (SVFUtil::isa<CallCFGEdge>(edge->getICFGEdge()))
579
- return "style=solid,color=red";
580
- else if (SVFUtil::isa<RetCFGEdge>(edge->getICFGEdge()))
581
- return "style=solid,color=blue";
581
+ if (edge->getICFGEdge())
582
+ {
583
+ if (SVFUtil::isa<CallCFGEdge>(edge->getICFGEdge()))
584
+ {
585
+ return "style=solid,color=red";
586
+ }
587
+ else if (SVFUtil::isa<RetCFGEdge>(edge->getICFGEdge()))
588
+ return "style=solid,color=blue";
589
+ else
590
+ return "style=solid";
591
+ }
582
592
  else
593
+ {
583
594
  return "style=solid";
584
- return "";
595
+ }
585
596
  }
586
597
 
587
598
  template<class EdgeIter>
@@ -592,11 +603,13 @@ struct DOTGraphTraits<SVF::CFBasicBlockGraph *> : public DOTGraphTraits<SVF::SVF
592
603
 
593
604
  std::string str;
594
605
  std::stringstream rawstr(str);
595
- if (const CallCFGEdge* dirCall = SVFUtil::dyn_cast<CallCFGEdge>(edge->getICFGEdge()))
596
- rawstr << dirCall->getCallSite();
597
- else if (const RetCFGEdge* dirRet = SVFUtil::dyn_cast<RetCFGEdge>(edge->getICFGEdge()))
598
- rawstr << dirRet->getCallSite();
599
-
606
+ if (edge->getICFGEdge())
607
+ {
608
+ if (const CallCFGEdge* dirCall = SVFUtil::dyn_cast<CallCFGEdge>(edge->getICFGEdge()))
609
+ rawstr << dirCall->getCallSite();
610
+ else if (const RetCFGEdge* dirRet = SVFUtil::dyn_cast<RetCFGEdge>(edge->getICFGEdge()))
611
+ rawstr << dirRet->getCallSite();
612
+ }
600
613
  return rawstr.str();
601
614
  }
602
615
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1683",
3
+ "version": "1.0.1684",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {