#include "snapshot/crashpad_types/image_annotation_reader.h"
#include <string.h>
#include <sys/types.h>
#include <algorithm>
#include <utility>
#include "base/logging.h"
#include "build/build_config.h"
#include "client/annotation.h"
#include "client/annotation_list.h"
#include "client/simple_string_dictionary.h"
#include "snapshot/snapshot_constants.h"
#if BUILDFLAG(IS_FUCHSIA)
#include "util/fuchsia/traits.h"
#else
#include "util/linux/traits.h"
#endif
namespace crashpad {
namespace process_types {
template <class Traits>
struct Annotation { … };
template <class Traits>
struct AnnotationList { … };
}
#if defined(ARCH_CPU_64_BITS)
#define NATIVE_TRAITS …
#else
#define NATIVE_TRAITS …
#endif
static_assert …;
static_assert …;
#undef NATIVE_TRAITS
ImageAnnotationReader::ImageAnnotationReader(const ProcessMemoryRange* memory)
: … { … }
ImageAnnotationReader::~ImageAnnotationReader() = default;
bool ImageAnnotationReader::SimpleMap(
VMAddress address,
std::map<std::string, std::string>* annotations) const { … }
bool ImageAnnotationReader::AnnotationsList(
VMAddress address,
std::vector<AnnotationSnapshot>* annotations) const { … }
template <class Traits>
bool ImageAnnotationReader::ReadAnnotationList(
VMAddress address,
std::vector<AnnotationSnapshot>* annotations) const { … }
}