diff options
| author | Nguyễn Gia Phong <cnx@loang.net> | 2025-10-15 18:24:14 +0900 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2025-10-15 18:26:47 +0900 |
| commit | 06dff5537cf4b304aaaa7ea55b5899138fc3b8f4 (patch) | |
| tree | 8870a263b6f241e402c12e2bd5fb66f1162d3621 /scout.cc | |
| parent | 5562397b73d4cde06e773f00485e16406853e1fd (diff) | |
| download | taosc-06dff5537cf4b304aaaa7ea55b5899138fc3b8f4.tar.gz | |
Refactor C++ stuff
Constantize all the things!
Diffstat (limited to 'scout.cc')
| -rw-r--r-- | scout.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scout.cc b/scout.cc index ae2f7c6..0bcce84 100644 --- a/scout.cc +++ b/scout.cc @@ -39,18 +39,18 @@ main (int argc, char** argv) if (std::cin.fail ()) break; std::cout << std::hex << address; - auto* block = find_block (cs, co, address); + auto* const block = find_block (cs, co, address); if (block->containingFuncs () < 1) die_for (address, "no function found containing instruction at"); std::vector <Dyninst::ParseAPI::Function*> functions; block->getFuncs (functions); std::set <Dyninst::Address> seen; - for (auto* fun : functions) + for (auto* const fun : functions) for (auto const& return_block : fun->returnBlocks ()) { std::set <Dyninst::ParseAPI::Block*> post_dominates; fun->getImmediatePostDominates (return_block, post_dominates); - for (auto* pd : post_dominates) + for (auto* const pd : post_dominates) if (seen.insert (pd->start ()).second) std::cout << ' ' << std::hex << pd->start (); } |
