LLDB  mainline
Namespaces | Functions
StringPrinter.cpp File Reference
#include "lldb/DataFormatters/StringPrinter.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/Status.h"
#include "llvm/Support/ConvertUTF.h"
#include <ctype.h>
#include <locale>
#include <memory>
Include dependency graph for StringPrinter.cpp:

Go to the source code of this file.

Namespaces

 lldb_private
 Enumerations for broadcasting.
 
 lldb_private::formatters
 

Functions

template<lldb_private::formatters::StringPrinter::StringElementType type>
static StringPrinter::StringPrinterBufferPointer GetPrintableImpl (uint8_t *buffer, uint8_t *buffer_end, uint8_t *&next)
 
static bool isprint (char32_t codepoint)
 
template<>
StringPrinter::StringPrinterBufferPointer GetPrintableImpl< StringPrinter::StringElementType::ASCII > (uint8_t *buffer, uint8_t *buffer_end, uint8_t *&next)
 
static char32_t ConvertUTF8ToCodePoint (unsigned char c0, unsigned char c1)
 
static char32_t ConvertUTF8ToCodePoint (unsigned char c0, unsigned char c1, unsigned char c2)
 
static char32_t ConvertUTF8ToCodePoint (unsigned char c0, unsigned char c1, unsigned char c2, unsigned char c3)
 
template<>
StringPrinter::StringPrinterBufferPointer GetPrintableImpl< StringPrinter::StringElementType::UTF8 > (uint8_t *buffer, uint8_t *buffer_end, uint8_t *&next)
 
static StringPrinter::StringPrinterBufferPointer GetPrintable (StringPrinter::StringElementType type, uint8_t *buffer, uint8_t *buffer_end, uint8_t *&next)
 
template<typename SourceDataType >
static bool DumpUTFBufferToStream (llvm::ConversionResult(*ConvertFunction)(const SourceDataType **, const SourceDataType *, llvm::UTF8 **, llvm::UTF8 *, llvm::ConversionFlags), const StringPrinter::ReadBufferAndDumpToStreamOptions &dump_options)
 
template<>
bool lldb_private::formatters::StringPrinter::ReadStringAndDumpToStream< StringPrinter::StringElementType::ASCII > (const ReadStringAndDumpToStreamOptions &options)
 
template<typename SourceDataType >
static bool lldb_private::formatters::ReadUTFBufferAndDumpToStream (const StringPrinter::ReadStringAndDumpToStreamOptions &options, llvm::ConversionResult(*ConvertFunction)(const SourceDataType **, const SourceDataType *, llvm::UTF8 **, llvm::UTF8 *, llvm::ConversionFlags))
 
template<>
bool lldb_private::formatters::StringPrinter::ReadStringAndDumpToStream< StringPrinter::StringElementType::UTF8 > (const ReadStringAndDumpToStreamOptions &options)
 
template<>
bool lldb_private::formatters::StringPrinter::ReadStringAndDumpToStream< StringPrinter::StringElementType::UTF16 > (const ReadStringAndDumpToStreamOptions &options)
 
template<>
bool lldb_private::formatters::StringPrinter::ReadStringAndDumpToStream< StringPrinter::StringElementType::UTF32 > (const ReadStringAndDumpToStreamOptions &options)
 
template<>
bool lldb_private::formatters::StringPrinter::ReadBufferAndDumpToStream< StringPrinter::StringElementType::UTF8 > (const ReadBufferAndDumpToStreamOptions &options)
 
template<>
bool lldb_private::formatters::StringPrinter::ReadBufferAndDumpToStream< StringPrinter::StringElementType::ASCII > (const ReadBufferAndDumpToStreamOptions &options)
 
template<>
bool lldb_private::formatters::StringPrinter::ReadBufferAndDumpToStream< StringPrinter::StringElementType::UTF16 > (const ReadBufferAndDumpToStreamOptions &options)
 
template<>
bool lldb_private::formatters::StringPrinter::ReadBufferAndDumpToStream< StringPrinter::StringElementType::UTF32 > (const ReadBufferAndDumpToStreamOptions &options)
 

Function Documentation

◆ ConvertUTF8ToCodePoint() [1/3]

static char32_t ConvertUTF8ToCodePoint ( unsigned char  c0,
unsigned char  c1 
)
static

◆ ConvertUTF8ToCodePoint() [2/3]

static char32_t ConvertUTF8ToCodePoint ( unsigned char  c0,
unsigned char  c1,
unsigned char  c2 
)
static

Definition at line 119 of file StringPrinter.cpp.

◆ ConvertUTF8ToCodePoint() [3/3]

static char32_t ConvertUTF8ToCodePoint ( unsigned char  c0,
unsigned char  c1,
unsigned char  c2,
unsigned char  c3 
)
static

Definition at line 123 of file StringPrinter.cpp.

◆ DumpUTFBufferToStream()

template<typename SourceDataType >
static bool DumpUTFBufferToStream ( llvm::ConversionResult(*)(const SourceDataType **, const SourceDataType *, llvm::UTF8 **, llvm::UTF8 *, llvm::ConversionFlags)  ConvertFunction,
const StringPrinter::ReadBufferAndDumpToStreamOptions dump_options 
)
static

◆ GetPrintable()

static StringPrinter::StringPrinterBufferPointer GetPrintable ( StringPrinter::StringElementType  type,
uint8_t *  buffer,
uint8_t *  buffer_end,
uint8_t *&  next 
)
static

◆ GetPrintableImpl()

template<lldb_private::formatters::StringPrinter::StringElementType type>
static StringPrinter::StringPrinterBufferPointer GetPrintableImpl ( uint8_t *  buffer,
uint8_t *  buffer_end,
uint8_t *&  next 
)
static

◆ GetPrintableImpl< StringPrinter::StringElementType::ASCII >()

template<>
StringPrinter::StringPrinterBufferPointer GetPrintableImpl< StringPrinter::StringElementType::ASCII > ( uint8_t *  buffer,
uint8_t *  buffer_end,
uint8_t *&  next 
)

Definition at line 65 of file StringPrinter.cpp.

References isprint().

◆ GetPrintableImpl< StringPrinter::StringElementType::UTF8 >()

template<>
StringPrinter::StringPrinterBufferPointer GetPrintableImpl< StringPrinter::StringElementType::UTF8 > ( uint8_t *  buffer,
uint8_t *  buffer_end,
uint8_t *&  next 
)

Definition at line 130 of file StringPrinter.cpp.

References ConvertUTF8ToCodePoint(), and isprint().

◆ isprint()

static bool isprint ( char32_t  codepoint)
static