Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/adapters/dbgengttdadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,11 @@ bool DbgEngTTDAdapter::SetTTDPosition(const TTDPosition& position)
bool success = output.find("error") == std::string::npos && output.find("failed") == std::string::npos;
if (success)
{
LogInfo("Successfully navigated to TTD position {:X}:{:X}", position.sequence, position.step);
LogInfo("%s", fmt::format("Successfully navigated to TTD position {:X}:{:X}", position.sequence, position.step).c_str());
}
else
{
LogError("Failed to navigate to TTD position {:X}:{:X}", position.sequence, position.step);
LogError("%s", fmt::format("Failed to navigate to TTD position {:X}:{:X}", position.sequence, position.step).c_str());
}
return success;
}
Expand Down
19 changes: 10 additions & 9 deletions core/debuggercontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2971,7 +2971,7 @@ bool DebuggerController::RunCodeCoverageAnalysis(uint64_t startAddress, uint64_t
m_executedInstructions.clear();
m_codeCoverageAnalysisRun = false;

LogInfo("Starting TTD code coverage analysis for range 0x" PRIX64 " - 0x" PRIX64 "...", startAddress, endAddress);
LogInfo("Starting TTD code coverage analysis for range 0x%" PRIX64 " - 0x%" PRIX64 "...", startAddress, endAddress);

// Query TTD for execute access covering the specified range
auto events = GetTTDMemoryAccessForAddress(startAddress, endAddress, TTDMemoryExecute);
Expand All @@ -2989,7 +2989,7 @@ bool DebuggerController::RunCodeCoverageAnalysis(uint64_t startAddress, uint64_t
}

m_codeCoverageAnalysisRun = true;
LogInfo("TTD code coverage analysis completed for range. Found %d executed instructions.",
LogInfo("TTD code coverage analysis completed for range. Found 0x%" PRIx64 "executed instructions.",
m_executedInstructions.size());

return true;
Expand All @@ -3015,7 +3015,7 @@ bool DebuggerController::SaveCodeCoverageToFile(const std::string& filePath) con
std::ofstream file(filePath, std::ios::binary);
if (!file.is_open())
{
LogError("Failed to open file for writing: {}", filePath.c_str());
LogError("%s", fmt::format("Failed to open file for writing: {}", filePath.c_str()).c_str());
return false;
}

Expand All @@ -3035,12 +3035,13 @@ bool DebuggerController::SaveCodeCoverageToFile(const std::string& filePath) con
}

file.close();
LogInfo("Saved %d executed instruction addresses to %s", count, filePath.c_str());
LogError("%s", fmt::format("Saved {} executed instruction addresses to {}", count, filePath.c_str()).c_str());

return true;
}
catch (const std::exception& e)
{
LogError("Error saving code coverage: {}", e.what());
LogError("%s", fmt::format("Error saving code coverage: {}", e.what()).c_str());
return false;
}
}
Expand All @@ -3053,7 +3054,7 @@ bool DebuggerController::LoadCodeCoverageFromFile(const std::string& filePath)
std::ifstream file(filePath, std::ios::binary);
if (!file.is_open())
{
LogError("Failed to open file for reading: {}", filePath.c_str());
LogError("%s", fmt::format("Failed to open file for reading: {}", filePath.c_str()).c_str());
return false;
}

Expand All @@ -3071,7 +3072,7 @@ bool DebuggerController::LoadCodeCoverageFromFile(const std::string& filePath)
file.read(reinterpret_cast<char*>(&version), sizeof(version));
if (version != 1)
{
LogError("Unsupported file version: {}", version);
LogError("%s", fmt::format("Unsupported file version: {}", version).c_str());
return false;
}

Expand All @@ -3090,12 +3091,12 @@ bool DebuggerController::LoadCodeCoverageFromFile(const std::string& filePath)
file.close();
m_codeCoverageAnalysisRun = true;

LogInfo("Loaded {} executed instruction addresses from {}", count, filePath.c_str());
LogInfo("%s", fmt::format("Loaded {} executed instruction addresses from {}", count, filePath.c_str()).c_str());
return true;
}
catch (const std::exception& e)
{
LogError("Error loading code coverage: {}", e.what());
LogError("%s", fmt::format("Error loading code coverage: {}", e.what()).c_str());
return false;
}
}
Expand Down