<p>A <aclass="el"href="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. ">ProcessSnapshot</a> of a running (or crashed) process running on a macOS system.
<areahref="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. "alt="crashpad::ProcessSnapshot"shape="rect"coords="0,0,194,24"/>
<trclass="memdesc:a993ea0334f71e9307a90ad0c8f039562"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initializes the object. <ahref="#a993ea0334f71e9307a90ad0c8f039562">More...</a><br/></td></tr>
<trclass="memdesc:a04cd6cffa584737b1d04c13f348f7cac"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initializes the object’s exception. <ahref="#a04cd6cffa584737b1d04c13f348f7cac">More...</a><br/></td></tr>
<trclass="memdesc:ae1032ac97f09d9d9fa1d4e1a358673c3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the value to be returned by <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#a0fd584f7a00e5f027bfba24cf5cc9d3b"title="Returns a UUID identifying the event that the snapshot describes. ">ReportID()</a>. <ahref="#ae1032ac97f09d9d9fa1d4e1a358673c3">More...</a><br/></td></tr>
<trclass="memdesc:a10f23133c18ef8f5c76fd7b99e27380c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the value to be returned by <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#a4b42dff07349188a382157c8d0c9ce88"title="Returns a UUID identifying the client that the snapshot represents. ">ClientID()</a>. <ahref="#a10f23133c18ef8f5c76fd7b99e27380c">More...</a><br/></td></tr>
<trclass="memdesc:a3cb467775f524222d2405002bf9c29f1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Sets the value to be returned by <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#af72102fe9d035c165a971f76ed9967dd"title="Returns key-value string annotations recorded for the process, system, or snapshot producer...">AnnotationsSimpleMap()</a>. <ahref="#a3cb467775f524222d2405002bf9c29f1">More...</a><br/></td></tr>
<trclass="memdesc:a184d098c74cbc4b476a33005848b5f2e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns options from <aclass="el"href="structcrashpad_1_1CrashpadInfo.html"title="A structure that can be used by a Crashpad-enabled program to provide information to the Crashpad cra...">CrashpadInfo</a> structures found in modules in the process. <ahref="#a184d098c74cbc4b476a33005848b5f2e">More...</a><br/></td></tr>
<trclass="memdesc:a7110eb22b9635a72ffc8f3d07e3d7c66"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the snapshot process’ process ID. <br/></td></tr>
<trclass="memdesc:a9902e6bb3f87c4e514885cafec8d54da"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the snapshot process’ parent process’ process ID. <br/></td></tr>
<trclass="memdesc:a8f1dae20abda51a69fa9fb0b2704f638"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the time that the snapshot was taken in <em>snapshot_time</em>. <ahref="#a8f1dae20abda51a69fa9fb0b2704f638">More...</a><br/></td></tr>
<trclass="memdesc:ac319ebbd8ec9b81c3861c70afe9403d1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the time that the snapshot process was started in <em>start_time</em>. <ahref="#ac319ebbd8ec9b81c3861c70afe9403d1">More...</a><br/></td></tr>
<trclass="memdesc:aa692352db6f4dec570dd9294e5204e78"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the snapshot process’ CPU usage times in <em>user_time</em> and <em>system_time</em>. <ahref="#aa692352db6f4dec570dd9294e5204e78">More...</a><br/></td></tr>
<trclass="memdesc:a0fd584f7a00e5f027bfba24cf5cc9d3b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a UUID identifying the event that the snapshot describes. <ahref="#a0fd584f7a00e5f027bfba24cf5cc9d3b">More...</a><br/></td></tr>
<trclass="memdesc:a4b42dff07349188a382157c8d0c9ce88"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a UUID identifying the client that the snapshot represents. <ahref="#a4b42dff07349188a382157c8d0c9ce88">More...</a><br/></td></tr>
<trclass="memdesc:af72102fe9d035c165a971f76ed9967dd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns key-value string annotations recorded for the process, system, or snapshot producer. <ahref="#af72102fe9d035c165a971f76ed9967dd">More...</a><br/></td></tr>
<trclass="memdesc:ae64058411487e5dd08469382424a24c5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a <aclass="el"href="classcrashpad_1_1SystemSnapshot.html"title="An abstract interface to a snapshot representing the state of a system, comprising an operating syste...">SystemSnapshot</a> reflecting the characteristics of the system that ran the snapshot process at the time of the snapshot. <ahref="#ae64058411487e5dd08469382424a24c5">More...</a><br/></td></tr>
<trclass="memdesc:a195ed470a23bf6959f63734b8b5ebe13"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns <aclass="el"href="classcrashpad_1_1ThreadSnapshot.html"title="An abstract interface to a snapshot representing a thread (lightweight process) present in a snapshot...">ThreadSnapshot</a> objects reflecting the threads (lightweight processes) existing in the snapshot process at the time of the snapshot. <ahref="#a195ed470a23bf6959f63734b8b5ebe13">More...</a><br/></td></tr>
<trclass="memdesc:a1d75af2f52a59b61569916c968e33612"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns <aclass="el"href="classcrashpad_1_1ModuleSnapshot.html"title="An abstract interface to a snapshot representing a code module (binary image) loaded into a snapshot ...">ModuleSnapshot</a> objects reflecting the code modules (binary images) loaded into the snapshot process at the time of the snapshot. <ahref="#a1d75af2f52a59b61569916c968e33612">More...</a><br/></td></tr>
<trclass="memdesc:a8a6970f730724da7be4c348036d9504b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns <aclass="el"href="classcrashpad_1_1UnloadedModuleSnapshot.html"title="Information about an unloaded module that was previously loaded into a snapshot process. ">UnloadedModuleSnapshot</a> objects reflecting the code modules the were recorded as unloaded at the time of the snapshot. <ahref="#a8a6970f730724da7be4c348036d9504b">More...</a><br/></td></tr>
<trclass="memdesc:a6a889e857ccd0e06ae1279c9ca708c50"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns an <aclass="el"href="classcrashpad_1_1ExceptionSnapshot.html"title="An abstract interface to a snapshot representing an exception that a snapshot process sustained and t...">ExceptionSnapshot</a> reflecting the exception that the snapshot process sustained to trigger the snapshot being taken. <ahref="#a6a889e857ccd0e06ae1279c9ca708c50">More...</a><br/></td></tr>
<trclass="memdesc:a8ff52c675c63d41cdf2f7663bfbbc260"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns <aclass="el"href="classcrashpad_1_1MemoryMapRegionSnapshot.html"title="An abstract interface to a snapshot representing a region of the memory map present in the snapshot p...">MemoryMapRegionSnapshot</a> objects reflecting the regions of the memory map in the snapshot process at the time of the snapshot. <ahref="#a8ff52c675c63d41cdf2f7663bfbbc260">More...</a><br/></td></tr>
<trclass="memdesc:a8d048338b40bb2f2666662babd085f88"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns <aclass="el"href="structcrashpad_1_1HandleSnapshot.html">HandleSnapshot</a> objects reflecting the open handles in the snapshot process at the time of the snapshot. <ahref="#a8d048338b40bb2f2666662babd085f88">More...</a><br/></td></tr>
<trclass="memdesc:a9efeb7691b5e87da2e05f8338b3001b9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a vector of additional memory blocks that should be included in a minidump. <ahref="#a9efeb7691b5e87da2e05f8338b3001b9">More...</a><br/></td></tr>
<divclass="textblock"><p>A <aclass="el"href="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. ">ProcessSnapshot</a> of a running (or crashed) process running on a macOS system. </p>
<p>Returns key-value string annotations recorded for the process, system, or snapshot producer. </p>
<p>This method retrieves annotations recorded for a process. These annotations are intended for diagnostic use, including crash analysis. “Simple annotations” are structured as a sequence of key-value pairs, where all keys and values are strings. These are referred to in Chrome as “crash keys.”</p>
<p>Annotations stored here may reflect the process, system, or snapshot producer. Most annotations not under the client’s direct control will be retrievable by this method. For clients such as Chrome, this includes the product name and version.</p>
<p>Additional per-module annotations may be obtained by calling <aclass="el"href="classcrashpad_1_1ModuleSnapshot.html#a4d1328fda3e91a4c25369b5fcc4cf2f6"title="Returns key-value string annotations recorded in the module. ">ModuleSnapshot::AnnotationsSimpleMap()</a>. </p>
<p>Returns a UUID identifying the client that the snapshot represents. </p>
<p>Client identification is within the scope of the application, but it is expected that the identifier will be unique for an instance of Crashpad monitoring an application or set of applications for a user. The identifier shall remain stable over time.</p>
<p>If no identifier is available, this field will contain zeroes. </p>
<p>Returns an <aclass="el"href="classcrashpad_1_1ExceptionSnapshot.html"title="An abstract interface to a snapshot representing an exception that a snapshot process sustained and t...">ExceptionSnapshot</a> reflecting the exception that the snapshot process sustained to trigger the snapshot being taken. </p>
<dlclass="section return"><dt>Returns</dt><dd>An <aclass="el"href="classcrashpad_1_1ExceptionSnapshot.html"title="An abstract interface to a snapshot representing an exception that a snapshot process sustained and t...">ExceptionSnapshot</a> object. The caller does not take ownership of this object, it is scoped to the lifetime of the <aclass="el"href="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. ">ProcessSnapshot</a> object that it was obtained from. If the snapshot is not a result of an exception, returns <code>nullptr</code>. </dd></dl>
<p>Returns a vector of additional memory blocks that should be included in a minidump. </p>
<dlclass="section return"><dt>Returns</dt><dd>An vector of <aclass="el"href="classcrashpad_1_1MemorySnapshot.html"title="An abstract interface to a snapshot representing a region of memory present in a snapshot process...">MemorySnapshot</a> objects that will be included in the crash dump. The caller does not take ownership of these objects, they are scoped to the lifetime of the <aclass="el"href="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. ">ProcessSnapshot</a> object that they were obtained from. </dd></dl>
<p>Returns options from <aclass="el"href="structcrashpad_1_1CrashpadInfo.html"title="A structure that can be used by a Crashpad-enabled program to provide information to the Crashpad cra...">CrashpadInfo</a> structures found in modules in the process. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">options</td><td>Options set in <aclass="el"href="structcrashpad_1_1CrashpadInfo.html"title="A structure that can be used by a Crashpad-enabled program to provide information to the Crashpad cra...">CrashpadInfo</a> structures in modules in the process. </td></tr>
<p>Returns <aclass="el"href="structcrashpad_1_1HandleSnapshot.html">HandleSnapshot</a> objects reflecting the open handles in the snapshot process at the time of the snapshot. </p>
<dlclass="section return"><dt>Returns</dt><dd>A vector of <aclass="el"href="structcrashpad_1_1HandleSnapshot.html">HandleSnapshot</a> objects. </dd></dl>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">task</td><td>The task to create a snapshot from.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><code>true</code> if the snapshot could be created, <code>false</code> otherwise with an appropriate message logged. </dd></dl>
<p>This populates the data to be returned by <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#a6a889e857ccd0e06ae1279c9ca708c50"title="Returns an ExceptionSnapshot reflecting the exception that the snapshot process sustained to trigger ...">Exception()</a>. The parameters may be passed directly through from a Mach exception handler.</p>
<p>This method must not be called until after a successful call to <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#a993ea0334f71e9307a90ad0c8f039562"title="Initializes the object. ">Initialize()</a>.</p>
<dlclass="section return"><dt>Returns</dt><dd><code>true</code> if the exception information could be initialized, <code>false</code> otherwise with an appropriate message logged. When this method returns <code>false</code>, the <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html"title="A ProcessSnapshot of a running (or crashed) process running on a macOS system. ">ProcessSnapshotMac</a> object’s validity remains unchanged. </dd></dl>
<p>Returns <aclass="el"href="classcrashpad_1_1MemoryMapRegionSnapshot.html"title="An abstract interface to a snapshot representing a region of the memory map present in the snapshot p...">MemoryMapRegionSnapshot</a> objects reflecting the regions of the memory map in the snapshot process at the time of the snapshot. </p>
<dlclass="section return"><dt>Returns</dt><dd>A vector of <aclass="el"href="classcrashpad_1_1MemoryMapRegionSnapshot.html"title="An abstract interface to a snapshot representing a region of the memory map present in the snapshot p...">MemoryMapRegionSnapshot</a> objects. The caller does not take ownership of these objects, they are scoped to the lifetime of the <aclass="el"href="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. ">ProcessSnapshot</a> object that they were obtained from. </dd></dl>
<p>Returns <aclass="el"href="classcrashpad_1_1ModuleSnapshot.html"title="An abstract interface to a snapshot representing a code module (binary image) loaded into a snapshot ...">ModuleSnapshot</a> objects reflecting the code modules (binary images) loaded into the snapshot process at the time of the snapshot. </p>
<dlclass="section return"><dt>Returns</dt><dd>A vector of <aclass="el"href="classcrashpad_1_1ModuleSnapshot.html"title="An abstract interface to a snapshot representing a code module (binary image) loaded into a snapshot ...">ModuleSnapshot</a> objects. The caller does not take ownership of these objects, they are scoped to the lifetime of the <aclass="el"href="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. ">ProcessSnapshot</a> object that they were obtained from. </dd></dl>
<p>Returns the snapshot process’ CPU usage times in <em>user_time</em> and <em>system_time</em>. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">user_time</td><td>The time that the process has spent executing in user mode. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">system_time</td><td>The time that the process has spent executing in system (kernel) mode. </td></tr>
<p>Normally, process uptime in wall clock time can be computed as <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#a8f1dae20abda51a69fa9fb0b2704f638"title="Returns the time that the snapshot was taken in snapshot_time. ">SnapshotTime()</a>−<aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#ac319ebbd8ec9b81c3861c70afe9403d1"title="Returns the time that the snapshot process was started in start_time. ">ProcessStartTime()</a>, but this cannot be guaranteed in cases where the real-time clock has been set during the snapshot process’ lifetime.</p>
<p>Returns a UUID identifying the event that the snapshot describes. </p>
<p>This provides a stable identifier for a crash even as the report is converted to different formats, provided that all formats support storing a crash report ID. When a report is originally created, a report ID should be assigned. From that point on, any operations involving the same report should preserve the same report ID.</p>
<p>If no identifier is available, this field will contain zeroes. </p>
<p>Sets the value to be returned by <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#af72102fe9d035c165a971f76ed9967dd"title="Returns key-value string annotations recorded for the process, system, or snapshot producer...">AnnotationsSimpleMap()</a>. </p>
<p>On macOS, all process annotations are under the control of the snapshot producer, which may call this method to establish these annotations. Contrast this with module annotations, which are under the control of the process being snapshotted. </p>
<p>Sets the value to be returned by <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#a4b42dff07349188a382157c8d0c9ce88"title="Returns a UUID identifying the client that the snapshot represents. ">ClientID()</a>. </p>
<p>On macOS, the client ID is under the control of the snapshot producer, which may call this method to set the client ID. If this is not done, <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#a4b42dff07349188a382157c8d0c9ce88"title="Returns a UUID identifying the client that the snapshot represents. ">ClientID()</a> will return an identifier consisting entirely of zeroes. </p>
<p>Sets the value to be returned by <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#a0fd584f7a00e5f027bfba24cf5cc9d3b"title="Returns a UUID identifying the event that the snapshot describes. ">ReportID()</a>. </p>
<p>On macOS, the crash report ID is under the control of the snapshot producer, which may call this method to set the report ID. If this is not done, <aclass="el"href="classcrashpad_1_1ProcessSnapshotMac.html#a0fd584f7a00e5f027bfba24cf5cc9d3b"title="Returns a UUID identifying the event that the snapshot describes. ">ReportID()</a> will return an identifier consisting entirely of zeroes. </p>
<p>Returns the time that the snapshot was taken in <em>snapshot_time</em>. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">snapshot_time</td><td>The time that the snapshot was taken. This is distinct from the time that a <aclass="el"href="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. ">ProcessSnapshot</a> object was created or initialized, although it may be that time for <aclass="el"href="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. ">ProcessSnapshot</a> objects representing live or recently-crashed process state. </td></tr>
<p>Returns a <aclass="el"href="classcrashpad_1_1SystemSnapshot.html"title="An abstract interface to a snapshot representing the state of a system, comprising an operating syste...">SystemSnapshot</a> reflecting the characteristics of the system that ran the snapshot process at the time of the snapshot. </p>
<dlclass="section return"><dt>Returns</dt><dd>A <aclass="el"href="classcrashpad_1_1SystemSnapshot.html"title="An abstract interface to a snapshot representing the state of a system, comprising an operating syste...">SystemSnapshot</a> object. The caller does not take ownership of this object, it is scoped to the lifetime of the <aclass="el"href="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. ">ProcessSnapshot</a> object that it was obtained from. </dd></dl>
<p>Returns <aclass="el"href="classcrashpad_1_1ThreadSnapshot.html"title="An abstract interface to a snapshot representing a thread (lightweight process) present in a snapshot...">ThreadSnapshot</a> objects reflecting the threads (lightweight processes) existing in the snapshot process at the time of the snapshot. </p>
<dlclass="section return"><dt>Returns</dt><dd>A vector of <aclass="el"href="classcrashpad_1_1ThreadSnapshot.html"title="An abstract interface to a snapshot representing a thread (lightweight process) present in a snapshot...">ThreadSnapshot</a> objects. The caller does not take ownership of these objects, they are scoped to the lifetime of the <aclass="el"href="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. ">ProcessSnapshot</a> object that they were obtained from. </dd></dl>
<p>Returns <aclass="el"href="classcrashpad_1_1UnloadedModuleSnapshot.html"title="Information about an unloaded module that was previously loaded into a snapshot process. ">UnloadedModuleSnapshot</a> objects reflecting the code modules the were recorded as unloaded at the time of the snapshot. </p>
<dlclass="section return"><dt>Returns</dt><dd>A vector of <aclass="el"href="classcrashpad_1_1UnloadedModuleSnapshot.html"title="Information about an unloaded module that was previously loaded into a snapshot process. ">UnloadedModuleSnapshot</a> objects. </dd></dl>