summaryrefslogtreecommitdiff
path: root/fpcdocs/lineinfo.xml
blob: 89f1f7afd71070fa128c4252ee97fafc44e23dd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0" encoding="ISO-8859-1"?>
<fpdoc-descriptions>
<package name="rtl">

<!--
  ====================================================================
    lineinfo
  ====================================================================
-->

<module name="lineinfo">
<short>Return adress line information</short>
<descr>
<p>
The <file>lineinfo</file> provides a routine that reads the debug
information of an executable (if any exists) and returns source code
information about this address. It works with <var>Stabs</var> debug
information. Note that this unit is not thread-safe, and that its
behaviour is undefined if multiple threads try to write a backtrace
at the same time.
</p>
<p>
For DWARF debug information, the <link id="#rtl.lnfodwrf">lnfodwrf</link> 
unit must be used.
</p>
</descr>

<!-- function Visibility: default -->
<element name="GetLineInfo">
<short>Return source line information about an address.</short>
<descr>
<var>GetLineInfo</var> returns source line information about the address
<var>addr</var>. It searches this information in the stabs debugging
information found in the binary: If the file was compiled without debug
information, nothing will be returned. Upon succesful retrieval of the
debug information, <var>True</var> is returned, and the
<var>func</var> parameter is filled with the name of the function in which the address
is located. The <var>source</var> parameter contains the name of the file in
which the function was implemented, and <var>line</var> contains the line
number in the source file for <var>addr</var>.
</descr>
<errors>
If no debug information is found, <var>False</var> is returned.
</errors>
</element>

<!-- function result Visibility: default -->
<element name="GetLineInfo.Result">
<short><var>True</var> if the line information was found, <var>False</var> if not.</short>
</element>

<!-- argument Visibility: default -->
<element name="GetLineInfo.addr">
<short>Address to examine</short>
</element>

<!-- argument Visibility: default -->
<element name="GetLineInfo.func">
<short>Name of function in which <var>Addr</var> resides.</short>
</element>

<!-- argument Visibility: default -->
<element name="GetLineInfo.source">
<short>Source file in which <var>Addr</var> was implemented.</short>
</element>

<!-- argument Visibility: default -->
<element name="GetLineInfo.line">
<short>Line number on which <var>Addr</var> was implemented.</short>
</element>

</module> <!-- lineinfo -->

</package>
</fpdoc-descriptions>