From 5c85c92d1aade99096e80d74bafc5d9574e44bf7 Mon Sep 17 00:00:00 2001 From: nemerle Date: Fri, 22 Apr 2016 11:45:23 +0200 Subject: [PATCH] Replace tabs with spaces --- common/PatternCollector.h | 12 ++++++------ include/BasicBlock.h | 16 ++++++++-------- include/BinaryImage.h | 2 +- include/icode.h | 4 ++-- src/disassem.cpp | 3 ++- src/project.cpp | 8 ++++---- src/proplong.cpp | 10 +++++----- 7 files changed, 28 insertions(+), 27 deletions(-) diff --git a/common/PatternCollector.h b/common/PatternCollector.h index bb853ae..33ccca2 100644 --- a/common/PatternCollector.h +++ b/common/PatternCollector.h @@ -5,18 +5,18 @@ #include #include -#define SYMLEN 16 /* Number of chars in the symbol name, incl null */ -#define PATLEN 23 /* Number of bytes in the pattern part */ +#define SYMLEN 16 /* Number of chars in the symbol name, incl null */ +#define PATLEN 23 /* Number of bytes in the pattern part */ struct HASHENTRY { - char name[SYMLEN]; /* The symbol name */ - uint8_t pat [PATLEN]; /* The pattern */ - uint16_t offset; /* Offset (needed temporarily) */ + char name[SYMLEN]; /* The symbol name */ + uint8_t pat [PATLEN]; /* The pattern */ + uint16_t offset; /* Offset (needed temporarily) */ }; struct PatternCollector { - uint8_t buf[100], bufSave[7]; /* Temp buffer for reading the file */ + uint8_t buf[100], bufSave[7]; /* Temp buffer for reading the file */ uint16_t readShort(FILE *f) { uint8_t b1, b2; diff --git a/include/BasicBlock.h b/include/BasicBlock.h index bf4e56c..6896faa 100644 --- a/include/BasicBlock.h +++ b/include/BasicBlock.h @@ -59,10 +59,10 @@ public: ICODE &front(); ICODE &back(); size_t size(); - uint8_t nodeType; /* Type of node */ - eDFS traversed; /* last traversal id is held here traversed yet? */ - int numHlIcodes; /* No. of high-level icodes */ - uint32_t flg; /* BB flags */ + uint8_t nodeType; /* Type of node */ + eDFS traversed; /* last traversal id is held here traversed yet? */ + int numHlIcodes; /* No. of high-level icodes */ + uint32_t flg; /* BB flags */ /* In edges and out edges */ std::vector inEdges; // does not own held pointers @@ -80,10 +80,10 @@ public: interval *correspInt; //!< Corresponding interval in derived graph Gi-1 // For live register analysis // LiveIn(b) = LiveUse(b) U (LiveOut(b) - Def(b)) - LivenessSet liveUse; /* LiveUse(b) */ - LivenessSet def; /* Def(b) */ - LivenessSet liveIn; /* LiveIn(b) */ - LivenessSet liveOut; /* LiveOut(b) */ + LivenessSet liveUse; /* LiveUse(b) */ + LivenessSet def; /* Def(b) */ + LivenessSet liveIn; /* LiveIn(b) */ + LivenessSet liveOut; /* LiveOut(b) */ /* For structuring analysis */ int dfsFirstNum; /* DFS #: first visit of node */ diff --git a/include/BinaryImage.h b/include/BinaryImage.h index 06dd6eb..e713633 100644 --- a/include/BinaryImage.h +++ b/include/BinaryImage.h @@ -14,7 +14,7 @@ struct PROG /* Loaded program image parameters */ int cProcs; /* Number of procedures so far */ int offMain; /* The offset of the main() proc */ uint16_t segMain; /* The segment of the main() proc */ - bool bSigs; /* True if signatures loaded */ + bool bSigs; /* True if signatures loaded */ int cbImage; /* Length of image in bytes */ uint8_t * Imagez; /* Allocated by loader to hold entire program image */ int addressingMode; diff --git a/include/icode.h b/include/icode.h index c1ae718..78e2e70 100644 --- a/include/icode.h +++ b/include/icode.h @@ -544,8 +544,8 @@ public: } }; icodeType type; /* Icode type */ - DU_ICODE du; /* Def/use regs/vars */ - DU1 du1; /* du chain 1 */ + DU_ICODE du; /* Def/use regs/vars */ + DU1 du1; /* du chain 1 */ int loc_ip; // used by CICodeRec to number ICODEs LLInst * ll() { return &m_ll;} diff --git a/src/disassem.cpp b/src/disassem.cpp index bdfd817..90527ff 100644 --- a/src/disassem.cpp +++ b/src/disassem.cpp @@ -638,7 +638,8 @@ void interactDis(Function * initProc, int initIC) const char *procname = "UNKNOWN"; if(initProc) procname = initProc->name.c_str(); - printf("Wanted to start interactive disasassembler for %s at %x\n",procname,initIC); + + printf("Wanted to start interactive disasassembler for %s:%d\n",procname,initIC); return; } diff --git a/src/project.cpp b/src/project.cpp index f69b1ca..3ca433a 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -8,10 +8,10 @@ using namespace std; //Project g_proj; QString asm1_name, asm2_name; /* Assembler output filenames */ -SYMTAB symtab; /* Global symbol table */ -STATS stats; /* cfg statistics */ -//PROG prog; /* programs fields */ -OPTION option; /* Command line options */ +SYMTAB symtab; /* Global symbol table */ +STATS stats; /* cfg statistics */ +//PROG prog; /* programs fields */ +OPTION option; /* Command line options */ Project *Project::s_instance = nullptr; Project::Project() : callGraph(nullptr) { diff --git a/src/proplong.cpp b/src/proplong.cpp index 39fdec3..67ca34b 100644 --- a/src/proplong.cpp +++ b/src/proplong.cpp @@ -210,7 +210,7 @@ static int longJCond22 (Assignment &asgn, iICODE pIcode,iICODE pEnd) iter=std::find(tbb->inEdges.begin(),tbb->inEdges.end(),obb1); assert(iter!=tbb->inEdges.end()); tbb->inEdges.erase(iter); - if (icodes[3]->ll()->getOpcode() == iJE) /* replace */ + if (icodes[3]->ll()->getOpcode() == iJE) /* replace */ tbb->inEdges.push_back(pbb); /* Update statistics */ @@ -264,9 +264,9 @@ void Function::propLongStk (int i, const ID &pLocId) condOp oper = DUMMY; switch (pIcode->ll()->getOpcode()) { - case iAND: oper=AND; break; - case iOR: oper=OR; break; - case iXOR: oper=XOR; break; + case iAND: oper=AND; break; + case iOR: oper=OR; break; + case iXOR: oper=XOR; break; } if(DUMMY!=oper) { @@ -503,7 +503,7 @@ int Function::findForwardLongUses(int loc_ident_idx, const ID &pLocId, iICODE be if (pLocId.longId().srcDstRegMatch(pIcode,pIcode)) { asgn.lhs = AstIdent::LongIdx (loc_ident_idx); - asgn.rhs = new Constant(0, 4); /* long 0 */ + asgn.rhs = new Constant(0, 4); /* long 0 */ asgn.lhs = new BinaryOperator(condOpJCond[next1->ll()->getOpcode() - iJB],asgn.lhs, asgn.rhs); next1->setJCond(asgn.lhs); next1->copyDU(*pIcode, eUSE, eUSE);