Crashpad
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
crashpad::MachOImageAnnotationsReader Class Reference

A reader for annotations stored in a Mach-O image mapped into another process. More...

#include "snapshot/mac/mach_o_image_annotations_reader.h"

Public Member Functions

 MachOImageAnnotationsReader (ProcessReaderMac *process_reader, const MachOImageReader *image_reader, const std::string &name)
 Constructs an object.
 
 MachOImageAnnotationsReader (const MachOImageAnnotationsReader &)=delete
 
MachOImageAnnotationsReaderoperator= (const MachOImageAnnotationsReader &)=delete
 
std::vector< std::string > Vector () const
 Returns the module’s annotations that are organized as a vector of strings.
 
std::map< std::string, std::string > SimpleMap () const
 Returns the module’s annotations that are organized as key-value pairs, where all keys and values are strings.
 
std::vector< AnnotationSnapshotAnnotationsList () const
 Returns the module’s annotations that are organized as a list of.
 

Detailed Description

A reader for annotations stored in a Mach-O image mapped into another process.

These annotations are stored for the benefit of crash reporters, and provide information thought to be potentially useful for crash analysis. This class can decode annotations stored in these formats:

  • CrashpadInfo. This format is used by Crashpad clients. The “simple annotations” are recovered from any module with a compatible data section, and are included in the annotations returned by SimpleMap().
  • CrashReporterClient.h’s crashreporter_annotations_t. This format is used by Apple code. The message and message2 fields can be recovered from any module with a compatible data section, and are included in the annotations returned by Vector().
  • dyld’s error_string. This format is used exclusively by dyld, typically for fatal errors. This string can be recovered from any MH_DYLINKER-type module with this symbol, and is included in the annotations returned by Vector().

Constructor & Destructor Documentation

◆ MachOImageAnnotationsReader()

crashpad::MachOImageAnnotationsReader::MachOImageAnnotationsReader ( ProcessReaderMac * process_reader,
const MachOImageReader * image_reader,
const std::string & name )

Constructs an object.

Parameters
[in]process_readerThe reader for the remote process.
[in]image_readerThe MachOImageReader for the Mach-O image file contained within the remote process.
[in]nameThe module’s name, a string to be used in logged messages. This string is for diagnostic purposes only, and may be empty.

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