| 327 | } |
| 328 | |
| 329 | const retdec::common::Object* StackAnalysis::getConfigStackVariable( |
| 330 | llvm::Function* fnc, |
| 331 | SymbolicTree& root) |
| 332 | { |
| 333 | auto baseOffset = getBaseOffset(root); |
| 334 | if (!baseOffset.has_value()) |
| 335 | { |
| 336 | return nullptr; |
| 337 | } |
| 338 | |
| 339 | auto cfn = _config->getConfigFunction(fnc); |
| 340 | if (cfn && _config->getLlvmStackVariable(fnc, baseOffset.value()) == nullptr) |
| 341 | { |
| 342 | for (auto& var: cfn->locals) |
| 343 | { |
| 344 | if (var.getStorage().getStackOffset() == baseOffset) |
| 345 | { |
| 346 | return &var; |
| 347 | } |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | return nullptr; |
| 352 | } |
| 353 | |
| 354 | } // namespace bin2llvmir |
| 355 | } // namespace retdec |
nothing calls this directly
no test coverage detected