diff --git a/src/interfaces/idapro/STARSIDAProgram.cpp b/src/interfaces/idapro/STARSIDAProgram.cpp index 32778bbdefff31185be1e42c5276120b5b01219d..6cf5330bfcca8fe49f2fab0e486ac399dc0d7440 100644 --- a/src/interfaces/idapro/STARSIDAProgram.cpp +++ b/src/interfaces/idapro/STARSIDAProgram.cpp @@ -102,7 +102,7 @@ void STARS_IDA_Program_t::CloseFiles(void) { } // end of STARS_IDA_Program_t::CloseFiles() void STARS_IDA_Program_t::InitData(void) { - SMP_msg("INFO: Reach STARS_IDA_Program_t::InitData method.\n"); + SMP_msg("INFO: Reached STARS_IDA_Program_t::InitData method.\n"); // Init everything else through the base class. STARS_Program_t::InitData(); @@ -126,7 +126,7 @@ void STARS_IDA_Program_t::InitData(void) { void STARS_IDA_Program_t::DetermineRootFileName(void) { SMP_msg("INFO: Reached DetermineRootFileName method.\n"); char TempRootName[STARS_MAXSTR]; - for (size_t Index = 0; Index < (STARS_MAXSTR - 1); ++Index) { + for (std::size_t Index = 0; Index < (STARS_MAXSTR - 1); ++Index) { TempRootName[Index] = 'S'; } TempRootName[STARS_MAXSTR - 1] = '\0'; @@ -138,7 +138,7 @@ void STARS_IDA_Program_t::DetermineRootFileName(void) { #else qstring EnvValue; EnvValue.reserve(STARS_MAXSTR); - if (qgetenv("STARS_ROOT_FILENAME", &EnvValue)) { + if (::qgetenv("STARS_ROOT_FILENAME", &EnvValue)) { SMP_strncpy(TempRootName, EnvValue.c_str(), sizeof(TempRootName)-1); SMP_msg("INFO: qgetenv found value of STARS_ROOT_FILENAME: %s\n", TempRootName); } @@ -160,7 +160,7 @@ void STARS_IDA_Program_t::DetermineRootFileName(void) { if (SMP_is_dll()) { this->SetSharedObjectFlag(true); - SMP_msg("INFO: Determined shard object from is_dll() in IDA Pro.\n"); + SMP_msg("INFO: Determined shared object from is_dll() in IDA Pro.\n"); } else { // Try to find ".so" or ".dll" or ".a" in file name, indicating shared object. @@ -268,7 +268,7 @@ void STARS_IDA_Program_t::InitStaticDataTable(SMPProgram *CurrProg) { STARS_ea_t ea; flags_t ObjFlags; bool ReadOnlyFlag; - size_t DummyNumber = 0; // suffix for SMP_dummy# global names + std::size_t DummyNumber = 0; // suffix for SMP_dummy# global names // First, examine the data segments and collect info about static // data, such as name/address/size. @@ -319,7 +319,7 @@ void STARS_IDA_Program_t::InitStaticDataTable(SMPProgram *CurrProg) { if (NextEA == BADADDR) { NextEA = seg->get_endEA(); } - size_t ObjSize = (size_t) (NextEA - ea); + std::size_t ObjSize = (std::size_t) (NextEA - ea); if (TempLowestGlobalVarAddress > ea) TempLowestGlobalVarAddress = ea; if (TempHighestGlobalVarAddress < NextEA) @@ -357,11 +357,11 @@ void STARS_IDA_Program_t::InitStaticDataTable(SMPProgram *CurrProg) { pair<map<string, STARS_ea_t>::iterator, bool> InsertResult; InsertResult = CurrProg->InsertGlobalNameAddrMapEntry(TempPair); if (!InsertResult.second) { - SMP_msg("FATAL ERROR: Insertion into GlobalNameMap: %s at %llx\n", buf, (unsigned long long) ea); + SMP_msg("FATAL ERROR: Insertion into GlobalNameMap: %s at %llx\n", buf, (uint64_t) ea); } #if 0 else { - SMP_msg("INFO: Insertion into GlobalNameMap: %s at %llx\n", buf, (unsigned long long) ea); + SMP_msg("INFO: Insertion into GlobalNameMap: %s at %llx\n", buf, (uint64_t) ea); } #endif assert(InsertResult.second); @@ -389,7 +389,7 @@ void STARS_IDA_Program_t::InitStaticDataTable(SMPProgram *CurrProg) { STARS_Segment_t *SegInfo = SMP_getseg(TargetAddr); if ((NULL != SegInfo) && (SegInfo->IsCodeSegment())) { if (!ReadOnlyFlag) { - SMP_msg("INFO: Code Xref from writeable data at %llx\n", (uint64_t)ea); + SMP_msg("INFO: Code Xref from writeable data at %llx to %llx\n", (uint64_t)ea, (uint64_t)TargetAddr); } bool NewTarget = CurrProg->InsertDataToCodeXref(TargetAddr); if (NewTarget) @@ -453,19 +453,19 @@ void STARS_IDA_Program_t::InitStaticDataTable(SMPProgram *CurrProg) { // Update SMPProgram global limits if (LowestCodeAddress > TempLowestCodeAddress) { LowestCodeAddress = TempLowestCodeAddress; - SMP_msg("INFO: New lowest code address: %x\n", LowestCodeAddress); + SMP_msg("INFO: New lowest code address: %llx\n", (uint64_t)LowestCodeAddress); } if (HighestCodeAddress < TempHighestCodeAddress) { HighestCodeAddress = TempHighestCodeAddress; - SMP_msg("INFO: New highest code address: %x\n", HighestCodeAddress); + SMP_msg("INFO: New highest code address: %llx\n", (uint64_t)HighestCodeAddress); } if (LowestGlobalVarAddress > TempLowestGlobalVarAddress) { LowestGlobalVarAddress = TempLowestGlobalVarAddress; - SMP_msg("INFO: New lowest static data address: %x\n", LowestGlobalVarAddress); + SMP_msg("INFO: New lowest static data address: %llx\n", (uint64_t)LowestGlobalVarAddress); } if (HighestGlobalVarAddress < TempHighestGlobalVarAddress) { HighestGlobalVarAddress = TempHighestGlobalVarAddress; - SMP_msg("INFO: New highest static data address: %x\n", HighestGlobalVarAddress); + SMP_msg("INFO: New highest static data address: %llx\n", (uint64_t)HighestGlobalVarAddress); } return;