Crashpad
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, VMAddress *desc_addr)
 Searches for the next note in the image. More...
 
 NoteReader (const ElfImageReader *elf_reader_, const ProcessMemoryRange *range, const ProgramHeaderTable *phdr_table, size_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().

Enumerator
kError 

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

kSuccess 

A note was found.

kNoMoreNotes 

No more notes were found.

Member Function Documentation

◆ NextNote()

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

Searches for the next note in the image.

Parameters
[out]nameThe name of the note owner, if not nullptr.
[out]typeA type for the note, if not nullptr.
[out]descThe note descriptor.
[out]desc_addrThe address in the remote process' address space desc was read from.
Returns
a Result value. name, type, desc, and desc_addr are only valid if this method returns Result::kSuccess.

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