aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
diff options
context:
space:
mode:
authorAlexander Yermolovich <ayermolo@fb.com>2023-01-09 11:29:03 -0800
committerAlexander Yermolovich <ayermolo@fb.com>2023-01-09 11:29:43 -0800
commite262b8f48af9fdca8380f2f079e50291956aad71 (patch)
treea29ace55b723fae489bcb4b014cd5d46d61493e2 /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
parent78f01f69b32801fbd0c6e0724893f2dfd20302d8 (diff)
downloadllvm-e262b8f48af9fdca8380f2f079e50291956aad71.zip
llvm-e262b8f48af9fdca8380f2f079e50291956aad71.tar.gz
llvm-e262b8f48af9fdca8380f2f079e50291956aad71.tar.bz2
[LLDB] Change formatting to use llvm::formatv
In preparation for eanbling 64bit support in LLDB switching to use llvm::formatv instead of format MACROs. Reviewed By: labath, JDevlieghere Differential Revision: https://reviews.llvm.org/D139955
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 0213bcc..5b76239 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1952,7 +1952,7 @@ std::shared_ptr<ObjectFileELF> ObjectFileELF::GetGnuDebugDataObjectFile() {
auto err = lldb_private::lzma::uncompress(data.GetData(), uncompressedData);
if (err) {
GetModule()->ReportWarning(
- "An error occurred while decompression the section %s: %s",
+ "An error occurred while decompression the section {0}: {1}",
section->GetName().AsCString(), llvm::toString(std::move(err)).c_str());
return nullptr;
}
@@ -2615,7 +2615,7 @@ unsigned ObjectFileELF::ApplyRelocations(
for (unsigned i = 0; i < num_relocations; ++i) {
if (!rel.Parse(rel_data, &offset)) {
- GetModule()->ReportError(".rel%s[%d] failed to parse relocation",
+ GetModule()->ReportError(".rel{0}[{1:d}] failed to parse relocation",
rel_section->GetName().AsCString(), i);
break;
}
@@ -2643,7 +2643,7 @@ unsigned ObjectFileELF::ApplyRelocations(
}
*dst = value;
} else {
- GetModule()->ReportError(".rel%s[%u] unknown symbol id: %d",
+ GetModule()->ReportError(".rel{0}[{1}] unknown symbol id: {2:d}",
rel_section->GetName().AsCString(), i,
reloc_symbol(rel));
}
@@ -2651,7 +2651,7 @@ unsigned ObjectFileELF::ApplyRelocations(
case R_386_PC32:
default:
GetModule()->ReportError("unsupported 32-bit relocation:"
- " .rel%s[%u], type %u",
+ " .rel{0}[{1}], type {2}",
rel_section->GetName().AsCString(), i,
reloc_type(rel));
}
@@ -3396,7 +3396,7 @@ size_t ObjectFileELF::ReadSectionData(Section *section,
GetByteOrder() == eByteOrderLittle, GetAddressByteSize() == 8);
if (!Decompressor) {
GetModule()->ReportWarning(
- "Unable to initialize decompressor for section '%s': %s",
+ "Unable to initialize decompressor for section '{0}': {1}",
section->GetName().GetCString(),
llvm::toString(Decompressor.takeError()).c_str());
section_data.Clear();
@@ -3407,10 +3407,9 @@ size_t ObjectFileELF::ReadSectionData(Section *section,
std::make_shared<DataBufferHeap>(Decompressor->getDecompressedSize(), 0);
if (auto error = Decompressor->decompress(
{buffer_sp->GetBytes(), size_t(buffer_sp->GetByteSize())})) {
- GetModule()->ReportWarning(
- "Decompression of section '%s' failed: %s",
- section->GetName().GetCString(),
- llvm::toString(std::move(error)).c_str());
+ GetModule()->ReportWarning("Decompression of section '{0}' failed: {1}",
+ section->GetName().GetCString(),
+ llvm::toString(std::move(error)).c_str());
section_data.Clear();
return 0;
}