/// 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.
///
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;
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;
}
}