LLDB  mainline
Macros | Functions
DumpDataExtractor.cpp File Reference
#include "lldb/Core/DumpDataExtractor.h"
#include "lldb/lldb-defines.h"
#include "lldb/lldb-forward.h"
#include "lldb/Core/Address.h"
#include "lldb/Core/Disassembler.h"
#include "lldb/Core/ModuleList.h"
#include "lldb/Target/ABI.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/ExecutionContextScope.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/DataExtractor.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/Stream.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallVector.h"
#include <limits>
#include <memory>
#include <string>
#include <cassert>
#include <cctype>
#include <cinttypes>
#include <cmath>
#include <bitset>
#include <sstream>
Include dependency graph for DumpDataExtractor.cpp:

Go to the source code of this file.

Macros

#define NON_PRINTABLE_CHAR   '.'
 

Functions

static float half2float (uint16_t half)
 
static llvm::Optional< llvm::APInt > GetAPInt (const DataExtractor &data, lldb::offset_t *offset_ptr, lldb::offset_t byte_size)
 
static lldb::offset_t DumpAPInt (Stream *s, const DataExtractor &data, lldb::offset_t offset, lldb::offset_t byte_size, bool is_signed, unsigned radix)
 
static lldb::offset_t DumpInstructions (const DataExtractor &DE, Stream *s, ExecutionContextScope *exe_scope, offset_t start_offset, uint64_t base_addr, size_t number_of_instructions)
 Dumps decoded instructions to a stream. More...
 
static bool TryDumpSpecialEscapedChar (Stream &s, const char c)
 Prints the specific escape sequence of the given character to the stream. More...
 
static void DumpCharacter (Stream &s, const char c)
 Dump the character to a stream. More...
 
template<typename FloatT >
void DumpFloatingPoint (std::ostringstream &ss, FloatT f)
 Dump a floating point type. More...
 

Macro Definition Documentation

◆ NON_PRINTABLE_CHAR

#define NON_PRINTABLE_CHAR   '.'

Definition at line 48 of file DumpDataExtractor.cpp.

Function Documentation

◆ DumpAPInt()

static lldb::offset_t DumpAPInt ( Stream s,
const DataExtractor data,
lldb::offset_t  offset,
lldb::offset_t  byte_size,
bool  is_signed,
unsigned  radix 
)
static

◆ DumpCharacter()

static void DumpCharacter ( Stream s,
const char  c 
)
static

Dump the character to a stream.

A character that is not printable will be represented by its escape sequence.

Definition at line 223 of file DumpDataExtractor.cpp.

References lldb_private::Stream::Printf(), lldb_private::Stream::PutChar(), and TryDumpSpecialEscapedChar().

Referenced by lldb_private::DumpDataExtractor().

◆ DumpFloatingPoint()

template<typename FloatT >
void DumpFloatingPoint ( std::ostringstream &  ss,
FloatT  f 
)

Dump a floating point type.

Definition at line 235 of file DumpDataExtractor.cpp.

Referenced by lldb_private::DumpDataExtractor().

◆ DumpInstructions()

static lldb::offset_t DumpInstructions ( const DataExtractor DE,
Stream s,
ExecutionContextScope exe_scope,
offset_t  start_offset,
uint64_t  base_addr,
size_t  number_of_instructions 
)
static

◆ GetAPInt()

static llvm::Optional<llvm::APInt> GetAPInt ( const DataExtractor data,
lldb::offset_t offset_ptr,
lldb::offset_t  byte_size 
)
static

◆ half2float()

static float half2float ( uint16_t  half)
static

Definition at line 50 of file DumpDataExtractor.cpp.

Referenced by lldb_private::DumpDataExtractor().

◆ TryDumpSpecialEscapedChar()

static bool TryDumpSpecialEscapedChar ( Stream s,
const char  c 
)
static

Prints the specific escape sequence of the given character to the stream.

If the character doesn't have a known specific escape sequence (e.g., '', '
' but not generic escape sequences such as'\x12'), this function will not modify the stream and return false.

Definition at line 186 of file DumpDataExtractor.cpp.

References lldb_private::Stream::Printf().

Referenced by DumpCharacter(), and lldb_private::DumpDataExtractor().