crashpad/doc/generated/doxygen/classcrashpad_1_1ExceptionHandlerServer.html
2016-01-06 16:09:15 -05:00

338 lines
22 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

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.10"/>
<title>Crashpad: crashpad::ExceptionHandlerServer 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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Crashpad
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<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_1ExceptionHandlerServer.html">ExceptionHandlerServer</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcrashpad_1_1ExceptionHandlerServer-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::ExceptionHandlerServer Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Runs the main exception-handling server in Crashpads handler process.
<a href="classcrashpad_1_1ExceptionHandlerServer.html#details">More...</a></p>
<p><code>#include &quot;util/win/exception_handler_server.h&quot;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ExceptionHandlerServer_1_1Delegate.html">Delegate</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:a98dba7a5b210d88d5133cae5a615086d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a98dba7a5b210d88d5133cae5a615086d">ExceptionHandlerServer</a> (base::mac::ScopedMachReceiveRight receive_port, bool launchd)</td></tr>
<tr class="memdesc:a98dba7a5b210d88d5133cae5a615086d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs an <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html" title="Runs the main exception-handling server in Crashpads handler process. ">ExceptionHandlerServer</a> object. <a href="#a98dba7a5b210d88d5133cae5a615086d">More...</a><br /></td></tr>
<tr class="separator:a98dba7a5b210d88d5133cae5a615086d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a348789edd93bcd388ddd38c77230583d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d">Run</a> (<a class="el" href="classcrashpad_1_1UniversalMachExcServer_1_1Interface.html">UniversalMachExcServer::Interface</a> *exception_interface)</td></tr>
<tr class="memdesc:a348789edd93bcd388ddd38c77230583d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs the exception-handling server. <a href="#a348789edd93bcd388ddd38c77230583d">More...</a><br /></td></tr>
<tr class="separator:a348789edd93bcd388ddd38c77230583d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75dd814798b8f8224f53d84cea8368be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a75dd814798b8f8224f53d84cea8368be">Stop</a> ()</td></tr>
<tr class="memdesc:a75dd814798b8f8224f53d84cea8368be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops a running exception-handling server. <a href="#a75dd814798b8f8224f53d84cea8368be">More...</a><br /></td></tr>
<tr class="separator:a75dd814798b8f8224f53d84cea8368be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6493334c96948606db2553cbbc5a2877"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a6493334c96948606db2553cbbc5a2877">ExceptionHandlerServer</a> (bool persistent)</td></tr>
<tr class="memdesc:a6493334c96948606db2553cbbc5a2877"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs the exception handling server. <a href="#a6493334c96948606db2553cbbc5a2877">More...</a><br /></td></tr>
<tr class="separator:a6493334c96948606db2553cbbc5a2877"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7a18e94b43bbe192e37a28638e25a51"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#ab7a18e94b43bbe192e37a28638e25a51">SetPipeName</a> (const std::wstring &amp;pipe_name)</td></tr>
<tr class="memdesc:ab7a18e94b43bbe192e37a28638e25a51"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the pipe name to listen for client registrations on. <a href="#ab7a18e94b43bbe192e37a28638e25a51">More...</a><br /></td></tr>
<tr class="separator:ab7a18e94b43bbe192e37a28638e25a51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47c23e9cf28b76e7d941a6767b019fb4"><td class="memItemLeft" align="right" valign="top">std::wstring&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a47c23e9cf28b76e7d941a6767b019fb4">CreatePipe</a> ()</td></tr>
<tr class="memdesc:a47c23e9cf28b76e7d941a6767b019fb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a randomized pipe name to listen for client registrations on and returns its name. <a href="#a47c23e9cf28b76e7d941a6767b019fb4">More...</a><br /></td></tr>
<tr class="separator:a47c23e9cf28b76e7d941a6767b019fb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ddcf9cff0364e46378ef575ded9a773"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a8ddcf9cff0364e46378ef575ded9a773">Run</a> (<a class="el" href="classcrashpad_1_1ExceptionHandlerServer_1_1Delegate.html">Delegate</a> *delegate)</td></tr>
<tr class="memdesc:a8ddcf9cff0364e46378ef575ded9a773"><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs the exception-handling server. <a href="#a8ddcf9cff0364e46378ef575ded9a773">More...</a><br /></td></tr>
<tr class="separator:a8ddcf9cff0364e46378ef575ded9a773"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75dd814798b8f8224f53d84cea8368be"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a75dd814798b8f8224f53d84cea8368be"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a75dd814798b8f8224f53d84cea8368be">Stop</a> ()</td></tr>
<tr class="memdesc:a75dd814798b8f8224f53d84cea8368be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops the exception-handling server. Returns immediately. The object must not be destroyed until <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d" title="Runs the exception-handling server. ">Run()</a> returns. <br /></td></tr>
<tr class="separator:a75dd814798b8f8224f53d84cea8368be"><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>Runs the main exception-handling server in Crashpads handler process. </p>
<p>Runs the main exception-handling server in Crashpad's handler process. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a98dba7a5b210d88d5133cae5a615086d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">crashpad::ExceptionHandlerServer::ExceptionHandlerServer </td>
<td>(</td>
<td class="paramtype">base::mac::ScopedMachReceiveRight&#160;</td>
<td class="paramname"><em>receive_port</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>launchd</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs an <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html" title="Runs the main exception-handling server in Crashpads handler process. ">ExceptionHandlerServer</a> object. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">receive_port</td><td>The port that exception messages and no-senders notifications will be received on. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">launchd</td><td>If <code>true</code>, the exception handler is being run from launchd. <em>receive_port</em> is not monitored for no-senders notifications, and instead, <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a75dd814798b8f8224f53d84cea8368be" title="Stops a running exception-handling server. ">Stop()</a> must be called to provide a “quit” signal. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a6493334c96948606db2553cbbc5a2877"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">crashpad::ExceptionHandlerServer::ExceptionHandlerServer </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>persistent</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs the exception handling server. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">persistent</td><td><code>true</code> if <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d" title="Runs the exception-handling server. ">Run()</a> should not return until <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a75dd814798b8f8224f53d84cea8368be" title="Stops a running exception-handling server. ">Stop()</a> is called. If <code>false</code>, <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d" title="Runs the exception-handling server. ">Run()</a> will return when all clients have exited, although <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d" title="Runs the exception-handling server. ">Run()</a> will always wait for the first client to connect. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a47c23e9cf28b76e7d941a6767b019fb4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::wstring crashpad::ExceptionHandlerServer::CreatePipe </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a randomized pipe name to listen for client registrations on and returns its name. </p>
<p>Either this method or <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a47c23e9cf28b76e7d941a6767b019fb4" title="Creates a randomized pipe name to listen for client registrations on and returns its name...">CreatePipe()</a>, but not both, must be called before <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d" title="Runs the exception-handling server. ">Run()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>The pipe name that will be listened on. </dd></dl>
</div>
</div>
<a class="anchor" id="a348789edd93bcd388ddd38c77230583d"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void crashpad::ExceptionHandlerServer::Run </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classcrashpad_1_1UniversalMachExcServer_1_1Interface.html">UniversalMachExcServer::Interface</a> *&#160;</td>
<td class="paramname"><em>exception_interface</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Runs the exception-handling server. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">exception_interface</td><td>An object to send exception messages to.</td></tr>
</table>
</dd>
</dl>
<p>This method monitors the receive port for exception messages and, if not being run by launchd, no-senders notifications. It continues running until it has no more clients, indicated by the receipt of a no-senders notification, or until <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a75dd814798b8f8224f53d84cea8368be" title="Stops a running exception-handling server. ">Stop()</a> is called. When not being run by launchd, it is important to assure that a send right exists in a client (or has been queued by <code>mach_msg()</code> to be sent to a client) prior to calling this method, or it will detect that it is sender-less and return immediately.</p>
<p>All exception messages will be passed to <em>exception_interface</em>.</p>
<p>This method must only be called once on an <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html" title="Runs the main exception-handling server in Crashpads handler process. ">ExceptionHandlerServer</a> object.</p>
<p>If an unexpected condition that prevents this method from functioning is encountered, it will log a message and terminate execution. Receipt of an invalid message on the receive port will cause a message to be logged, but this method will continue running normally. </p>
</div>
</div>
<a class="anchor" id="a8ddcf9cff0364e46378ef575ded9a773"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void crashpad::ExceptionHandlerServer::Run </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classcrashpad_1_1ExceptionHandlerServer_1_1Delegate.html">Delegate</a> *&#160;</td>
<td class="paramname"><em>delegate</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Runs the exception-handling server. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">delegate</td><td>The interface to which the exceptions are delegated when they are caught in <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d" title="Runs the exception-handling server. ">Run()</a>. Ownership is not transferred. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ab7a18e94b43bbe192e37a28638e25a51"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void crashpad::ExceptionHandlerServer::SetPipeName </td>
<td>(</td>
<td class="paramtype">const std::wstring &amp;&#160;</td>
<td class="paramname"><em>pipe_name</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the pipe name to listen for client registrations on. </p>
<p>Either this method or <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a47c23e9cf28b76e7d941a6767b019fb4" title="Creates a randomized pipe name to listen for client registrations on and returns its name...">CreatePipe()</a>, but not both, must be called before <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d" title="Runs the exception-handling server. ">Run()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pipe_name</td><td>The name of the pipe to listen on. Must be of the form "\\.\pipe\&lt;some_name&gt;". </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a75dd814798b8f8224f53d84cea8368be"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void crashpad::ExceptionHandlerServer::Stop </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Stops a running exception-handling server. </p>
<p>The normal mode of operation is to call <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a75dd814798b8f8224f53d84cea8368be" title="Stops a running exception-handling server. ">Stop()</a> while <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d" title="Runs the exception-handling server. ">Run()</a> is running. It is expected that <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a75dd814798b8f8224f53d84cea8368be" title="Stops a running exception-handling server. ">Stop()</a> would be called from a signal handler.</p>
<p>If <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a75dd814798b8f8224f53d84cea8368be" title="Stops a running exception-handling server. ">Stop()</a> is called before <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d" title="Runs the exception-handling server. ">Run()</a> it will cause <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d" title="Runs the exception-handling server. ">Run()</a> to return as soon as it is called. It is harmless to call <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a75dd814798b8f8224f53d84cea8368be" title="Stops a running exception-handling server. ">Stop()</a> after <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a348789edd93bcd388ddd38c77230583d" title="Runs the exception-handling server. ">Run()</a> has already returned, or to call <a class="el" href="classcrashpad_1_1ExceptionHandlerServer.html#a75dd814798b8f8224f53d84cea8368be" title="Stops a running exception-handling server. ">Stop()</a> after it has already been called. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>handler/mac/exception_handler_server.h</li>
<li>handler/mac/exception_handler_server.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.10
</small></address>
</body>
</html>