Fixing recursion branches.
This commit is contained in:
parent
b28c51271d
commit
72b54cfe2a
|
@ -513,9 +513,11 @@ int SymbolDatabase::AnalyzeFunction(FunctionSymbol* fn) {
|
||||||
|
|
||||||
// If we have some address try to see what it is.
|
// If we have some address try to see what it is.
|
||||||
if (block->outgoing_address) {
|
if (block->outgoing_address) {
|
||||||
if (block->outgoing_address >= fn->start_address &&
|
if (block->outgoing_address > fn->start_address &&
|
||||||
block->outgoing_address <= fn->end_address) {
|
block->outgoing_address <= fn->end_address) {
|
||||||
// Branch into a block in this function.
|
// Branch into a block in this function.
|
||||||
|
// Note that we make branches to the start address act as function
|
||||||
|
// calls, as they are almost always recursion cases.
|
||||||
block->outgoing_type = FunctionBlock::kTargetBlock;
|
block->outgoing_type = FunctionBlock::kTargetBlock;
|
||||||
block->outgoing_block = fn->GetBlock(block->outgoing_address);
|
block->outgoing_block = fn->GetBlock(block->outgoing_address);
|
||||||
if (!block->outgoing_block) {
|
if (!block->outgoing_block) {
|
||||||
|
|
Loading…
Reference in New Issue