diff --git a/src/base/SMPFunction.cpp b/src/base/SMPFunction.cpp index 0bac2e410b40fc243b63add97e84803301212861..1e7e8e964a5283ce4f32b28467cb9fcbab63dc50 100644 --- a/src/base/SMPFunction.cpp +++ b/src/base/SMPFunction.cpp @@ -2062,7 +2062,7 @@ bool SMPFunction::AnalyzeStackPointerDeltas(void) { #if SMP_COMPARE_IDA_STARS_STACK_POINTER_DELTAS DebugFlag = (0 == strcmp("_dl_profile_fixup", this->GetFuncName())); TraceFlag = (0 == strcmp("_dl_profile_fixup", this->GetFuncName())); - bool DebugFuncFound = (0x8089910 == this->GetFirstFuncAddr()); + bool DebugFuncFound = (0x43ac70 == this->GetFirstFuncAddr()); DebugFlag = DebugFlag || DebugFuncFound; TraceFlag = TraceFlag || DebugFuncFound; #endif @@ -2500,6 +2500,8 @@ bool SMPFunction::AnalyzeStackPointerDeltas(void) { else { // First RETURN statement seen. ReturnSeen = true; this->NetStackDelta = IncomingDelta; + SMP_msg("INFO: First stack delta seen at return instruction at %p : Current: %lld\n", + CurrInst->GetAddr(), (long long) IncomingDelta); #if SMP_AUDIT_STACK_POINTER_DELTAS if (CALLING_CONVENTION_DEFAULT_FUNCTION_STACK_DELTA != IncomingDelta) { SMP_msg("WARNING: Stack delta not %d after return instruction at %llx\n", @@ -2529,7 +2531,7 @@ bool SMPFunction::AnalyzeStackPointerDeltas(void) { CurrBlock->SetOutgoingStackDelta(IncomingDelta); // record incoming delta for all successors if (ReachesOutChanged || (!ReprocessingAllocaBlocks)) { // if anything changed (deltas or reaching defs ReachOut set) list<SMPBasicBlock *>::iterator SuccIter; - if (DebugFlag && (0 == IncomingDelta)) { + if (DebugFlag && (0 == IncomingDelta) && (0 < this->GetLocalVarsSize())) { SMP_msg("ERROR: Pushing WorkList items with IncomingDelta of zero. Dumping Block:\n"); CurrBlock->Dump(); } diff --git a/src/base/SMPProgram.cpp b/src/base/SMPProgram.cpp index a5d10c9c470e7d7b4d436002d7d5428399805129..ae3647a077a4135402138ca7c3c27ffd65e005f4 100644 --- a/src/base/SMPProgram.cpp +++ b/src/base/SMPProgram.cpp @@ -856,7 +856,7 @@ void SMPProgram::Analyze(ProfilerInformation *pi, FILE *AnnotFile, FILE *InfoAnn } #if 1 // bool FuncFound = (0 == strcmp("__mktime_internal", CurrFunc->GetFuncName())); - bool FuncFound = (0x8089910 == CurrFunc->GetFirstFuncAddr()); + bool FuncFound = (0x43ac70 == CurrFunc->GetFirstFuncAddr()); if ((!changed || (IterationCounter > STARS_INTERPROCEDURAL_ITERATION_LIMIT)) && FuncFound) { CurrFunc->Dump(); CurrFunc->DumpDotCFG(); diff --git a/src/interfaces/idapro/STARSFunction.cpp b/src/interfaces/idapro/STARSFunction.cpp index 7a88f96fce1377973cf8053542b547f6ff1a7374..bb30d2f92d2dbd00601fd7899ad61bf61998cb1a 100644 --- a/src/interfaces/idapro/STARSFunction.cpp +++ b/src/interfaces/idapro/STARSFunction.cpp @@ -500,9 +500,13 @@ void STARS_IDA_Function_t::BuildFuncIR(SMPFunction *func) // Found a caller, with its call address in CurrXrefs.from func->AddCallSource(FromAddr); } + else if (DEFAULT == CallType) { + SMP_msg("ERROR: Fallthrough from %llx to func at %llx with xref type %d\n", + (uint64_t) FromAddr, (uint64_t) addr, CurrXrefs.GetType()); + } else { SMP_msg("ERROR: Bad CallInst.Analyze() at %llx to %llx with xref type %d\n", - (unsigned long long) FromAddr, (unsigned long long) addr, CurrXrefs.GetType()); + (uint64_t) FromAddr, (uint64_t) addr, CurrXrefs.GetType()); } } else { // Data xref