crashpad/doc/generated/doxygen/classcrashpad_1_1CrashpadClient.html
2015-11-06 18:57:04 -05:00

435 lines
31 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>Crashpad: crashpad::CrashpadClient Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Crashpad
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacecrashpad.html">crashpad</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1CrashpadClient.html">CrashpadClient</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classcrashpad_1_1CrashpadClient-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::CrashpadClient Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>The primary interface for an application to have Crashpad monitor it for crashes.
<a href="classcrashpad_1_1CrashpadClient.html#details">More...</a></p>
<p><code>#include &quot;client/crashpad_client.h&quot;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ade0f63025116ed4ac3d89b598c9e7e49"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashpadClient.html#ade0f63025116ed4ac3d89b598c9e7e49">StartHandler</a> (const base::FilePath &amp;handler, const base::FilePath &amp;database, const std::string &amp;url, const std::map&lt; std::string, std::string &gt; &amp;annotations, const std::vector&lt; std::string &gt; &amp;arguments, bool restartable)</td></tr>
<tr class="memdesc:ade0f63025116ed4ac3d89b598c9e7e49"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts a Crashpad handler process, performing any necessary handshake to configure it. <a href="#ade0f63025116ed4ac3d89b598c9e7e49">More...</a><br /></td></tr>
<tr class="separator:ade0f63025116ed4ac3d89b598c9e7e49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89f34445eca859e6c0d1876e8e171c25"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashpadClient.html#a89f34445eca859e6c0d1876e8e171c25">SetHandlerMachService</a> (const std::string &amp;service_name)</td></tr>
<tr class="memdesc:a89f34445eca859e6c0d1876e8e171c25"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the process crash handler to a Mach service registered with the bootstrap server. <a href="#a89f34445eca859e6c0d1876e8e171c25">More...</a><br /></td></tr>
<tr class="separator:a89f34445eca859e6c0d1876e8e171c25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a386bfb3704cadbfae7e684f5e569b5e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashpadClient.html#a386bfb3704cadbfae7e684f5e569b5e6">SetHandlerMachPort</a> (base::mac::ScopedMachSendRight exception_port)</td></tr>
<tr class="memdesc:a386bfb3704cadbfae7e684f5e569b5e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the process crash handler to a Mach port. <a href="#a386bfb3704cadbfae7e684f5e569b5e6">More...</a><br /></td></tr>
<tr class="separator:a386bfb3704cadbfae7e684f5e569b5e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f1d5d38e9b4f5781e3821551dcc39d5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashpadClient.html#a9f1d5d38e9b4f5781e3821551dcc39d5">SetHandlerIPCPipe</a> (const std::wstring &amp;ipc_pipe)</td></tr>
<tr class="memdesc:a9f1d5d38e9b4f5781e3821551dcc39d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the IPC pipe of a presumably-running Crashpad handler process which was started with <a class="el" href="classcrashpad_1_1CrashpadClient.html#ade0f63025116ed4ac3d89b598c9e7e49" title="Starts a Crashpad handler process, performing any necessary handshake to configure it...">StartHandler()</a> or by other compatible means and does an IPC message exchange to register this process with the handler. However, just like <a class="el" href="classcrashpad_1_1CrashpadClient.html#ade0f63025116ed4ac3d89b598c9e7e49" title="Starts a Crashpad handler process, performing any necessary handshake to configure it...">StartHandler()</a>, crashes are not serviced until <a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e" title="Configures the process to direct its crashes to a Crashpad handler. ">UseHandler()</a> is called. <a href="#a9f1d5d38e9b4f5781e3821551dcc39d5">More...</a><br /></td></tr>
<tr class="separator:a9f1d5d38e9b4f5781e3821551dcc39d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af65cb31a1de191f1403c99c11e5cd855"><td class="memItemLeft" align="right" valign="top">std::wstring&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashpadClient.html#af65cb31a1de191f1403c99c11e5cd855">GetHandlerIPCPipe</a> () const </td></tr>
<tr class="memdesc:af65cb31a1de191f1403c99c11e5cd855"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the IPC pipe name used to register with the Crashpad handler. <a href="#af65cb31a1de191f1403c99c11e5cd855">More...</a><br /></td></tr>
<tr class="separator:af65cb31a1de191f1403c99c11e5cd855"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58476a5f7a1910ad67ba2bce69ead38e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e">UseHandler</a> ()</td></tr>
<tr class="memdesc:a58476a5f7a1910ad67ba2bce69ead38e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the process to direct its crashes to a Crashpad handler. <a href="#a58476a5f7a1910ad67ba2bce69ead38e">More...</a><br /></td></tr>
<tr class="separator:a58476a5f7a1910ad67ba2bce69ead38e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a8ac211aa3a8cf278eb10f4058a7776fb"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashpadClient.html#a8ac211aa3a8cf278eb10f4058a7776fb">DumpWithoutCrash</a> (const CONTEXT &amp;context)</td></tr>
<tr class="memdesc:a8ac211aa3a8cf278eb10f4058a7776fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Requests that the handler capture a dump even though there hasn't been a crash. <a href="#a8ac211aa3a8cf278eb10f4058a7776fb">More...</a><br /></td></tr>
<tr class="separator:a8ac211aa3a8cf278eb10f4058a7776fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87d1fa142b0bf7094fc66fef3135a64a"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashpadClient.html#a87d1fa142b0bf7094fc66fef3135a64a">DumpAndCrash</a> (EXCEPTION_POINTERS *exception_pointers)</td></tr>
<tr class="memdesc:a87d1fa142b0bf7094fc66fef3135a64a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Requests that the handler capture a dump using the given <em>exception_pointers</em> to get the <code>EXCEPTION_RECORD</code> and <code>CONTEXT</code>. <a href="#a87d1fa142b0bf7094fc66fef3135a64a">More...</a><br /></td></tr>
<tr class="separator:a87d1fa142b0bf7094fc66fef3135a64a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a6a1e62d90a67db782664b1fe5a952f"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1CrashpadClient.html#a1a6a1e62d90a67db782664b1fe5a952f">UseSystemDefaultHandler</a> ()</td></tr>
<tr class="memdesc:a1a6a1e62d90a67db782664b1fe5a952f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures the process to direct its crashes to the default handler for the operating system. <a href="#a1a6a1e62d90a67db782664b1fe5a952f">More...</a><br /></td></tr>
<tr class="separator:a1a6a1e62d90a67db782664b1fe5a952f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The primary interface for an application to have Crashpad monitor it for crashes. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a87d1fa142b0bf7094fc66fef3135a64a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void crashpad::CrashpadClient::DumpAndCrash </td>
<td>(</td>
<td class="paramtype">EXCEPTION_POINTERS *&#160;</td>
<td class="paramname"><em>exception_pointers</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Requests that the handler capture a dump using the given <em>exception_pointers</em> to get the <code>EXCEPTION_RECORD</code> and <code>CONTEXT</code>. </p>
<p>This function is not necessary in general usage as an unhandled exception filter is installed by <a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e" title="Configures the process to direct its crashes to a Crashpad handler. ">UseHandler()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">exception_pointers</td><td>An <code>EXCEPTION_POINTERS</code>, as would generally passed to an unhandled exception filter. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a8ac211aa3a8cf278eb10f4058a7776fb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void crashpad::CrashpadClient::DumpWithoutCrash </td>
<td>(</td>
<td class="paramtype">const CONTEXT &amp;&#160;</td>
<td class="paramname"><em>context</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Requests that the handler capture a dump even though there hasn't been a crash. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">context</td><td>A <code>CONTEXT</code>, generally captured by <a class="el" href="namespacecrashpad.html#ac25486c6b4c38fc7c7868e978094edcf" title="Saves the CPU context. ">CaptureContext()</a> or similar. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="af65cb31a1de191f1403c99c11e5cd855"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::wstring crashpad::CrashpadClient::GetHandlerIPCPipe </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves the IPC pipe name used to register with the Crashpad handler. </p>
<p>This method retrieves the IPC pipe name set by <a class="el" href="classcrashpad_1_1CrashpadClient.html#a9f1d5d38e9b4f5781e3821551dcc39d5" title="Sets the IPC pipe of a presumably-running Crashpad handler process which was started with StartHandle...">SetHandlerIPCPipe()</a>, or a suitable IPC pipe name chosen by <a class="el" href="classcrashpad_1_1CrashpadClient.html#ade0f63025116ed4ac3d89b598c9e7e49" title="Starts a Crashpad handler process, performing any necessary handshake to configure it...">StartHandler()</a>. It is intended to be used to obtain the IPC pipe name so that it may be passed to other processes, so that they may register with an existing Crashpad handler by calling <a class="el" href="classcrashpad_1_1CrashpadClient.html#a9f1d5d38e9b4f5781e3821551dcc39d5" title="Sets the IPC pipe of a presumably-running Crashpad handler process which was started with StartHandle...">SetHandlerIPCPipe()</a>.</p>
<p>This method is only defined on Windows.</p>
<dl class="section return"><dt>Returns</dt><dd>The full name of the crash handler IPC pipe, a string of the form <code>&quot;\\.\pipe\NAME&quot;</code>. </dd></dl>
</div>
</div>
<a class="anchor" id="a9f1d5d38e9b4f5781e3821551dcc39d5"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool crashpad::CrashpadClient::SetHandlerIPCPipe </td>
<td>(</td>
<td class="paramtype">const std::wstring &amp;&#160;</td>
<td class="paramname"><em>ipc_pipe</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the IPC pipe of a presumably-running Crashpad handler process which was started with <a class="el" href="classcrashpad_1_1CrashpadClient.html#ade0f63025116ed4ac3d89b598c9e7e49" title="Starts a Crashpad handler process, performing any necessary handshake to configure it...">StartHandler()</a> or by other compatible means and does an IPC message exchange to register this process with the handler. However, just like <a class="el" href="classcrashpad_1_1CrashpadClient.html#ade0f63025116ed4ac3d89b598c9e7e49" title="Starts a Crashpad handler process, performing any necessary handshake to configure it...">StartHandler()</a>, crashes are not serviced until <a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e" title="Configures the process to direct its crashes to a Crashpad handler. ">UseHandler()</a> is called. </p>
<p>This method is only defined on Windows.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ipc_pipe</td><td>The full name of the crash handler IPC pipe. This is a string of the form <code>&quot;\\.\pipe\NAME&quot;</code>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success and <code>false</code> on failure. </dd></dl>
</div>
</div>
<a class="anchor" id="a386bfb3704cadbfae7e684f5e569b5e6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void crashpad::CrashpadClient::SetHandlerMachPort </td>
<td>(</td>
<td class="paramtype">base::mac::ScopedMachSendRight&#160;</td>
<td class="paramname"><em>exception_port</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the process crash handler to a Mach port. </p>
<p>This method does not actually direct any crashes to the Crashpad handler, because there are alternative ways to start or use an existing Crashpad handler. To begin directing crashes to the handler set by this method, call <a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e" title="Configures the process to direct its crashes to a Crashpad handler. ">UseHandler()</a> after this method.</p>
<p>This method is only defined on OS X.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">exception_port</td><td>An <code>exception_port_t</code> corresponding to a Crashpad exception handler service. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a89f34445eca859e6c0d1876e8e171c25"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool crashpad::CrashpadClient::SetHandlerMachService </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>service_name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the process crash handler to a Mach service registered with the bootstrap server. </p>
<p>This method does not actually direct any crashes to the Crashpad handler, because there are alternative ways to start or use an existing Crashpad handler. To begin directing crashes to the handler set by this method, call <a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e" title="Configures the process to direct its crashes to a Crashpad handler. ">UseHandler()</a> after this method returns successfully.</p>
<p>This method is only defined on OS X.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">service_name</td><td>The service name of a Crashpad exception handler service previously registered with the bootstrap server.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, <code>false</code> on failure with a message logged. </dd></dl>
</div>
</div>
<a class="anchor" id="ade0f63025116ed4ac3d89b598c9e7e49"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool crashpad::CrashpadClient::StartHandler </td>
<td>(</td>
<td class="paramtype">const base::FilePath &amp;&#160;</td>
<td class="paramname"><em>handler</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const base::FilePath &amp;&#160;</td>
<td class="paramname"><em>database</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>url</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::map&lt; std::string, std::string &gt; &amp;&#160;</td>
<td class="paramname"><em>annotations</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;&#160;</td>
<td class="paramname"><em>arguments</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>restartable</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Starts a Crashpad handler process, performing any necessary handshake to configure it. </p>
<p>This method does not actually direct any crashes to the Crashpad handler, because there are alternative ways to use an existing Crashpad handler. To begin directing crashes to the handler started by this method, call <a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e" title="Configures the process to direct its crashes to a Crashpad handler. ">UseHandler()</a> after this method returns successfully.</p>
<p>On Mac OS X, this method starts a Crashpad handler and obtains a Mach send right corresponding to a receive right held by the handler process. The handler process runs an exception server on this port.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">handler</td><td>The path to a Crashpad handler executable. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">database</td><td>The path to a Crashpad database. The handler will be started with this path as its <code>--database</code> argument. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">url</td><td>The URL of an upload server. The handler will be started with this URL as its <code>--url</code> argument. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">annotations</td><td>Process annotations to set in each crash report. The handler will be started with an <code>--annotation</code> argument for each element in this map. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">arguments</td><td>Additional arguments to pass to the Crashpad handler. Arguments passed in other parameters and arguments required to perform the handshake are the responsibility of this method, and must not be specified in this parameter. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">restartable</td><td>If <code>true</code>, the handler will be restarted if it dies, if this behavior is supported. This option is not available on all platforms, and does not function on all OS versions. If it is not supported, it will be ignored.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, <code>false</code> on failure with a message logged. </dd></dl>
</div>
</div>
<a class="anchor" id="a58476a5f7a1910ad67ba2bce69ead38e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool crashpad::CrashpadClient::UseHandler </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Configures the process to direct its crashes to a Crashpad handler. </p>
<p>The Crashpad handler must previously have been started by <a class="el" href="classcrashpad_1_1CrashpadClient.html#ade0f63025116ed4ac3d89b598c9e7e49" title="Starts a Crashpad handler process, performing any necessary handshake to configure it...">StartHandler()</a> or configured by <a class="el" href="classcrashpad_1_1CrashpadClient.html#a89f34445eca859e6c0d1876e8e171c25" title="Sets the process crash handler to a Mach service registered with the bootstrap server. ">SetHandlerMachService()</a>, <a class="el" href="classcrashpad_1_1CrashpadClient.html#a386bfb3704cadbfae7e684f5e569b5e6" title="Sets the process crash handler to a Mach port. ">SetHandlerMachPort()</a>, or <a class="el" href="classcrashpad_1_1CrashpadClient.html#a9f1d5d38e9b4f5781e3821551dcc39d5" title="Sets the IPC pipe of a presumably-running Crashpad handler process which was started with StartHandle...">SetHandlerIPCPipe()</a>.</p>
<p>On Mac OS X, this method sets the tasks exception port for <code>EXC_CRASH</code>, <code>EXC_RESOURCE</code>, and <code>EXC_GUARD</code> exceptions to the Mach send right obtained by <a class="el" href="classcrashpad_1_1CrashpadClient.html#ade0f63025116ed4ac3d89b598c9e7e49" title="Starts a Crashpad handler process, performing any necessary handshake to configure it...">StartHandler()</a>. The handler will be installed with behavior <code>EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES</code> and thread state flavor <code>MACHINE_THREAD_STATE</code>. Exception ports are inherited, so a Crashpad handler chosen by <a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e" title="Configures the process to direct its crashes to a Crashpad handler. ">UseHandler()</a> will remain the handler for any child processes created after <a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e" title="Configures the process to direct its crashes to a Crashpad handler. ">UseHandler()</a> is called. Child processes do not need to call <a class="el" href="classcrashpad_1_1CrashpadClient.html#ade0f63025116ed4ac3d89b598c9e7e49" title="Starts a Crashpad handler process, performing any necessary handshake to configure it...">StartHandler()</a> or <a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e" title="Configures the process to direct its crashes to a Crashpad handler. ">UseHandler()</a> or be aware of Crashpad in any way. The Crashpad handler will receive crashes from child processes that have inherited it as their exception handler even after the process that called <a class="el" href="classcrashpad_1_1CrashpadClient.html#ade0f63025116ed4ac3d89b598c9e7e49" title="Starts a Crashpad handler process, performing any necessary handshake to configure it...">StartHandler()</a> exits.</p>
<p>On Windows, this method sets the unhandled exception handler to a local function that when reached will "signal and wait" for the crash handler process to create the dump.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, <code>false</code> on failure with a message logged. </dd></dl>
</div>
</div>
<a class="anchor" id="a1a6a1e62d90a67db782664b1fe5a952f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void crashpad::CrashpadClient::UseSystemDefaultHandler </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Configures the process to direct its crashes to the default handler for the operating system. </p>
<p>On OS X, this sets the tasks exception port as in <a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e" title="Configures the process to direct its crashes to a Crashpad handler. ">UseHandler()</a>, but the exception handler used is obtained from <a class="el" href="namespacecrashpad.html#a47204f3a62646651e8f393cac2a6316b" title="Obtains the systems default Mach exception handler for crash-type exceptions. ">SystemCrashReporterHandler()</a>. If the systems crash reporter handler cannot be determined or set, the tasks exception ports for crash-type exceptions are cleared.</p>
<p>Use of this function is strongly discouraged.</p>
<dl class="section warning"><dt>Warning</dt><dd>After a call to this function, Crashpad will no longer monitor the process for crashes until a subsequent call to <a class="el" href="classcrashpad_1_1CrashpadClient.html#a58476a5f7a1910ad67ba2bce69ead38e" title="Configures the process to direct its crashes to a Crashpad handler. ">UseHandler()</a>.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This is provided as a static function to allow it to be used in situations where a <a class="el" href="classcrashpad_1_1CrashpadClient.html" title="The primary interface for an application to have Crashpad monitor it for crashes. ...">CrashpadClient</a> object is not otherwise available. This may be useful when a child process inherits its parents Crashpad handler, but wants to sever this tie. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>client/crashpad_client.h</li>
<li>client/crashpad_client_mac.cc</li>
<li>client/crashpad_client_win.cc</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>