From 2696e07a6592e631f48b5a4fd412600eaf01ee57 Mon Sep 17 00:00:00 2001 From: clc5q <clc5q@git.zephyr-software.com> Date: Mon, 21 Jan 2008 03:31:18 +0000 Subject: [PATCH] Reduce debug output. --- SMPStaticAnalyzer.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/SMPStaticAnalyzer.cpp b/SMPStaticAnalyzer.cpp index b123c540..07059e88 100644 --- a/SMPStaticAnalyzer.cpp +++ b/SMPStaticAnalyzer.cpp @@ -33,7 +33,6 @@ #define SMP_DEBUG3 0 // verbose #define SMP_DEBUG_MEM 0 // print memory operands #define SMP_DEBUG_TYPE0 0 // Output instr info for OptType = 0 -#define SMP_DEBUG_ORPHANS 1 // find code outside of functions #define SMP_DEBUG_CHUNKS 0 // restructuring tail chunks, shared chunks, etc. #define SMP_DEBUG_DATA_ONLY 0 // Find & fix data addresses in code segments @@ -44,7 +43,8 @@ int FuncsProcessed = 0; #define SMP_FIXUP_IDB 1 // Try to fix the IDA database? -#define SMP_DEBUG_FIXUP_IDB 1 // debugging output for FixupIDB chain +#define SMP_DEBUG_FIXUP_IDB 0 // debugging output for FixupIDB chain +#define SMP_FIND_ORPHANS 1 // find code outside of functions // Define optimization categories for instructions. int OptCategory[NN_last+1]; @@ -389,7 +389,7 @@ void IDAP_run(int arg) { CurrFunc = NULL; } // end for (size_t FuncIndex = 0; ...) -#if SMP_DEBUG_ORPHANS +#if SMP_FIND_ORPHANS FindOrphanedCode(seg, SymsFile); #endif @@ -477,8 +477,10 @@ void FindCodeAddresses(void) { flags_t InstrFlags = getFlags(addr); if (isHead(InstrFlags) && isCode(InstrFlags)) { IDAProLocs.push_back(addr); +#if 0 if ((0x806cda4 <= addr) && (0x806cf99 >= addr)) msg("IDA code addr: %x\n", addr); +#endif } // end if (isHead(addr) && isCode(addr) #if SMP_DEBUG_FIXUP_IDB else if ((0x806cda4 <= addr) && (0x806cf99 >= addr)) { @@ -651,7 +653,9 @@ void FindDataInCode(void) { } else if (isCode(AddrFlags)) { // must be true if (MIN_DATARUN_LEN <= DataRunLen) { +#if SMP_DEBUG_FIXUP_IDB msg("DataRunLen: %d at %x\n", DataRunLen, addr); +#endif InstrLen = ua_ana0(addr); #if SMP_DEBUG_FIXUP_IDB msg("Calling IsCodeMisaligned: len %d\n", InstrLen); @@ -1406,8 +1410,10 @@ void AuditCodeTargets(void) { } // end if (xb.iscode) else { // DATA xref if (XrefType == dr_O) { +#if SMP_DEBUG_FIXUP_IDB msg("Data xref to %x Func %s from %x\n", addr, FuncName, xb.from); +#endif } else { msg("Strange data xref %d to %x Func %s from %x\n", -- GitLab