[Lldb-commits] [lldb] b6e2cf3 - [lldb][NFC] Remove ability to pass a custom printf format to DataExtractor::PutToLog
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 6 01:28:14 PST 2019
Author: Raphael Isemann
Date: 2019-12-06T10:27:45+01:00
New Revision: b6e2cf3270dab43dbc6ffad4695c5c14789bc5e5
URL: https://github.com/llvm/llvm-project/commit/b6e2cf3270dab43dbc6ffad4695c5c14789bc5e5
DIFF: https://github.com/llvm/llvm-project/commit/b6e2cf3270dab43dbc6ffad4695c5c14789bc5e5.diff
LOG: [lldb][NFC] Remove ability to pass a custom printf format to DataExtractor::PutToLog
This is luckily not used anywhere.
Added:
Modified:
lldb/include/lldb/Utility/DataExtractor.h
lldb/source/Utility/DataExtractor.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Utility/DataExtractor.h b/lldb/include/lldb/Utility/DataExtractor.h
index 333baf9fd349..bf0d1055cf43 100644
--- a/lldb/include/lldb/Utility/DataExtractor.h
+++ b/lldb/include/lldb/Utility/DataExtractor.h
@@ -188,16 +188,11 @@ class DataExtractor {
/// The type of objects to use when dumping data from this
/// object. See DataExtractor::Type.
///
- /// \param[in] type_format
- /// The optional format to use for the \a type objects. If this
- /// is nullptr, the default format for the \a type will be used.
- ///
/// \return
/// The offset at which dumping ended.
lldb::offset_t PutToLog(Log *log, lldb::offset_t offset,
lldb::offset_t length, uint64_t base_addr,
- uint32_t num_per_line, Type type,
- const char *type_format = nullptr) const;
+ uint32_t num_per_line, Type type) const;
/// Extract an arbitrary number of bytes in the specified byte order.
///
diff --git a/lldb/source/Utility/DataExtractor.cpp b/lldb/source/Utility/DataExtractor.cpp
index 4e45baf3aa41..ea4fb09bdaab 100644
--- a/lldb/source/Utility/DataExtractor.cpp
+++ b/lldb/source/Utility/DataExtractor.cpp
@@ -985,8 +985,7 @@ uint32_t DataExtractor::Skip_LEB128(offset_t *offset_ptr) const {
lldb::offset_t DataExtractor::PutToLog(Log *log, offset_t start_offset,
offset_t length, uint64_t base_addr,
uint32_t num_per_line,
- DataExtractor::Type type,
- const char *format) const {
+ DataExtractor::Type type) const {
if (log == nullptr)
return start_offset;
@@ -1010,29 +1009,29 @@ lldb::offset_t DataExtractor::PutToLog(Log *log, offset_t start_offset,
switch (type) {
case TypeUInt8:
- sstr.Printf(format ? format : " %2.2x", GetU8(&offset));
+ sstr.Printf(" %2.2x", GetU8(&offset));
break;
case TypeChar: {
char ch = GetU8(&offset);
- sstr.Printf(format ? format : " %c", isprint(ch) ? ch : ' ');
+ sstr.Printf(" %c", isprint(ch) ? ch : ' ');
} break;
case TypeUInt16:
- sstr.Printf(format ? format : " %4.4x", GetU16(&offset));
+ sstr.Printf(" %4.4x", GetU16(&offset));
break;
case TypeUInt32:
- sstr.Printf(format ? format : " %8.8x", GetU32(&offset));
+ sstr.Printf(" %8.8x", GetU32(&offset));
break;
case TypeUInt64:
- sstr.Printf(format ? format : " %16.16" PRIx64, GetU64(&offset));
+ sstr.Printf(" %16.16" PRIx64, GetU64(&offset));
break;
case TypePointer:
- sstr.Printf(format ? format : " 0x%" PRIx64, GetAddress(&offset));
+ sstr.Printf(" 0x%" PRIx64, GetAddress(&offset));
break;
case TypeULEB128:
- sstr.Printf(format ? format : " 0x%" PRIx64, GetULEB128(&offset));
+ sstr.Printf(" 0x%" PRIx64, GetULEB128(&offset));
break;
case TypeSLEB128:
- sstr.Printf(format ? format : " %" PRId64, GetSLEB128(&offset));
+ sstr.Printf(" %" PRId64, GetSLEB128(&offset));
break;
}
}
More information about the lldb-commits
mailing list