Public Types | Public Member Functions | List of all members
crashpad::ElfImageReader::NoteReader Class Reference

This class enables reading note segments from an ELF image. More...

#include "snapshot/elf/elf_image_reader.h"

Public Types

enum  Result
 The return value for NextNote(). More...
using NoteType = decltype(Elf64_Nhdr::n_type)
 A type large enough to hold a note type, potentially across bitness.

Public Member Functions

Result NextNote (std::string *name, NoteType *type, std::string *desc)
 Searches for the next note in the image. More...
 NoteReader (const ElfImageReader *elf_reader_, const ProcessMemoryRange *range, const ProgramHeaderTable *phdr_table, ssize_t max_note_size, const std::string &name_filter=std::string(), NoteType type_filter=0, bool use_filter=false)

Detailed Description

This class enables reading note segments from an ELF image.

Objects of this class should be created by calling ElfImageReader::Notes() or ElfImageReader::NotesWithNameAndType().

Member Enumeration Documentation

◆ Result

The return value for NextNote().


An error occurred. The NoteReader is invalidated and message is logged.


A note was found.


No more notes were found.

Member Function Documentation

◆ NextNote()

ElfImageReader::NoteReader::Result crashpad::ElfImageReader::NoteReader::NextNote ( std::string *  name,
NoteType type,
std::string *  desc 

Searches for the next note in the image.

[out]nameThe name of the note owner, if not nullptr.
[out]typeA type for the note, if not nullptr.
[out]descThe note descriptor.
a Result value. name, type, and desc are only valid if this method returns Result::kSuccess.

The documentation for this class was generated from the following files: