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.
146 lines
6.8 KiB
146 lines
6.8 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: DBG: Debugging using Pin</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">DBG: Debugging using Pin</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:ga2c713045a7c2d43876a2e28b89964717"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DEBUG__API.html#ga2c713045a7c2d43876a2e28b89964717">LEVEL_PINCLIENT::PIN_GetSourceLocation</a> (ADDRINT address, INT32 *column, INT32 *line, std::string *fileName)</td></tr>
|
|
<tr class="separator:ga2c713045a7c2d43876a2e28b89964717"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<p>Access the debug information contained in an elf binary. </p>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="ga2c713045a7c2d43876a2e28b89964717"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ga2c713045a7c2d43876a2e28b89964717">◆ </a></span>PIN_GetSourceLocation()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void LEVEL_PINCLIENT::PIN_GetSourceLocation </td>
|
|
<td>(</td>
|
|
<td class="paramtype">ADDRINT </td>
|
|
<td class="paramname"><em>address</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">INT32 * </td>
|
|
<td class="paramname"><em>column</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">INT32 * </td>
|
|
<td class="paramname"><em>line</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">std::string * </td>
|
|
<td class="paramname"><em>fileName</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Find the line number, file, and column number corresponding to a memory address.</p>
|
|
<p><b>Linux:</b> Compile your program with -g to include line number information. Pin can only read dwarf2 information, which is the default for most modern compilers. Use -gdwarf-2 if you are using gcc 2.96.</p>
|
|
<p><b>macOS*</b>: Compile your program with -g to include line number information. On macOS*, Pin currently understands the default debugging info (stab) generated by gcc. Support for dwarf2 will be added later. With stab, the column number is not available. So, we simply return 0 as the column number. Once we support dwarf2, we would have the column number as well.</p>
|
|
<p><b>Windows:</b> Executable/dll has to have program data base (.pdb) file in order to support this API.</p>
|
|
<p>This function can be used in any thread, including any internal thread spawned by the tool.</p>
|
|
<dl class="section note"><dt>Note</dt><dd>In analysis routines, Client Lock should be obtained before calling this function<br />
|
|
</dd></dl>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The code address to lookup. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">column</td><td>If column is non-zero, *column is set to the column number. Column number 0 indicates that there is no valid column information. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">line</td><td>If line is non-zero, *line is set to the line number. Line number 0 indicates that there is no valid line information. </td></tr>
|
|
<tr><td class="paramdir">[out]</td><td class="paramname">fileName</td><td>If fileName is non-zero, *fileName is set to the file name. Empty string ("") indicates that there is no valid file name information. File names are encoded in UTF8 (a superset of ASCII), this is supported for Linux (only for locales encoded in UTF8) and Windows</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section note"><dt>Note</dt><dd>The pin client lock is obtained during the call of this API.</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>
|
|
</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>
|