Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-print-pts will now print the base and offset of a field object #1307

Merged
merged 13 commits into from
Dec 30, 2023
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 @@

if (pts.empty())
{
outs() << "\t\tPointsTo: {empty}\n\n";
outs() << "\t\tPointsTo: {empty}\n";

Check warning on line 900 in svf/lib/WPA/Andersen.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/WPA/Andersen.cpp#L900

Added line #L900 was not covered by tests
}
else
{
Expand All @@ -910,8 +910,13 @@
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() << " ";

Check warning on line 915 in svf/lib/WPA/Andersen.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/WPA/Andersen.cpp#L914-L915

Added lines #L914 - L915 were not covered by tests
else
outs() << *it << " ";

Check warning on line 917 in svf/lib/WPA/Andersen.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/WPA/Andersen.cpp#L917

Added line #L917 was not covered by tests
}
outs() << "}\n";

Check warning on line 919 in svf/lib/WPA/Andersen.cpp

View check run for this annotation

Codecov / codecov/patch

svf/lib/WPA/Andersen.cpp#L919

Added line #L919 was not covered by tests
}
}
}
Expand Down
Loading