From 40f09766708d8f4c829fa08e107f7b3011b0123b Mon Sep 17 00:00:00 2001 From: clc5q <clc5q@git.zephyr-software.com> Date: Thu, 13 Dec 2007 19:50:32 +0000 Subject: [PATCH] Emit annotations for orphan code bytes that were still isUnknown after all other fixups; minor change to ad hoc debugging address. --- SMPStaticAnalyzer.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/SMPStaticAnalyzer.cpp b/SMPStaticAnalyzer.cpp index 0be81e5c..2c499e65 100644 --- a/SMPStaticAnalyzer.cpp +++ b/SMPStaticAnalyzer.cpp @@ -541,6 +541,9 @@ void FixupIDB(void) { FindDataInCode(); AuditTailChunkOwnership(); FixCodeIdentification(); +#if SMP_DEBUG_FIXUP_IDB + SpecialDebugOutput(); +#endif } // end of FixupIDB() // Find and print all data head addresses in code segments. @@ -1057,8 +1060,10 @@ void FixCodeIdentification(void) { SMPInstr NewInstr(CurrDisasmAddr); NewInstr.Analyze(); #if SMP_DEBUG_FIXUP_IDB +#if 0 msg("FixCodeID success at %x: len: %d %s\n", CurrDisasmAddr, InstrLen, NewInstr.GetDisasm()); +#endif #endif } else { @@ -1214,7 +1219,13 @@ void FindOrphanedCode(segment_t *CurrSeg, FILE *AnnotFile) { // Remove interactive color-coding tags. tag_remove(disasm, disasm, 0); msg("Successfully analyzed! %s\n", disasm); + SMPInstr UnknownInstr(addr); + UnknownInstr.Analyze(); // TODO: Get new code into a chunk. **!!** + + // If instruction is still not included in a code chunk, + // emit annotations for it in isolation. + UnknownInstr.EmitAnnotations(true, false, AnnotFile); } } } // end for (ea_t addr = CurrSeg->startEA; ...) @@ -1341,18 +1352,7 @@ ea_t FindNewFuncLimit(ea_t StartAddr) { void SpecialDebugOutput(void) { char disasm[MAXSTR]; vector<ea_t> ProblemAddrs; - ProblemAddrs.push_back(0x8048175); - ProblemAddrs.push_back(0x80481c6); - ProblemAddrs.push_back(0x80481e4); - ProblemAddrs.push_back(0x804847A); - ProblemAddrs.push_back(0x080486A8); - ProblemAddrs.push_back(0x08048A2A); - ProblemAddrs.push_back(0x08048CE1); - ProblemAddrs.push_back(0x08048DC0); - ProblemAddrs.push_back(0x08048E90); - ProblemAddrs.push_back(0x08049087); - ProblemAddrs.push_back(0x08049148); - ProblemAddrs.push_back(0x08049231); + ProblemAddrs.push_back(0x8066d08); for (size_t index = 0; index < ProblemAddrs.size(); ++index) { ea_t addr = ProblemAddrs[index]; -- GitLab