Skip to content

Commit

Permalink
-print-pts will now print the base and offset of a field object (#1307)
Browse files Browse the repository at this point in the history
* release

* model-struct

* model-struct

* rename opt

* update comments

* comments

* comment

* comment

* optimize pts print
  • Loading branch information
kisslune authored Dec 30, 2023
1 parent b15ec37 commit c7a0787
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions svf/lib/WPA/Andersen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ void Andersen::dumpTopLevelPtsTo()

if (pts.empty())
{
outs() << "\t\tPointsTo: {empty}\n\n";
outs() << "\t\tPointsTo: {empty}\n";
}
else
{
Expand All @@ -910,8 +910,13 @@ void Andersen::dumpTopLevelPtsTo()
line.insert(*it);
}
for (multiset<u32_t>::const_iterator it = line.begin(); it != line.end(); ++it)
outs() << *it << " ";
outs() << "}\n\n";
{
if (auto gepNode = SVFUtil::dyn_cast<GepObjVar>(pag->getGNode(*it)))
outs() << gepNode->getBaseNode() << "_" << gepNode->getConstantFieldIdx() << " ";
else
outs() << *it << " ";
}
outs() << "}\n";
}
}
}
Expand Down

0 comments on commit c7a0787

Please sign in to comment.