You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
175 lines
8.9 KiB
175 lines
8.9 KiB
<!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.13"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Pin: Pin Process API</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>
|
|
<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">Pin
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.13 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<!-- 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 class="header">
|
|
<div class="summary">
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">Pin Process API</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:gacca02e5ee771570c8d255506692a63ae"><td class="memItemLeft" align="right" valign="top">NORETURN VOID </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS__API.html#gacca02e5ee771570c8d255506692a63ae">LEVEL_PINCLIENT::PIN_ExitProcess</a> (INT32 exitCode)</td></tr>
|
|
<tr class="separator:gacca02e5ee771570c8d255506692a63ae"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ga4bf5a4a357a5829228abf26faa03604b"><td class="memItemLeft" align="right" valign="top">INT </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS__API.html#ga4bf5a4a357a5829228abf26faa03604b">LEVEL_PINCLIENT::PIN_GetPid</a> ()</td></tr>
|
|
<tr class="separator:ga4bf5a4a357a5829228abf26faa03604b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:gaca18852e033c5cefb830bb74b24bbb41"><td class="memItemLeft" align="right" valign="top">NORETURN VOID </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PIN__PROCESS__API.html#gaca18852e033c5cefb830bb74b24bbb41">LEVEL_PINCLIENT::PIN_ExitApplication</a> (INT32 status)</td></tr>
|
|
<tr class="separator:gaca18852e033c5cefb830bb74b24bbb41"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<p>These APIs provide information about the instrumented process. They are available in any thread, including any internal thread spawned by the tool. </p>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="gaca18852e033c5cefb830bb74b24bbb41"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gaca18852e033c5cefb830bb74b24bbb41">◆ </a></span>PIN_ExitApplication()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NORETURN VOID LEVEL_PINCLIENT::PIN_ExitApplication </td>
|
|
<td>(</td>
|
|
<td class="paramtype">INT32 </td>
|
|
<td class="paramname"><em>status</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Terminate the current process after calling the relevant thread and process exit callbacks. This call behaves "as if" the application process itself had executed a process termination system call. It therefore <em>does</em> perform all the finalization actions Pin normally takes on application process exit, including calling registered thread and process fini-functions, unlike <a class="el" href="group__PIN__PROCESS__API.html#gacca02e5ee771570c8d255506692a63ae">PIN_ExitProcess</a>, which exits immediately.</p>
|
|
<p>This API may be called from an instrumentation callback function or an analysis routine. However, it should not be called from any <a class="el" href="group__PIN__CONTROL.html#gaba48bfb240e26cdcb7829cae9d3ed779">FINI_CALLBACK</a> or <a class="el" href="group__PIN__CONTROL.html#gaa56617d8763d8e0f90db638d7bf6bd39">THREAD_FINI_CALLBACK</a> routines. It may be called by an application thread or a tool internal thread (that was created via <a class="el" href="group__PIN__THREAD__API.html#gae5a4c5a6aa259ee6d89e856d5060b1f8">PIN_SpawnInternalThread</a>).</p>
|
|
<p>Be aware, that when called from an internal thread, the calling thread will not exit until after the tool's fini callbacks return. Therefore, to avoid deadlock, your fini callbacks should not wait for that internal thread to exit.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">status</td><td>The result argument to exit </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>This function does not return.</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd>The vm and pin client locks are obtained during the call of this API.</dd></dl>
|
|
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT<br />
|
|
<b>O/S</b>: Linux,Windows,BSD<br />
|
|
<b>CPU:</b> All<br />
|
|
</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="gacca02e5ee771570c8d255506692a63ae"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#gacca02e5ee771570c8d255506692a63ae">◆ </a></span>PIN_ExitProcess()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">NORETURN VOID LEVEL_PINCLIENT::PIN_ExitProcess </td>
|
|
<td>(</td>
|
|
<td class="paramtype">INT32 </td>
|
|
<td class="paramname"><em>exitCode</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Terminate the current process immediately, without calling any thread or process fini callbacks that may be registered. (See <a class="el" href="group__PIN__PROCESS__API.html#gaca18852e033c5cefb830bb74b24bbb41">PIN_ExitApplication</a>, if you want fini callbacks to be called).</p>
|
|
<p>This function should be used only for abnormal termination of the instrumented process. Normally, the process is terminated when Pin executes a process termination system call on behalf of the application.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">exitCode</td><td>exit code of the process to be reported to the operating system. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>the function never returns.</dd></dl>
|
|
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT & Probe<br />
|
|
<b>O/S</b>: Linux, Windows & macOS*<br />
|
|
<b>CPU:</b> All<br />
|
|
</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ga4bf5a4a357a5829228abf26faa03604b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga4bf5a4a357a5829228abf26faa03604b">◆ </a></span>PIN_GetPid()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">INT LEVEL_PINCLIENT::PIN_GetPid </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Returns current process id</p>
|
|
<dl class="section user"><dt>Availability:</dt><dd><b>Mode:</b> JIT & Probe<br />
|
|
<b>O/S</b>: Linux, Windows & macOS*<br />
|
|
<b>CPU:</b> All<br />
|
|
</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.13
|
|
</small></address>
|
|
</body>
|
|
</html>
|