#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/MemoryRegionInfo.h"
#include "lldb/Target/MemoryTagManager.h"
#include "lldb/Target/MemoryTagMap.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/SmallVector.h"
#include <limits>
#include <memory>
#include <string>
#include <cassert>
#include <cctype>
#include <cinttypes>
#include <cmath>
#include <bitset>
#include <optional>
#include <sstream>
usingnamespacelldb_private;
usingnamespacelldb;
#define NON_PRINTABLE_CHAR …
static std::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) { … }
static bool TryDumpSpecialEscapedChar(Stream &s, const char c) { … }
static void DumpCharacter(Stream &s, const char c) { … }
template <typename FloatT>
void DumpFloatingPoint(std::ostringstream &ss, FloatT f) { … }
static std::optional<MemoryTagMap>
GetMemoryTags(lldb::addr_t addr, size_t length,
ExecutionContextScope *exe_scope) { … }
static void printMemoryTags(const DataExtractor &DE, Stream *s,
lldb::addr_t addr, size_t len,
const std::optional<MemoryTagMap> &memory_tag_map) { … }
static const llvm::fltSemantics &GetFloatSemantics(const TargetSP &target_sp,
size_t byte_size) { … }
lldb::offset_t lldb_private::DumpDataExtractor(
const DataExtractor &DE, Stream *s, offset_t start_offset,
lldb::Format item_format, size_t item_byte_size, size_t item_count,
size_t num_per_line, uint64_t base_addr,
uint32_t item_bit_size,
uint32_t item_bit_offset,
ExecutionContextScope *exe_scope, bool show_memory_tags) { … }
void lldb_private::DumpHexBytes(Stream *s, const void *src, size_t src_len,
uint32_t bytes_per_line,
lldb::addr_t base_addr) { … }