<ahref="#pub-methods">Public Member Functions</a>|
<ahref="#pub-static-methods">Static Public Member Functions</a>|
<ahref="#pro-methods">Protected Member Functions</a>|
<ahref="classcrashpad_1_1MinidumpMemoryWriter-members.html">List of all members</a></div>
<divclass="headertitle">
<divclass="title">crashpad::MinidumpMemoryWriter Class Reference<spanclass="mlabels"><spanclass="mlabel">abstract</span></span></div></div>
</div><!--header-->
<divclass="contents">
<p>The base class for writers of memory ranges pointed to by <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> objects in a minidump file.
<areahref="classcrashpad_1_1internal_1_1MinidumpWritable.html"title="The base class for all content that might be written to a minidump file. "alt="crashpad::internal::MinidumpWritable"shape="rect"coords="196,0,579,24"/>
<areahref="classcrashpad_1_1test_1_1TestMinidumpMemoryWriter.html"title="A MinidumpMemoryWriter implementation used for testing. "alt="crashpad::test::TestMinidumpMemoryWriter"shape="rect"coords="0,112,383,136"/>
<trclass="memdesc:aed2c11b4e81395533d93eb85a4563e18"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns 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> referencing the data that this object writes. <ahref="#aed2c11b4e81395533d93eb85a4563e18">More...</a><br/></td></tr>
<trclass="memdesc:aa770340c418ab7835a5c4a5a38f52e84"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Registers a memory descriptor as one that should point to the object on which this method is called. <ahref="#aa770340c418ab7835a5c4a5a38f52e84">More...</a><br/></td></tr>
<trclass="inherit_header pub_methods_classcrashpad_1_1internal_1_1MinidumpWritable"><tdcolspan="2"onclick="javascript:toggleInherit('pub_methods_classcrashpad_1_1internal_1_1MinidumpWritable')"><imgsrc="closed.png"alt="-"/> Public Member Functions inherited from <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html">crashpad::internal::MinidumpWritable</a></td></tr>
<trclass="memdesc:a24507e918299cb566c7f15207de83a7f inherit pub_methods_classcrashpad_1_1internal_1_1MinidumpWritable"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Writes an object and all of its children to a minidump file. <ahref="#a24507e918299cb566c7f15207de83a7f">More...</a><br/></td></tr>
<trclass="memdesc:a686683d78f099a07e2a1df8e6b567d37 inherit pub_methods_classcrashpad_1_1internal_1_1MinidumpWritable"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Registers a file offset pointer as one that should point to the object on which this method is called. <ahref="#a686683d78f099a07e2a1df8e6b567d37">More...</a><br/></td></tr>
<trclass="memdesc:aed263c64ecb0597696d080e395af6400 inherit pub_methods_classcrashpad_1_1internal_1_1MinidumpWritable"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Registers a location descriptor as one that should point to the object on which this method is called. <ahref="#aed263c64ecb0597696d080e395af6400">More...</a><br/></td></tr>
<trclass="memdesc:ac9adde79751ab836d190bdfd4b778712"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Creates a concrete initialized <aclass="el"href="classcrashpad_1_1MinidumpMemoryWriter.html"title="The base class for writers of memory ranges pointed to by MINIDUMP_MEMORY_DESCRIPTOR objects in a min...">MinidumpMemoryWriter</a> based on <em>memory_snapshot</em>. <ahref="#ac9adde79751ab836d190bdfd4b778712">More...</a><br/></td></tr>
<trclass="memdesc:a4a0886af108f11efe6b554446e866093"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the base address of the memory region in the address space of the process that the snapshot describes. <ahref="#a4a0886af108f11efe6b554446e866093">More...</a><br/></td></tr>
<trclass="memdesc:aa3c35de1a102f6cab285ba03087e7cb3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the size of the memory region in bytes. <ahref="#aa3c35de1a102f6cab285ba03087e7cb3">More...</a><br/></td></tr>
<trclass="memdesc:a8997151abbd2f6c1b44b819fb00d0002"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Transitions the object from <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7a18337604dcbdbdb23ed51810f0587665"title="The object’s properties can be modified. ">kStateMutable</a> to <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7af98547144e0e8d4f878f725ef5c0d611"title="The object is “frozen”. ">kStateFrozen</a>. <ahref="#a8997151abbd2f6c1b44b819fb00d0002">More...</a><br/></td></tr>
<trclass="memdesc:a546a1702c89f5ad8ae62f42f33764f78"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the amount of space that this object will consume when written to a minidump file, in bytes, not including any leading or trailing padding necessary to maintain proper alignment. <ahref="#a546a1702c89f5ad8ae62f42f33764f78">More...</a><br/></td></tr>
<trclass="memdesc:adec74e1cb2d532422d8c1384049f7217"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Called once an object’s writable file offset is determined, as it transitions into <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7a87483823ca30a8257b2a5fbd21805bcd"title="The object is writable. ">kStateWritable</a>. <ahref="#adec74e1cb2d532422d8c1384049f7217">More...</a><br/></td></tr>
<trclass="inherit_header pro_methods_classcrashpad_1_1internal_1_1MinidumpWritable"><tdcolspan="2"onclick="javascript:toggleInherit('pro_methods_classcrashpad_1_1internal_1_1MinidumpWritable')"><imgsrc="closed.png"alt="-"/> Protected Member Functions inherited from <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html">crashpad::internal::MinidumpWritable</a></td></tr>
<trclass="memdesc:a665d2de47970d796e904f0dfce406814 inherit pro_methods_classcrashpad_1_1internal_1_1MinidumpWritable"><tdclass="mdescLeft"> </td><tdclass="mdescRight">The state of the object. <br/></td></tr>
<trclass="memdesc:a712fac2ada227f53c55eb0c4d042f239 inherit pro_methods_classcrashpad_1_1internal_1_1MinidumpWritable"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Prepares the object to be written at a known file offset, transitioning it from <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7af98547144e0e8d4f878f725ef5c0d611"title="The object is “frozen”. ">kStateFrozen</a> to <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7a87483823ca30a8257b2a5fbd21805bcd"title="The object is writable. ">kStateWritable</a>. <ahref="#a712fac2ada227f53c55eb0c4d042f239">More...</a><br/></td></tr>
<trclass="memdesc:ab82b1e92ae0eced8b8e2efe957411773 inherit pro_methods_classcrashpad_1_1internal_1_1MinidumpWritable"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Writes the object, transitioning it from <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7a87483823ca30a8257b2a5fbd21805bcd"title="The object is writable. ">kStateWritable</a> to <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7af0d794ed29c320fcf35c71f40cc6a510"title="The object has been written to a minidump file. ">kStateWritten</a>. <ahref="#ab82b1e92ae0eced8b8e2efe957411773">More...</a><br/></td></tr>
<trclass="memitem:ac14e05f291f5fa713b5ec82a208fa7c7 inherit pro_types_classcrashpad_1_1internal_1_1MinidumpWritable"><tdclass="memItemLeft"align="right"valign="top">enum  </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7">State</a><trclass="memdesc:ac14e05f291f5fa713b5ec82a208fa7c7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Identifies the state of an object. <ahref="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7">More...</a><br/></td></tr>
<trclass="memitem:a009f007265d64a5fb416848480a00ae9 inherit pro_types_classcrashpad_1_1internal_1_1MinidumpWritable"><tdclass="memItemLeft"align="right"valign="top">enum  </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#a009f007265d64a5fb416848480a00ae9">Phase</a><trclass="memdesc:a009f007265d64a5fb416848480a00ae9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Identifies the phase during which an object will be written to a minidump file. <ahref="classcrashpad_1_1internal_1_1MinidumpWritable.html#a009f007265d64a5fb416848480a00ae9">More...</a><br/></td></tr>
<trclass="memdesc:ae7c01f317a519213ac16bfeca94125d1 inherit pro_static_attribs_classcrashpad_1_1internal_1_1MinidumpWritable"><tdclass="mdescLeft"> </td><tdclass="mdescRight">A size value used to signal failure by methods that return <code>size_t</code>. <ahref="#ae7c01f317a519213ac16bfeca94125d1">More...</a><br/></td></tr>
<divclass="textblock"><p>The base class for writers of memory ranges pointed to by <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> objects in a minidump file. </p>
<p>This is an abstract base class because users are expected to provide their own implementations that, when possible, obtain the memory contents on-demand in their <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#a2d3472b11ec3c12184f5d8f946fbb4a1"title="Writes the object’s content. ">WriteObject()</a> methods. Memory ranges may be large, and the alternative construction would require the contents of multiple ranges to be held in memory simultaneously while a minidump file is being written. </p>
</div><h2class="groupheader">Member Function Documentation</h2>
<p>Returns the object’s desired byte-boundary alignment. </p>
<p>Memory regions are aligned to a 16-byte boundary. The actual alignment requirements of any data within the memory region are unknown, and may be more or less strict than this depending on the platform.</p>
<dlclass="section note"><dt>Note</dt><dd>Valid in <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7af98547144e0e8d4f878f725ef5c0d611"title="The object is “frozen”. ">kStateFrozen</a> or any subsequent state. </dd></dl>
<p>Reimplemented from <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#af4e92c46984eb73dbc1315ff5f4c7a9a">crashpad::internal::MinidumpWritable</a>.</p>
<p>Creates a concrete initialized <aclass="el"href="classcrashpad_1_1MinidumpMemoryWriter.html"title="The base class for writers of memory ranges pointed to by MINIDUMP_MEMORY_DESCRIPTOR objects in a min...">MinidumpMemoryWriter</a> based on <em>memory_snapshot</em>. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">memory_snapshot</td><td>The memory snapshot to use as source data.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>An object of a <aclass="el"href="classcrashpad_1_1MinidumpMemoryWriter.html"title="The base class for writers of memory ranges pointed to by MINIDUMP_MEMORY_DESCRIPTOR objects in a min...">MinidumpMemoryWriter</a> subclass initialized using the source data in <em>memory_snapshot</em>. </dd></dl>
<p>Transitions the object from <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7a18337604dcbdbdb23ed51810f0587665"title="The object’s properties can be modified. ">kStateMutable</a> to <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7af98547144e0e8d4f878f725ef5c0d611"title="The object is “frozen”. ">kStateFrozen</a>. </p>
<p>The default implementation marks the object as frozen and recursively calls <aclass="el"href="classcrashpad_1_1MinidumpMemoryWriter.html#a8997151abbd2f6c1b44b819fb00d0002"title="Transitions the object from kStateMutable to kStateFrozen. ">Freeze()</a> on all of its children. Subclasses may override this method to perform processing that should only be done once callers have finished populating an object with data. Typically, a subclass implementation would call <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#a686683d78f099a07e2a1df8e6b567d37"title="Registers a file offset pointer as one that should point to the object on which this method is called...">RegisterRVA()</a> or <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#aed263c64ecb0597696d080e395af6400"title="Registers a location descriptor as one that should point to the object on which this method is called...">RegisterLocationDescriptor()</a> on other objects as appropriate, because at the time <aclass="el"href="classcrashpad_1_1MinidumpMemoryWriter.html#a8997151abbd2f6c1b44b819fb00d0002"title="Transitions the object from kStateMutable to kStateFrozen. ">Freeze()</a> runs, the in-memory locations of RVAs and location descriptors are known and will not change for the remaining duration of an object’s lifetime.</p>
<dlclass="section return"><dt>Returns</dt><dd><code>true</code> on success. <code>false</code> on failure, with an appropriate message logged. </dd></dl>
<p>Reimplemented from <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#a773db80946a99c6a3cc29c7d4dd77bd6">crashpad::internal::MinidumpWritable</a>.</p>
<p>Returns the base address of the memory region in the address space of the process that the snapshot describes. </p>
<dlclass="section note"><dt>Note</dt><dd>This method will only be called in <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7af98547144e0e8d4f878f725ef5c0d611"title="The object is “frozen”. ">kStateFrozen</a>. </dd></dl>
<p>Implemented in <aclass="el"href="classcrashpad_1_1test_1_1TestMinidumpMemoryWriter.html#a923e5f3c8c1a2959b00a11a4c61f05cb">crashpad::test::TestMinidumpMemoryWriter</a>.</p>
<p>Returns the size of the memory region in bytes. </p>
<dlclass="section note"><dt>Note</dt><dd>This method will only be called in <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7af98547144e0e8d4f878f725ef5c0d611"title="The object is “frozen”. ">kStateFrozen</a> or a subsequent state. </dd></dl>
<p>Implemented in <aclass="el"href="classcrashpad_1_1test_1_1TestMinidumpMemoryWriter.html#a5423e8b580e90dcd837c80ca6d6779af">crashpad::test::TestMinidumpMemoryWriter</a>.</p>
<p>Returns 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> referencing the data that this object writes. </p>
<p>This method is expected to be called by a <aclass="el"href="classcrashpad_1_1MinidumpMemoryListWriter.html"title="The writer for a MINIDUMP_MEMORY_LIST stream in a minidump file, containing a list of MINIDUMP_MEMORY...">MinidumpMemoryListWriter</a> in order to obtain 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> to include in its list.</p>
<dlclass="section note"><dt>Note</dt><dd>Valid in <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7a87483823ca30a8257b2a5fbd21805bcd"title="The object is writable. ">kStateWritable</a>. </dd></dl>
<p>Registers a memory descriptor as one that should point to the object on which this method is called. </p>
<p>This method is expected to be called by objects of other classes, when those other classes have their own memory descriptors that need to point to memory ranges within a minidump file. <aclass="el"href="classcrashpad_1_1MinidumpThreadWriter.html"title="The writer for a MINIDUMP_THREAD object in a minidump file. ">MinidumpThreadWriter</a> is one such class. This method is public for this reason, otherwise it would suffice to be private.</p>
<dlclass="section note"><dt>Note</dt><dd>Valid in <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7af98547144e0e8d4f878f725ef5c0d611"title="The object is “frozen”. ">kStateFrozen</a> or any preceding state. </dd></dl>
<p>Returns the amount of space that this object will consume when written to a minidump file, in bytes, not including any leading or trailing padding necessary to maintain proper alignment. </p>
<dlclass="section note"><dt>Note</dt><dd>Valid in <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7af98547144e0e8d4f878f725ef5c0d611"title="The object is “frozen”. ">kStateFrozen</a> or any subsequent state. </dd></dl>
<p>Called once an object’s writable file offset is determined, as it transitions into <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7a87483823ca30a8257b2a5fbd21805bcd"title="The object is writable. ">kStateWritable</a>. </p>
<p>Subclasses can override this method if they need to provide additional processing once their writable file offset is known. Typically, this will be done by subclasses that handle certain RVAs themselves instead of using the <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#a686683d78f099a07e2a1df8e6b567d37"title="Registers a file offset pointer as one that should point to the object on which this method is called...">RegisterRVA()</a> interface.</p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramdir">[in]</td><tdclass="paramname">offset</td><td>The file offset at which the object will be written. The value passed to this method will already have been adjusted to meet alignment requirements.</td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><code>true</code> on success. <code>false</code> on error, indicating that the minidump file should not be written.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>Valid in <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7af98547144e0e8d4f878f725ef5c0d611"title="The object is “frozen”. ">kStateFrozen</a>. The object will transition to <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#ac14e05f291f5fa713b5ec82a208fa7c7a87483823ca30a8257b2a5fbd21805bcd"title="The object is writable. ">kStateWritable</a> after this method returns. </dd></dl>
<p>Reimplemented from <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#a2416cb821816b769d95b92e486713ebf">crashpad::internal::MinidumpWritable</a>.</p>
<p>Reimplemented in <aclass="el"href="classcrashpad_1_1test_1_1TestMinidumpMemoryWriter.html#a3764ed18a98d9ea979a7f0494eb19bbf">crashpad::test::TestMinidumpMemoryWriter</a>.</p>
<p>Memory regions are written at the end of minidump files, because it is expected that unlike most other data in a minidump file, the contents of memory regions will be accessed sparsely.</p>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#a009f007265d64a5fb416848480a00ae9a24c2158c529d40ce6badca6e34b26853"title="Objects that are written to a minidump file “late”. ">kPhaseLate</a>.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>Valid in any state. </dd></dl>
<p>Reimplemented from <aclass="el"href="classcrashpad_1_1internal_1_1MinidumpWritable.html#a389b0ac1986698e80ebbc49198676ac7">crashpad::internal::MinidumpWritable</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>minidump/minidump_memory_writer.h</li>
<li>minidump/minidump_memory_writer.cc</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hrclass="footer"/><addressclass="footer"><small>
Generated by  <ahref="http://www.doxygen.org/index.html">