90 lines
4.1 KiB
HTML
90 lines
4.1 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
||
|
<title>How a compiler uses the APIs to generate debug data for ILE
|
||
|
programs</title>
|
||
|
<!-- Begin Header Records ========================================== -->
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<!-- Change History: -->
|
||
|
<!-- YYMMDD USERID Change description -->
|
||
|
<!-- DEBUG1 SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
|
||
|
<!-- at RCHVMW2 on 29 Jan 1999 at 16:05:09 -->
|
||
|
<!-- Restructured for V5R2 ========================================== -->
|
||
|
<!-- End Header Records -->
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<!--Java sync-link-->
|
||
|
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
|
||
|
</script>
|
||
|
|
||
|
|
||
|
|
||
|
<h2>How a compiler uses the APIs to generate debug data for ILE programs</h2>
|
||
|
|
||
|
<p>To enable source-level debugging of ILE programs, view information must be
|
||
|
stored with the compiled program. The ILE compilers use the Create View APIs to
|
||
|
create view information. This information is then available to source-level
|
||
|
debugger applications through the Source Debugger APIs.</p>
|
||
|
|
||
|
<p>The first API that is called is the <a href="QTESTRVC.htm">Start View
|
||
|
Creation</a> (QteStartViewCreation) API, which is used to initialize the debug
|
||
|
view creation environment.</p>
|
||
|
|
||
|
<p>The views being created are described by the <a href="QTEADDVD.htm">Add View
|
||
|
Description</a> (QteAddViewDescription) API. Examples of views created by a
|
||
|
compiler are text views (for example, the input source) and listing views (for
|
||
|
example, a compiler output listing). A parameter passed back by this API is the
|
||
|
view number, which is used by subsequent APIs to identify the view being
|
||
|
processed.</p>
|
||
|
|
||
|
<p>The text of a view comes from files (for example, the input source file to
|
||
|
the compiler) or supplied text (for example, macro expansion text). The
|
||
|
supplied text is stored with the view information in the program object. The
|
||
|
file text is copied at source debugging time when the text is retrieved. Thus,
|
||
|
the view information stored for the file text contains references to the files
|
||
|
containing the text and not the text itself. The files to be used in a view are
|
||
|
described by use of the <a href="QTEADDVF.htm">Add View File</a>
|
||
|
(QteAddViewFile) API.</p>
|
||
|
|
||
|
<p>The <a href="QTEADDVT.htm">Add View Text</a> (QteAddViewText) API is used to
|
||
|
describe how the text for a view is constructed. The view text can be composed
|
||
|
of pieces of text, which are concatenated together when the text is retrieved,
|
||
|
according to the instructions specified through this API.</p>
|
||
|
|
||
|
<p>The <a href="QTEADDVM.htm">Add View Map</a> (QteAddViewMap) API is used to
|
||
|
map positions in one view to positions in another view. This is necessary to be
|
||
|
able to relate positions in one view to equivalent positions in another view.
|
||
|
In some cases a map can be generated automatically without using this API (see
|
||
|
QteAddViewDescription API). Other maps may need to be supplied to allow certain
|
||
|
source debugger functions such as breakpoint processing, in which the
|
||
|
breakpoint parameters are supplied by the system in terms of the statement view
|
||
|
only.</p>
|
||
|
|
||
|
<p>When the view creation processing is complete, a call to the <a href=
|
||
|
"QTEENDVC.htm">End View Creation</a> (QteEndViewCreation) API is required.</p>
|
||
|
|
||
|
<p>To use a Create View API, the application must bind to the service program
|
||
|
QTECRTVS in QSYS. All Create View API functions are then available to the
|
||
|
application.</p>
|
||
|
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center">
|
||
|
<a href="#Top_Of_Page">Top</a> |
|
||
|
<a href="debug1.htm">Debugger APIs</a> |
|
||
|
<a href="aplist.htm">APIs by category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|