<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a child process for testing. Uses gtest <code>ASSERT_*</code> to indicate failure. The child's output is passed through a pipe and is available via <aclass="el"href="classcrashpad_1_1test_1_1ChildLauncher.html#a3ed4b8859fa32e8f772e50afc19163ee"title="The read end of a pipe attached to the child's stdout. ">stdout_read_handle()</a>, and the child's input is attached to a second pipe available via <aclass="el"href="classcrashpad_1_1test_1_1ChildLauncher.html#afe9c94037f079ad475e6b0aab992c21f"title="The write end of a pipe attached to the child's stdin. ">stdin_write_handle()</a>. <ahref="classcrashpad_1_1test_1_1ChildLauncher.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A traits class defining whether a minidump object type is required to appear only as a fixed-size object or if it is variable-sized. <ahref="structcrashpad_1_1test_1_1MinidumpWritableTraits.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Manages a multiprocess test. <ahref="classcrashpad_1_1test_1_1Multiprocess.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Functions to obtain paths from within tests. <ahref="classcrashpad_1_1test_1_1Paths.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A RAII object that creates a temporary directory for testing. <ahref="classcrashpad_1_1test_1_1ScopedTempDir.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A test <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> that can carry arbitrary data for testing purposes. <ahref="classcrashpad_1_1test_1_1TestExceptionSnapshot.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A test <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> that can carry arbitrary data for testing purposes. <ahref="classcrashpad_1_1test_1_1TestMemoryMapRegionSnapshot.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A test <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> that can carry arbitrary data for testing purposes. <ahref="classcrashpad_1_1test_1_1TestMemorySnapshot.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A <aclass="el"href="classcrashpad_1_1SnapshotMinidumpMemoryWriter.html"title="The base class for writers of memory ranges pointed to by MINIDUMP_MEMORY_DESCRIPTOR objects in a min...">SnapshotMinidumpMemoryWriter</a> implementation used for testing. <ahref="classcrashpad_1_1test_1_1TestMinidumpMemoryWriter.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A test <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> that can carry arbitrary data for testing purposes. <ahref="classcrashpad_1_1test_1_1TestModuleSnapshot.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A test <aclass="el"href="classcrashpad_1_1ProcessSnapshot.html"title="An abstract interface to a snapshot representing the state of a process. ">ProcessSnapshot</a> that can carry arbitrary data for testing purposes. <ahref="classcrashpad_1_1test_1_1TestProcessSnapshot.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A test <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> that can carry arbitrary data for testing purposes. <ahref="classcrashpad_1_1test_1_1TestSystemSnapshot.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A test <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> that can carry arbitrary data for testing purposes. <ahref="classcrashpad_1_1test_1_1TestThreadSnapshot.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">An <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html"title="The base class for all content that might be written to a minidump file. ">internal::MinidumpWritable</a> that carries a <code>uint32_t</code> for testing. <ahref="classcrashpad_1_1test_1_1TestUInt32MinidumpWritable.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Facilitates the launching of child processes from unit tests. <ahref="classcrashpad_1_1test_1_1WinChildProcess.html#details">More...</a><br/></td></tr>
<trclass="memdesc:"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Manages a multiprocess test on Windows. <ahref="classcrashpad_1_1test_1_1WinMultiprocess.html#details">More...</a><br/></td></tr>
<trclass="memdesc:a68bb97f184e9e5a41356a960fdaf3320"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <aclass="el"href="structMINIDUMP__HEADER.html"title="The top-level structure identifying a minidump file. ">MINIDUMP_HEADER</a> at the start of a minidump file, along with the <aclass="el"href="structMINIDUMP__DIRECTORY.html"title="A pointer to a stream within a minidump file. ">MINIDUMP_DIRECTORY</a> it references. <ahref="#a68bb97f184e9e5a41356a960fdaf3320">More...</a><br/></td></tr>
<trclass="memdesc:a5e604ee6a23070a89e2a0015eb2854a9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Verifies, via gtest assertions, that a <aclass="el"href="structMINIDUMP__HEADER.html"title="The top-level structure identifying a minidump file. ">MINIDUMP_HEADER</a> contains expected values. <ahref="#a5e604ee6a23070a89e2a0015eb2854a9">More...</a><br/></td></tr>
<trclass="memdesc:a5d907f190db31282e6c8a08df38f7f3f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Verifies, via gtest assertions, that a <aclass="el"href="structMINIDUMP__MEMORY__DESCRIPTOR.html"title="A pointer to a snapshot of a region of memory contained within a minidump file. ">MINIDUMP_MEMORY_DESCRIPTOR</a> structure contains expected values. <ahref="#a5d907f190db31282e6c8a08df38f7f3f">More...</a><br/></td></tr>
<trclass="memdesc:a7bcb7b725b62a0058c18e0851a1adf5c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Verifies, via gtest assertions, that a <aclass="el"href="structMINIDUMP__MEMORY__DESCRIPTOR.html"title="A pointer to a snapshot of a region of memory contained within a minidump file. ">MINIDUMP_MEMORY_DESCRIPTOR</a> structure contains expected values, and that the memory region it points to contains expected values assuming it was written by a <aclass="el"href="classcrashpad_1_1test_1_1TestMinidumpMemoryWriter.html"title="A SnapshotMinidumpMemoryWriter implementation used for testing. ">TestMinidumpMemoryWriter</a> object. <ahref="#a7bcb7b725b62a0058c18e0851a1adf5c">More...</a><br/></td></tr>
<trclass="memdesc:a1a3936c22f43c2defcaa16e7c09ce544"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the <aclass="el"href="structcrashpad_1_1MinidumpRVAList.html"title="A list of RVA pointers. ">MinidumpRVAList</a> at the start of a minidump file. <ahref="#a1a3936c22f43c2defcaa16e7c09ce544">More...</a><br/></td></tr>
<trclass="memdesc:a527731a826e40dd36ac112e7cd3dfcd2"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a <aclass="el"href="structMINIDUMP__STRING.html"title="A variable-length UTF-16-encoded string carried within a minidump file. ">MINIDUMP_STRING</a> located within a minidump file’s contents. <ahref="#a527731a826e40dd36ac112e7cd3dfcd2">More...</a><br/></td></tr>
<trclass="memdesc:a9f5bbb381b32ca4c5276a5aacbef1c5f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a <aclass="el"href="structcrashpad_1_1MinidumpUTF8String.html"title="A variable-length UTF-8-encoded string carried within a minidump file. ">MinidumpUTF8String</a> located within a minidump file’s contents. <ahref="#a9f5bbb381b32ca4c5276a5aacbef1c5f">More...</a><br/></td></tr>
<trclass="memdesc:a2276ff84807d40b2fc4f7fd2ccc8b743"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the contents of a <aclass="el"href="structMINIDUMP__STRING.html"title="A variable-length UTF-16-encoded string carried within a minidump file. ">MINIDUMP_STRING</a> as a <code>string16</code>. <ahref="#a2276ff84807d40b2fc4f7fd2ccc8b743">More...</a><br/></td></tr>
<trclass="memdesc:a4d8f1de3f021881b6464a1fedbddf956"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the contents of a <aclass="el"href="structcrashpad_1_1MinidumpUTF8String.html"title="A variable-length UTF-8-encoded string carried within a minidump file. ">MinidumpUTF8String</a> as a <code>std::string</code>. <ahref="#a4d8f1de3f021881b6464a1fedbddf956">More...</a><br/></td></tr>
<trclass="memdesc:a5cbb750966dcd4d580ba9eeb51a45fc6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns an untyped minidump object located within a minidump file’s contents, where the offset and size of the object are known. <ahref="#a5cbb750966dcd4d580ba9eeb51a45fc6">More...</a><br/></td></tr>
<trclass="memitem:abda65d4c6e9c710f32fcbd9af6a03357"><tdclass="memTemplParams"colspan="2">template<typename T ></td></tr>
<trclass="memitem:abda65d4c6e9c710f32fcbd9af6a03357"><tdclass="memTemplItemLeft"align="right"valign="top">const T * </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="namespacecrashpad_1_1test.html#abda65d4c6e9c710f32fcbd9af6a03357">TMinidumpWritableAtLocationDescriptor</a> (const std::string &file_contents, const <aclass="el"href="structMINIDUMP__LOCATION__DESCRIPTOR.html">MINIDUMP_LOCATION_DESCRIPTOR</a>&location)</td></tr>
<trclass="memdesc:abda65d4c6e9c710f32fcbd9af6a03357"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a typed minidump object located within a minidump file’s contents, where the offset and size of the object are known. <ahref="#abda65d4c6e9c710f32fcbd9af6a03357">More...</a><br/></td></tr>
<trclass="memitem:a0e98915fad73c8628924c3a900732fc0"><tdclass="memTemplParams"colspan="2">template<typename T ></td></tr>
<trclass="memitem:a0e98915fad73c8628924c3a900732fc0"><tdclass="memTemplItemLeft"align="right"valign="top">const T * </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="namespacecrashpad_1_1test.html#a0e98915fad73c8628924c3a900732fc0">MinidumpWritableAtLocationDescriptor</a> (const std::string &file_contents, const <aclass="el"href="structMINIDUMP__LOCATION__DESCRIPTOR.html">MINIDUMP_LOCATION_DESCRIPTOR</a>&location)</td></tr>
<trclass="memdesc:a0e98915fad73c8628924c3a900732fc0"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a typed minidump object located within a minidump file’s contents, where the offset and size of the object are known. <ahref="#a0e98915fad73c8628924c3a900732fc0">More...</a><br/></td></tr>
<trclass="memitem:a5b3e635fd21c8c642d41ceb2072e7d08"><tdclass="memTemplParams"colspan="2">template<typename T ></td></tr>
<trclass="memitem:a5b3e635fd21c8c642d41ceb2072e7d08"><tdclass="memTemplItemLeft"align="right"valign="top">const T * </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="namespacecrashpad_1_1test.html#a5b3e635fd21c8c642d41ceb2072e7d08">MinidumpWritableAtRVA</a> (const std::string &file_contents, <aclass="el"href="dbghelp_8h.html#acf465a1a77ecf067a9d946583bc6a3f8">RVA</a> rva)</td></tr>
<trclass="memdesc:a5b3e635fd21c8c642d41ceb2072e7d08"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a typed minidump object located within a minidump file’s contents, where the offset of the object is known. <ahref="#a5b3e635fd21c8c642d41ceb2072e7d08">More...</a><br/></td></tr>
<trclass="memdesc:ad9504862c089964763d7d362572c2ac6"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Formats an error message using an <code>errno</code> value. <ahref="#ad9504862c089964763d7d362572c2ac6">More...</a><br/></td></tr>
<trclass="memdesc:a8d8e66fbc47a4f22a03710797f226238"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Formats an error message using <code>errno</code>. <ahref="#a8d8e66fbc47a4f22a03710797f226238">More...</a><br/></td></tr>
<trclass="memdesc:a2d079e80aa56bc0840f1c0b944e01bfb"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Formats an error message using <code>GetLastError()</code>. <ahref="#a2d079e80aa56bc0840f1c0b944e01bfb">More...</a><br/></td></tr>
<trclass="memdesc:a897d99ec1dd2c343d29a3d14e3560732"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Determines the size of a file. <ahref="#a897d99ec1dd2c343d29a3d14e3560732">More...</a><br/></td></tr>
<trclass="memdesc:aaa4835fcb6a4a897b0841b8575789b77"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a hexadecimal string corresponding to <em>bytes</em> and <em>length</em>. <ahref="#aaa4835fcb6a4a897b0841b8575789b77">More...</a><br/></td></tr>
<trclass="memdesc:a35412b33d0a275fa43e8633296059534"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Reads a <aclass="el"href="classcrashpad_1_1HTTPBodyStream.html"title="An interface to a stream that can be used for an HTTP request body. ">HTTPBodyStream</a> to a string. If an error occurs, adds a test failure and returns an empty string. <ahref="#a35412b33d0a275fa43e8633296059534">More...</a><br/></td></tr>
<trclass="memdesc:a861ba97c72a60c7e1802c39395d1d1fe"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Reads a <aclass="el"href="classcrashpad_1_1HTTPBodyStream.html"title="An interface to a stream that can be used for an HTTP request body. ">HTTPBodyStream</a> to a string. If an error occurs, adds a test failure and returns an empty string. <ahref="#a861ba97c72a60c7e1802c39395d1d1fe">More...</a><br/></td></tr>
<trclass="memdesc:afefac1494b6a67c50a254c75a8caccf1"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initializes a context structure for testing. <ahref="#afefac1494b6a67c50a254c75a8caccf1">More...</a><br/></td></tr>
<trclass="memdesc:afa1dd7166c73ca082608b1ab21b5a395"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initializes a context structure for testing. <ahref="#afa1dd7166c73ca082608b1ab21b5a395">More...</a><br/></td></tr>
<trclass="memdesc:a774c6adc6455eb01f0595262c1ce7df9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Verifies, via gtest assertions, that a context structure contains expected values. <ahref="#a774c6adc6455eb01f0595262c1ce7df9">More...</a><br/></td></tr>
<trclass="memdesc:ac5b85697010c624299be8ac6192cc3ed"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Verifies, via gtest assertions, that a context structure contains expected values. <ahref="#ac5b85697010c624299be8ac6192cc3ed">More...</a><br/></td></tr>
<trclass="memdesc:adfb5c0e6e1c121bdac4c663a3fa0db06"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initializes a context structure for testing. <ahref="#adfb5c0e6e1c121bdac4c663a3fa0db06">More...</a><br/></td></tr>
<trclass="memdesc:a9ea06b36ac8ee94add2d8aaca404265c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initializes a context structure for testing. <ahref="#a9ea06b36ac8ee94add2d8aaca404265c">More...</a><br/></td></tr>
<trclass="memdesc:a623baebebe1cf76d4ddcd1ba30116587"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initializes an <code>fxsave</code> context substructure for testing. <ahref="#a623baebebe1cf76d4ddcd1ba30116587">More...</a><br/></td></tr>
<trclass="memdesc:a5d029ec1724e63a58007a8705975df23"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initializes an <code>fxsave</code> context substructure for testing. <ahref="#a5d029ec1724e63a58007a8705975df23">More...</a><br/></td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">base</td><td>A string to prepend to the error description.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A string of the format <code>"Permission denied (1100)"</code> if <em>bootstrap_err</em> has the value <code>BOOTSTRAP_NOT_PRIVILEGED</code> on a system where this is defined to be 1100. If <em>base</em> is not empty, it will be prepended to this string, separated by a colon. If <em>bootstrap_err</em> is not a valid bootstrap error code, it will be interpreted as a Mach error code in the manner of <aclass="el"href="namespacecrashpad_1_1test.html#a49a7a2461cf4e1f674eac147c19d9483"title="Formats a Mach error message. ">MachErrorMessage()</a>. </dd></dl>
<p>Formats an error message using an <code>errno</code> value. </p>
<p>The returned string will combine the <em>base</em> string, if supplied, with a a textual and numeric description of the error.</p>
<p>The message is formatted using <code>strerror()</code>. <em>err</em> may be <code>0</code> or outside of the range of known error codes, and the message returned will contain the string that <code>strerror()</code> uses in these cases.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">err</td><td>The error code, usable as an <code>errno</code> value. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">base</td><td>A string to prepend to the error description.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A string of the format <code>"Operation not permitted (1)"</code> if <em>err</em> has the value <code>EPERM</code> on a system where this is defined to be <code>1</code>. If <em>base</em> is not empty, it will be prepended to this string, separated by a colon. </dd></dl>
<p>Formats an error message using <code>errno</code>. </p>
<p>The returned string will combine the <em>base</em> string, if supplied, with a a textual and numeric description of the error.</p>
<p>The message is formatted using <code>strerror()</code>. <code>errno</code> may be <code>0</code> or outside of the range of known error codes, and the message returned will contain the string that <code>strerror()</code> uses in these cases.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">base</td><td>A string to prepend to the error description.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A string of the format <code>"Operation not permitted (1)"</code> if <code>errno</code> has the value <code>EPERM</code> on a system where this is defined to be <code>1</code>. If <em>base</em> is not empty, it will be prepended to this string, separated by a colon. </dd></dl>
<p>Formats an error message using <code>GetLastError()</code>. </p>
<p>The returned string will combine the <em>base</em> string, if supplied, with a a textual and numeric description of the error. The format is the same as the <code>PLOG()</code> formatting in base. </p>
<p>Verifies, via gtest assertions, that a context structure contains expected values. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">expect_seed</td><td>The seed value used to initialize a context structure. This is the seed value used with InitializeMinidumpContext*(). </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">observed</td><td>The context structure to check. All fields of this structure will be compared against the expectedcontext structure, one initialized with <em>expect_seed</em>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">snapshot</td><td>If <code>true</code>, compare <em>observed</em> to a context structure expected to be produced from a <aclass="el"href="structcrashpad_1_1CPUContext.html"title="A context structure capable of carrying the context of any supported CPU architecture. ">CPUContext</a> snapshot. If <code>false</code>, compare <em>observed</em> to a native minidump context structure. <aclass="el"href="structcrashpad_1_1CPUContext.html"title="A context structure capable of carrying the context of any supported CPU architecture. ">CPUContext</a> snapshot structures may carry different sets of data than native minidump context structures in meaningless ways. When <code>true</code>, fields not found in <aclass="el"href="structcrashpad_1_1CPUContext.html"title="A context structure capable of carrying the context of any supported CPU architecture. ">CPUContext</a> structures are expected to be <code>0</code>. When <code>false</code>, all fields are compared. This makes it possible to test both that these fields are passed through correctly by the native minidump writer and are zeroed out when creating a minidump context structure from a <aclass="el"href="structcrashpad_1_1CPUContext.html"title="A context structure capable of carrying the context of any supported CPU architecture. ">CPUContext</a> structure. </td></tr>
<p>Verifies, via gtest assertions, that a context structure contains expected values. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">expect_seed</td><td>The seed value used to initialize a context structure. This is the seed value used with InitializeMinidumpContext*(). </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">observed</td><td>The context structure to check. All fields of this structure will be compared against the expectedcontext structure, one initialized with <em>expect_seed</em>. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">snapshot</td><td>If <code>true</code>, compare <em>observed</em> to a context structure expected to be produced from a <aclass="el"href="structcrashpad_1_1CPUContext.html"title="A context structure capable of carrying the context of any supported CPU architecture. ">CPUContext</a> snapshot. If <code>false</code>, compare <em>observed</em> to a native minidump context structure. <aclass="el"href="structcrashpad_1_1CPUContext.html"title="A context structure capable of carrying the context of any supported CPU architecture. ">CPUContext</a> snapshot structures may carry different sets of data than native minidump context structures in meaningless ways. When <code>true</code>, fields not found in <aclass="el"href="structcrashpad_1_1CPUContext.html"title="A context structure capable of carrying the context of any supported CPU architecture. ">CPUContext</a> structures are expected to be <code>0</code>. When <code>false</code>, all fields are compared. This makes it possible to test both that these fields are passed through correctly by the native minidump writer and are zeroed out when creating a minidump context structure from a <aclass="el"href="structcrashpad_1_1CPUContext.html"title="A context structure capable of carrying the context of any supported CPU architecture. ">CPUContext</a> structure. </td></tr>
<p>Verifies, via gtest assertions, that a <aclass="el"href="structMINIDUMP__MEMORY__DESCRIPTOR.html"title="A pointer to a snapshot of a region of memory contained within a minidump file. ">MINIDUMP_MEMORY_DESCRIPTOR</a> structure contains expected values. </p>
<p>In <em>expected</em> and <em>observed</em>, <aclass="el"href="structMINIDUMP__MEMORY__DESCRIPTOR.html#ac6d589aa4a3b82315866f2a27bee770c"title="The base address of the memory region in the address space of the process that the minidump file cont...">MINIDUMP_MEMORY_DESCRIPTOR::StartOfMemoryRange</a> and <aclass="el"href="structMINIDUMP__LOCATION__DESCRIPTOR.html#ad83430521d4a8991d85e06be61525a92"title="The size of the referenced structure or union, in bytes. ">MINIDUMP_LOCATION_DESCRIPTOR::DataSize</a> are compared and must match. If <aclass="el"href="structMINIDUMP__LOCATION__DESCRIPTOR.html#ae877992492577366d7185721b8239877"title="The relative virtual address of the structure or union within the minidump file. ">MINIDUMP_LOCATION_DESCRIPTOR::Rva</a> is nonzero in <em>expected</em>, the same field in <em>observed</em> must match it, subject to a 16-byte alignment augmentation.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">expected</td><td>A <aclass="el"href="structMINIDUMP__MEMORY__DESCRIPTOR.html"title="A pointer to a snapshot of a region of memory contained within a minidump file. ">MINIDUMP_MEMORY_DESCRIPTOR</a> structure containing expected values. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">observed</td><td>A <aclass="el"href="structMINIDUMP__MEMORY__DESCRIPTOR.html"title="A pointer to a snapshot of a region of memory contained within a minidump file. ">MINIDUMP_MEMORY_DESCRIPTOR</a> structure containing observed values. </td></tr>
<p>Verifies, via gtest assertions, that a <aclass="el"href="structMINIDUMP__MEMORY__DESCRIPTOR.html"title="A pointer to a snapshot of a region of memory contained within a minidump file. ">MINIDUMP_MEMORY_DESCRIPTOR</a> structure contains expected values, and that the memory region it points to contains expected values assuming it was written by a <aclass="el"href="classcrashpad_1_1test_1_1TestMinidumpMemoryWriter.html"title="A SnapshotMinidumpMemoryWriter implementation used for testing. ">TestMinidumpMemoryWriter</a> object. </p>
<p><em>expected</em> and <em>observed</em> are compared by <aclass="el"href="namespacecrashpad_1_1test.html#a5d907f190db31282e6c8a08df38f7f3f"title="Verifies, via gtest assertions, that a MINIDUMP_MEMORY_DESCRIPTOR structure contains expected values...">ExpectMinidumpMemoryDescriptor()</a>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">expected</td><td>A <aclass="el"href="structMINIDUMP__MEMORY__DESCRIPTOR.html"title="A pointer to a snapshot of a region of memory contained within a minidump file. ">MINIDUMP_MEMORY_DESCRIPTOR</a> structure containing expected values. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">observed</td><td>A <aclass="el"href="structMINIDUMP__MEMORY__DESCRIPTOR.html"title="A pointer to a snapshot of a region of memory contained within a minidump file. ">MINIDUMP_MEMORY_DESCRIPTOR</a> structure containing observed values. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">file_contents</td><td>The contents of the minidump file in which <em>observed</em> was found. The memory region referenced by <em>observed</em> will be read from this string. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">value</td><td>The <em>value</em> used to create a <aclass="el"href="classcrashpad_1_1test_1_1TestMinidumpMemoryWriter.html"title="A SnapshotMinidumpMemoryWriter implementation used for testing. ">TestMinidumpMemoryWriter</a>. Each byte of memory in the region referenced by <em>observed</em> must be this value. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">at_eof</td><td>If <code>true</code>, the region referenced by <em>observed</em> must appear at the end of <em>file_contents</em>, without any data following it. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">path</td><td>The path to check for existence.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><code>true</code> if <em>path</em> exists. <code>false</code> if it does not exist. If an error other than “file not found” occurs when searching for <em>path</em>, returns <code>false</code> with a gtest failure added. </dd></dl>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">path</td><td>The path of the file to check. The file must exist.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The size of the file at <em>path</em>. If the file does not exist, or an error occurs when attempting to determine its size, returns <code>-1</code> with a gtest failure added. </dd></dl>
<p>Initializes a context structure for testing. </p>
<p>Initialization is compatible with the initialization used by minidump context test initialization functions such as <aclass="el"href="namespacecrashpad_1_1test.html#afefac1494b6a67c50a254c75a8caccf1"title="Initializes a context structure for testing. ">InitializeMinidumpContextX86()</a> and <aclass="el"href="namespacecrashpad_1_1test.html#afa1dd7166c73ca082608b1ab21b5a395"title="Initializes a context structure for testing. ">InitializeMinidumpContextAMD64()</a> for identical <em>seed</em> values.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">context</td><td>The structure to initialize. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">seed</td><td>The seed value. Initializing two context structures of the same type with identical seed values should produce identical context structures. Initialization with a different seed value should produce a different context structure. If <em>seed</em> is <code>0</code>, <em>context</em> is zeroed out entirely except for the <aclass="el"href="structcrashpad_1_1CPUContext.html#af71f7a2e8478339d53fcb9d52ded6ae5"title="The CPU architecture of a context structure. This field controls the expression of the union...">CPUContext::architecture</a> field, which will identify the context type. If <em>seed</em> is nonzero, <em>context</em> will be populated entirely with nonzero values. </td></tr>
<p>Initializes a context structure for testing. </p>
<p>Initialization is compatible with the initialization used by minidump context test initialization functions such as <aclass="el"href="namespacecrashpad_1_1test.html#afefac1494b6a67c50a254c75a8caccf1"title="Initializes a context structure for testing. ">InitializeMinidumpContextX86()</a> and <aclass="el"href="namespacecrashpad_1_1test.html#afa1dd7166c73ca082608b1ab21b5a395"title="Initializes a context structure for testing. ">InitializeMinidumpContextAMD64()</a> for identical <em>seed</em> values.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">context</td><td>The structure to initialize. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">seed</td><td>The seed value. Initializing two context structures of the same type with identical seed values should produce identical context structures. Initialization with a different seed value should produce a different context structure. If <em>seed</em> is <code>0</code>, <em>context</em> is zeroed out entirely except for the <aclass="el"href="structcrashpad_1_1CPUContext.html#af71f7a2e8478339d53fcb9d52ded6ae5"title="The CPU architecture of a context structure. This field controls the expression of the union...">CPUContext::architecture</a> field, which will identify the context type. If <em>seed</em> is nonzero, <em>context</em> will be populated entirely with nonzero values. </td></tr>
<p>Initializes an <code>fxsave</code> context substructure for testing. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">fxsave</td><td>The structure to initialize. </td></tr>
<tr><tdclass="paramdir">[in,out]</td><tdclass="paramname">seed</td><td>The seed value. Initializing two <code>fxsave</code> structures of the same type with identical seed values should produce identical structures. Initialization with a different seed value should produce a different <code>fxsave</code> structure. If <em>seed</em> is <code>0</code>, <em>fxsave</em> is zeroed out entirely. If <em>seed</em> is nonzero, <em>fxsave</em> will be populated entirely with nonzero values. <em>seed</em> will be updated by this function to allow the caller to perform subsequent initialization of the context structure containing <em>fxsave</em>. </td></tr>
<p>Initializes an <code>fxsave</code> context substructure for testing. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">fxsave</td><td>The structure to initialize. </td></tr>
<tr><tdclass="paramdir">[in,out]</td><tdclass="paramname">seed</td><td>The seed value. Initializing two <code>fxsave</code> structures of the same type with identical seed values should produce identical structures. Initialization with a different seed value should produce a different <code>fxsave</code> structure. If <em>seed</em> is <code>0</code>, <em>fxsave</em> is zeroed out entirely. If <em>seed</em> is nonzero, <em>fxsave</em> will be populated entirely with nonzero values. <em>seed</em> will be updated by this function to allow the caller to perform subsequent initialization of the context structure containing <em>fxsave</em>. </td></tr>
<p>Initializes a context structure for testing. </p>
<p>Initialization is compatible with the initialization used by <aclass="el"href="structcrashpad_1_1CPUContext.html"title="A context structure capable of carrying the context of any supported CPU architecture. ">CPUContext</a> test initialization functions such as <aclass="el"href="namespacecrashpad_1_1test.html#adfb5c0e6e1c121bdac4c663a3fa0db06"title="Initializes a context structure for testing. ">InitializeCPUContextX86()</a> and <aclass="el"href="namespacecrashpad_1_1test.html#a9ea06b36ac8ee94add2d8aaca404265c"title="Initializes a context structure for testing. ">InitializeCPUContextX86_64()</a> for identical <em>seed</em> values.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">context</td><td>The structure to initialize. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">seed</td><td>The seed value. Initializing two context structures of the same type with identical seed values should produce identical context structures. Initialization with a different seed value should produce a different context structure. If <em>seed</em> is <code>0</code>, <em>context</em> is zeroed out entirely except for the flags field, which will identify the context type. If <em>seed</em> is nonzero, <em>context</em> will be populated entirely with nonzero values. </td></tr>
<p>Initializes a context structure for testing. </p>
<p>Initialization is compatible with the initialization used by <aclass="el"href="structcrashpad_1_1CPUContext.html"title="A context structure capable of carrying the context of any supported CPU architecture. ">CPUContext</a> test initialization functions such as <aclass="el"href="namespacecrashpad_1_1test.html#adfb5c0e6e1c121bdac4c663a3fa0db06"title="Initializes a context structure for testing. ">InitializeCPUContextX86()</a> and <aclass="el"href="namespacecrashpad_1_1test.html#a9ea06b36ac8ee94add2d8aaca404265c"title="Initializes a context structure for testing. ">InitializeCPUContextX86_64()</a> for identical <em>seed</em> values.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">context</td><td>The structure to initialize. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">seed</td><td>The seed value. Initializing two context structures of the same type with identical seed values should produce identical context structures. Initialization with a different seed value should produce a different context structure. If <em>seed</em> is <code>0</code>, <em>context</em> is zeroed out entirely except for the flags field, which will identify the context type. If <em>seed</em> is nonzero, <em>context</em> will be populated entirely with nonzero values. </td></tr>
<p>The returned string will combine the <em>base</em> string, if supplied, with a a textual and numeric description of the error.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">mach_err</td><td>The Mach error code, which may be a <code>kern_return_t</code> or related type. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">base</td><td>A string to prepend to the error description.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>A string of the format <code>"(os/kern) invalid address (1)"</code> if <em>mach_err</em> has the value <code>KERN_INVALID_ADDRESS</code> on a system where this is defined to be 1. If <em>base</em> is not empty, it will be prepended to this string, separated by a colon. </dd></dl>
<p>Returns the <aclass="el"href="structMINIDUMP__HEADER.html"title="The top-level structure identifying a minidump file. ">MINIDUMP_HEADER</a> at the start of a minidump file, along with the <aclass="el"href="structMINIDUMP__DIRECTORY.html"title="A pointer to a stream within a minidump file. ">MINIDUMP_DIRECTORY</a> it references. </p>
<p>This function validates the <aclass="el"href="structMINIDUMP__HEADER.html#ae1c77644aa56ab70fd6f50c343eafda8"title="The minidump file format magic number, MINIDUMP_SIGNATURE. ">MINIDUMP_HEADER::Signature</a> and <aclass="el"href="structMINIDUMP__HEADER.html#a7ea8d51f5ca990eec9eb0b3643c6b406"title="The minidump file format version number, MINIDUMP_VERSION. ">MINIDUMP_HEADER::Version</a> fields.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">file_contents</td><td>The contents of the minidump file. </td></tr>
<tr><tdclass="paramdir">[out]</td><tdclass="paramname">directory</td><td>The <aclass="el"href="structMINIDUMP__DIRECTORY.html"title="A pointer to a stream within a minidump file. ">MINIDUMP_DIRECTORY</a> referenced by the <aclass="el"href="structMINIDUMP__HEADER.html"title="The top-level structure identifying a minidump file. ">MINIDUMP_HEADER</a>. If the <aclass="el"href="structMINIDUMP__HEADER.html"title="The top-level structure identifying a minidump file. ">MINIDUMP_HEADER</a> does not reference a <aclass="el"href="structMINIDUMP__DIRECTORY.html"title="A pointer to a stream within a minidump file. ">MINIDUMP_DIRECTORY</a>, <code>nullptr</code> without raising a gtest assertion. If the referenced <aclass="el"href="structMINIDUMP__DIRECTORY.html"title="A pointer to a stream within a minidump file. ">MINIDUMP_DIRECTORY</a> is not valid, <code>nullptr</code> with a gtest assertion raised. On failure, <code>nullptr</code>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>On success, the <aclass="el"href="structMINIDUMP__HEADER.html"title="The top-level structure identifying a minidump file. ">MINIDUMP_HEADER</a> at the beginning of the minidump file. On failure, raises a gtest assertion and returns <code>nullptr</code>. </dd></dl>
<p>Returns the <aclass="el"href="structcrashpad_1_1MinidumpRVAList.html"title="A list of RVA pointers. ">MinidumpRVAList</a> at the start of a minidump file. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">file_contents</td><td>The contents of the minidump file. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">count</td><td>The number of <aclass="el"href="dbghelp_8h.html#acf465a1a77ecf067a9d946583bc6a3f8"title="An offset within a minidump file, relative to the start of its MINIDUMP_HEADER. ">RVA</a> objects expected in the <aclass="el"href="structcrashpad_1_1MinidumpRVAList.html"title="A list of RVA pointers. ">MinidumpRVAList</a>. This function will only be successful if exactly this many objects are present, and if space for them exists in <em>file_contents</em>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>On success, the <aclass="el"href="structcrashpad_1_1MinidumpRVAList.html"title="A list of RVA pointers. ">MinidumpRVAList</a> at the beginning of the file. On failure, raises a gtest assertion and returns <code>nullptr</code>. </dd></dl>
<p>Returns a <aclass="el"href="structMINIDUMP__STRING.html"title="A variable-length UTF-16-encoded string carried within a minidump file. ">MINIDUMP_STRING</a> located within a minidump file’s contents. </p>
<p>If <em>rva</em> points outside of the range of <em>file_contents</em>, if the string has an incorrect length or is not <code>NUL</code>-terminated, or if any of the string data would lie outside of the range of <em>file_contents</em>, this function will fail.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">file_contents</td><td>The contents of the minidump file. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">rva</td><td>The offset within the minidump file of the desired <aclass="el"href="structMINIDUMP__STRING.html"title="A variable-length UTF-16-encoded string carried within a minidump file. ">MINIDUMP_STRING</a>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>On success, a pointer to the <aclass="el"href="structMINIDUMP__STRING.html"title="A variable-length UTF-16-encoded string carried within a minidump file. ">MINIDUMP_STRING</a> in <em>file_contents</em>. On failure, raises a gtest assertion and returns <code>nullptr</code>.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="namespacecrashpad_1_1test.html#a2276ff84807d40b2fc4f7fd2ccc8b743"title="Returns the contents of a MINIDUMP_STRING as a string16. ">MinidumpStringAtRVAAsString()</a></dd>
<dd>
<aclass="el"href="namespacecrashpad_1_1test.html#a9f5bbb381b32ca4c5276a5aacbef1c5f"title="Returns a MinidumpUTF8String located within a minidump file’s contents. ">MinidumpUTF8StringAtRVA()</a></dd></dl>
<p>Returns the contents of a <aclass="el"href="structMINIDUMP__STRING.html"title="A variable-length UTF-16-encoded string carried within a minidump file. ">MINIDUMP_STRING</a> as a <code>string16</code>. </p>
<p>This function uses <aclass="el"href="namespacecrashpad_1_1test.html#a527731a826e40dd36ac112e7cd3dfcd2"title="Returns a MINIDUMP_STRING located within a minidump file’s contents. ">MinidumpStringAtRVA()</a> to obtain a <aclass="el"href="structMINIDUMP__STRING.html"title="A variable-length UTF-16-encoded string carried within a minidump file. ">MINIDUMP_STRING</a>, and returns the string data as a <code>string16</code>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">file_contents</td><td>The contents of the minidump file. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">rva</td><td>The offset within the minidump file of the desired <aclass="el"href="structMINIDUMP__STRING.html"title="A variable-length UTF-16-encoded string carried within a minidump file. ">MINIDUMP_STRING</a>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>On success, the string read from <em>file_writer</em> at offset <em>rva</em>. On failure, raises a gtest assertion and returns an empty string.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="namespacecrashpad_1_1test.html#a4d8f1de3f021881b6464a1fedbddf956"title="Returns the contents of a MinidumpUTF8String as a std::string. ">MinidumpUTF8StringAtRVAAsString()</a></dd></dl>
<p>Returns a <aclass="el"href="structcrashpad_1_1MinidumpUTF8String.html"title="A variable-length UTF-8-encoded string carried within a minidump file. ">MinidumpUTF8String</a> located within a minidump file’s contents. </p>
<p>If <em>rva</em> points outside of the range of <em>file_contents</em>, if the string has an incorrect length or is not <code>NUL</code>-terminated, or if any of the string data would lie outside of the range of <em>file_contents</em>, this function will fail.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">file_contents</td><td>The contents of the minidump file. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">rva</td><td>The offset within the minidump file of the desired <aclass="el"href="structcrashpad_1_1MinidumpUTF8String.html"title="A variable-length UTF-8-encoded string carried within a minidump file. ">MinidumpUTF8String</a>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>On success, a pointer to the <aclass="el"href="structcrashpad_1_1MinidumpUTF8String.html"title="A variable-length UTF-8-encoded string carried within a minidump file. ">MinidumpUTF8String</a> in <em>file_contents</em>. On failure, raises a gtest assertion and returns <code>nullptr</code>.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="namespacecrashpad_1_1test.html#a4d8f1de3f021881b6464a1fedbddf956"title="Returns the contents of a MinidumpUTF8String as a std::string. ">MinidumpUTF8StringAtRVAAsString()</a></dd>
<dd>
<aclass="el"href="namespacecrashpad_1_1test.html#a527731a826e40dd36ac112e7cd3dfcd2"title="Returns a MINIDUMP_STRING located within a minidump file’s contents. ">MinidumpStringAtRVA()</a></dd></dl>
<p>Returns the contents of a <aclass="el"href="structcrashpad_1_1MinidumpUTF8String.html"title="A variable-length UTF-8-encoded string carried within a minidump file. ">MinidumpUTF8String</a> as a <code>std::string</code>. </p>
<p>This function uses <aclass="el"href="namespacecrashpad_1_1test.html#a9f5bbb381b32ca4c5276a5aacbef1c5f"title="Returns a MinidumpUTF8String located within a minidump file’s contents. ">MinidumpUTF8StringAtRVA()</a> to obtain a <aclass="el"href="structcrashpad_1_1MinidumpUTF8String.html"title="A variable-length UTF-8-encoded string carried within a minidump file. ">MinidumpUTF8String</a>, and returns the string data as a <code>std::string</code>.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">file_contents</td><td>The contents of the minidump file. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">rva</td><td>The offset within the minidump file of the desired <aclass="el"href="structcrashpad_1_1MinidumpUTF8String.html"title="A variable-length UTF-8-encoded string carried within a minidump file. ">MinidumpUTF8String</a>.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>On success, the string read from <em>file_writer</em> at offset <em>rva</em>. On failure, raises a gtest assertion and returns an empty string.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="namespacecrashpad_1_1test.html#a2276ff84807d40b2fc4f7fd2ccc8b743"title="Returns the contents of a MINIDUMP_STRING as a string16. ">MinidumpStringAtRVAAsString()</a></dd></dl>
<p>Returns a typed minidump object located within a minidump file’s contents, where the offset and size of the object are known. </p>
<p>This function has template specializations that perform more stringent checking than the default implementation:</p><ul>
<li>With a <aclass="el"href="structMINIDUMP__HEADER.html"title="The top-level structure identifying a minidump file. ">MINIDUMP_HEADER</a> template parameter, a template specialization ensures that the structure’s magic number and version fields are correct.</li>
<li>With a <aclass="el"href="structMINIDUMP__MEMORY__LIST.html"title="Information about memory regions within the process. ">MINIDUMP_MEMORY_LIST</a>, <aclass="el"href="structMINIDUMP__THREAD__LIST.html"title="Information about all threads within the process. ">MINIDUMP_THREAD_LIST</a>, <aclass="el"href="structMINIDUMP__MODULE__LIST.html"title="Information about all modules loaded within the process at the time the snapshot was taken...">MINIDUMP_MODULE_LIST</a>, <aclass="el"href="structMINIDUMP__MEMORY__INFO__LIST.html"title="Contains a list of memory regions. ">MINIDUMP_MEMORY_INFO_LIST</a>, or <aclass="el"href="structcrashpad_1_1MinidumpSimpleStringDictionary.html"title="A list of key-value pairs. ">MinidumpSimpleStringDictionary</a> template parameter, template specializations ensure that the size given by <em>location</em> matches the size expected of a stream containing the number of elements it claims to have.</li>
<li>With an <aclass="el"href="structIMAGE__DEBUG__MISC.html"title="Miscellaneous debugging record. ">IMAGE_DEBUG_MISC</a>, <aclass="el"href="structcrashpad_1_1CodeViewRecordPDB20.html"title="A CodeView record linking to a .pdb 2.0 file. ">CodeViewRecordPDB20</a>, or <aclass="el"href="structcrashpad_1_1CodeViewRecordPDB70.html"title="A CodeView record linking to a .pdb 7.0 file. ">CodeViewRecordPDB70</a> template parameter, template specializations ensure that the structure has the expected format including any magic number and the <code>NUL</code>- terminated string.</li>
</ul>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">file_contents</td><td>The contents of the minidump file. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">location</td><td>A <aclass="el"href="structMINIDUMP__LOCATION__DESCRIPTOR.html"title="A pointer to a structure or union within a minidump file. ">MINIDUMP_LOCATION_DESCRIPTOR</a> giving the offset within the minidump file of the desired object, as well as its size.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>If the size of <em>location</em> is at least as big as the size of the requested object, and if <em>location</em> is within the range of <em>file_contents</em>, returns a pointer into <em>file_contents</em> at offset <em>rva</em>. Otherwise, raises a gtest assertion failure and returns <code>nullptr</code>.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="namespacecrashpad_1_1test.html#a5b3e635fd21c8c642d41ceb2072e7d08"title="Returns a typed minidump object located within a minidump file’s contents, where the offset of the o...">MinidumpWritableAtRVA()</a></dd></dl>
<p>Returns an untyped minidump object located within a minidump file’s contents, where the offset and size of the object are known. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">file_contents</td><td>The contents of the minidump file. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">location</td><td>A <aclass="el"href="structMINIDUMP__LOCATION__DESCRIPTOR.html"title="A pointer to a structure or union within a minidump file. ">MINIDUMP_LOCATION_DESCRIPTOR</a> giving the offset within the minidump file of the desired object, as well as its size. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">expected_size</td><td>The expected size of the object. If <em>allow_oversized_data</em> is <code>true</code>, <em>expected_size</em> is treated as the minimum size of <em>location</em>, but it is permitted to be larger. If <em>allow_oversized_data</em> is <code>false</code>, the size of <em>location</em> must match <em>expected_size</em> exactly. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">allow_oversized_data</td><td>Controls whether <em>expected_size</em> is a minimum limit (<code>true</code>) or an exact match is required (<code>false</code>).</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>If the size of <em>location</em> is agrees with <em>expected_size</em>, and if <em>location</em> is within the range of <em>file_contents</em>, returns a pointer into <em>file_contents</em> at offset <em>rva</em>. Otherwise, raises a gtest assertion failure and returns <code>nullptr</code>.</dd></dl>
<p>Do not call this function. Use the typed version, <aclass="el"href="namespacecrashpad_1_1test.html#a0e98915fad73c8628924c3a900732fc0"title="Returns a typed minidump object located within a minidump file’s contents, where the offset and size...">MinidumpWritableAtLocationDescriptor<>()</a>, or another type-specific function. </p>
<p>Returns a typed minidump object located within a minidump file’s contents, where the offset of the object is known. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">file_contents</td><td>The contents of the minidump file. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">rva</td><td>The offset within the minidump file of the desired object.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>If <em>rva</em> plus the size of an object of type <em>T</em> is within the range of <em>file_contents</em>, returns a pointer into <em>file_contents</em> at offset <em>rva</em>. Otherwise, raises a gtest assertion failure and returns <code>nullptr</code>.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="namespacecrashpad_1_1test.html#a0e98915fad73c8628924c3a900732fc0"title="Returns a typed minidump object located within a minidump file’s contents, where the offset and size...">MinidumpWritableAtLocationDescriptor<>()</a></dd></dl>
<p>Reads a <aclass="el"href="classcrashpad_1_1HTTPBodyStream.html"title="An interface to a stream that can be used for an HTTP request body. ">HTTPBodyStream</a> to a string. If an error occurs, adds a test failure and returns an empty string. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">stream</td><td>The stream from which to read.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The contents of the stream, or an empty string on failure. </dd></dl>
<p>Reads a <aclass="el"href="classcrashpad_1_1HTTPBodyStream.html"title="An interface to a stream that can be used for an HTTP request body. ">HTTPBodyStream</a> to a string. If an error occurs, adds a test failure and returns an empty string. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">stream</td><td>The stream from which to read. </td></tr>
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">buffer_size</td><td>The size of the buffer to use when reading from the stream.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>The contents of the stream, or an empty string on failure. </dd></dl>
<p>Returns a typed minidump object located within a minidump file’s contents, where the offset and size of the object are known. </p>
<p>This function is similar to <aclass="el"href="namespacecrashpad_1_1test.html#a0e98915fad73c8628924c3a900732fc0"title="Returns a typed minidump object located within a minidump file’s contents, where the offset and size...">MinidumpWritableAtLocationDescriptor<>()</a> and is used to implement that function. It exists independently so that template specializations are able to call this function, which provides the default implementation.</p>
<p>Do not call this function directly. Use <aclass="el"href="namespacecrashpad_1_1test.html#a0e98915fad73c8628924c3a900732fc0"title="Returns a typed minidump object located within a minidump file’s contents, where the offset and size...">MinidumpWritableAtLocationDescriptor<>()</a> instead. </p>
<p>Verifies, via gtest assertions, that a <aclass="el"href="structMINIDUMP__HEADER.html"title="The top-level structure identifying a minidump file. ">MINIDUMP_HEADER</a> contains expected values. </p>
<p>All fields in the <aclass="el"href="structMINIDUMP__HEADER.html"title="The top-level structure identifying a minidump file. ">MINIDUMP_HEADER</a> will be evaluated except for the Signature and Version fields, because those are checked by <aclass="el"href="namespacecrashpad_1_1test.html#a68bb97f184e9e5a41356a960fdaf3320"title="Returns the MINIDUMP_HEADER at the start of a minidump file, along with the MINIDUMP_DIRECTORY it ref...">MinidumpHeaderAtStart()</a>. Most other fields are are compared to their correct default values. <aclass="el"href="structMINIDUMP__HEADER.html#ac64203d27bba37f630437048a0e19630"title="The number of MINIDUMP_DIRECTORY elements present in the directory referenced by StreamDirectoryRva. ">MINIDUMP_HEADER::NumberOfStreams</a> is compared to <em>streams</em>, and <aclass="el"href="structMINIDUMP__HEADER.html#a5f3811a143f2a6405e721d03d8c86f1d"title="The time that the minidump file was generated, in time_t format, the number of seconds since the POSI...">MINIDUMP_HEADER::TimeDateStamp</a> is compared to <em>timestamp</em>. Most fields are checked with nonfatal EXPECT-style assertions, but <aclass="el"href="structMINIDUMP__HEADER.html#ac64203d27bba37f630437048a0e19630"title="The number of MINIDUMP_DIRECTORY elements present in the directory referenced by StreamDirectoryRva. ">MINIDUMP_HEADER::NumberOfStreams</a> and <aclass="el"href="structMINIDUMP__HEADER.html#afc88b1f46827fbeae6ef6e0718a23b57"title="A pointer to an array of MINIDUMP_DIRECTORY structures that identify all of the streams within this m...">MINIDUMP_HEADER::StreamDirectoryRva</a> are checked with fatal ASSERT-style assertions, because they must be correct in order for processing of the minidump to continue. </p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hrclass="footer"/><addressclass="footer"><small>
Generated by  <ahref="http://www.doxygen.org/index.html">