#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/debug/buffered_dwarf_reader.h"
#ifdef USE_SYMBOLIZE
#include <algorithm>
#include <cstring>
#include "base/numerics/safe_conversions.h"
#include "base/third_party/symbolize/symbolize.h"
namespace base::debug {
BufferedDwarfReader::BufferedDwarfReader(int fd, uint64_t position)
: … { … }
size_t BufferedDwarfReader::ReadCString(uint64_t max_position,
char* out,
size_t out_size) { … }
bool BufferedDwarfReader::ReadLeb128(uint64_t& value) { … }
bool BufferedDwarfReader::ReadLeb128(int64_t& value) { … }
bool BufferedDwarfReader::ReadInitialLength(bool& is_64bit, uint64_t& length) { … }
bool BufferedDwarfReader::ReadOffset(bool is_64bit, uint64_t& offset) { … }
bool BufferedDwarfReader::ReadAddress(uint8_t address_size, uint64_t& address) { … }
bool BufferedDwarfReader::ReadCommonHeader(bool& is_64bit,
uint64_t& length,
uint16_t& version,
uint64_t& offset,
uint8_t& address_size,
uint64_t& end_position) { … }
bool BufferedDwarfReader::BufferedRead(void* out, const size_t bytes) { … }
}
#endif