17using namespace minidump;
30 return bytes.take_front(2);
33 return bytes.take_front(4);
36 return bytes.take_front(8);
43 llvm::MutableArrayRef<uint8_t> reg_dest =
getDestRegister(context, reg);
44 memcpy(reg_dest.data(), reg_src, reg_dest.size());
54 llvm::MutableArrayRef<uint8_t> reg_dest = bytes.take_front(8);
55 memcpy(reg_dest.data(), reg_src, reg_dest.size());
59 llvm::ArrayRef<uint8_t> source_data,
66 uint8_t *result_base = result_context_buf->GetBytes();
77 auto x86_64_Flag = MinidumpContext_x86_64_Flags::x86_64_Flag;
78 auto ControlFlag = MinidumpContext_x86_64_Flags::Control;
79 auto IntegerFlag = MinidumpContext_x86_64_Flags::Integer;
80 auto SegmentsFlag = MinidumpContext_x86_64_Flags::Segments;
81 auto LLDBSpecificFlag = MinidumpContext_x86_64_Flags::LLDBSpecific;
86 if ((context_flags & ControlFlag) == ControlFlag) {
94 if ((context_flags & SegmentsFlag) == SegmentsFlag) {
101 if ((context_flags & IntegerFlag) == IntegerFlag) {
120 if ((context_flags & LLDBSpecificFlag) == LLDBSpecificFlag) {
129 return result_context_buf;
static void writeRegister(const void *reg_src, uint8_t *context, const RegisterInfo ®)
static void writeBaseRegister(const void *reg_src, uint8_t *context, const RegisterInfo ®)
static llvm::MutableArrayRef< uint8_t > getDestRegister(uint8_t *context, const RegisterInfo ®)
A subclass of DataBuffer that stores a data buffer on the heap.
RegisterInfo interface to patch RegisterInfo structure for archs.
virtual size_t GetGPRSize() const =0
virtual const lldb_private::RegisterInfo * GetRegisterInfo() const =0
Status consumeObject(llvm::ArrayRef< uint8_t > &Buffer, const T *&Object)
MinidumpContext_x86_64_Flags
lldb::DataBufferSP ConvertMinidumpContext_x86_64(llvm::ArrayRef< uint8_t > source_data, RegisterInfoInterface *target_reg_interface)
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
@ eRegisterKindLLDB
lldb's internal register numbers
Every register is described in detail including its name, alternate name (optional),...
llvm::MutableArrayRef< uint8_t > mutable_data(uint8_t *context_base) const
uint32_t kinds[lldb::kNumRegisterKinds]
Holds all of the various register numbers for all register kinds.
llvm::support::ulittle16_t fs
llvm::support::ulittle64_t rdx
llvm::support::ulittle16_t cs
llvm::support::ulittle64_t rsp
llvm::support::ulittle16_t ss
llvm::support::ulittle64_t rbx
llvm::support::ulittle16_t ds
llvm::support::ulittle64_t gs_base
llvm::support::ulittle64_t r8
llvm::support::ulittle16_t gs
llvm::support::ulittle64_t rcx
llvm::support::ulittle64_t r10
llvm::support::ulittle64_t r15
llvm::support::ulittle64_t rbp
llvm::support::ulittle64_t r13
llvm::support::ulittle64_t r12
llvm::support::ulittle64_t rsi
llvm::support::ulittle16_t es
llvm::support::ulittle64_t rax
llvm::support::ulittle32_t context_flags
llvm::support::ulittle64_t rdi
llvm::support::ulittle64_t r14
llvm::support::ulittle32_t eflags
llvm::support::ulittle64_t r9
llvm::support::ulittle64_t fs_base
llvm::support::ulittle64_t rip
llvm::support::ulittle64_t r11