Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ldlread(3x) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ldclose, ldaclose

ldfcn

ldopen, ldaopen

ldtbindex



LDLREAD(3x,L)               AIX Technical Reference               LDLREAD(3x,L)



-------------------------------------------------------------------------------
ldlread, ldlinit, ldlitem



PURPOSE

Manipulates line number entries of a common object file function.

LIBRARY

Object File Access Routine Library (libld.a)

SYNTAX

#include <stdio.h>
#include <filehdr.h>
#include <linenum.h>
#include <ldfcn.h>
#include <scnhdr.h>
#include <syms.h>

int ldlread (ldptr, fcnindx, linenum, linent)
LDFILE *ldptr;
long fcnindx;
unsigned short linenum;
LINENO *linent;

int ldlinit (ldptr, fcnindx)
LDFILE *ldptr;
long fcnindx;

int ldlitem (ldptr, linenum, linent)
LDFILE *ldptr;
unsigned short linenum;
LINENO *linent;

DESCRIPTION

The ldlread subroutine searches the line number entries of the common object
file currently associated with ldptr.  This subroutine begins its search with
the line number entry for the beginning of a function and confines its search
to the line numbers associated with a single function.  The function is
identified by fcnindx, the index of its entry in the object file symbol table.
The ldlread subroutine reads the entry with the smallest line number equal to
or greater than linenum into the memory beginning at linent.

The ldlinit and ldlitem subroutines together perform exactly the same function
as ldlread.  After an initial call to ldlread or ldlinit, ldlitem may be used
to retrieve a series of line number entries associated with a single function.
The ldlinit subroutine simply locates the line number entries for the function
identified by fcnindx.  The ldlitem subroutine finds and reads the entry with



Processed November 7, 1990       LDLREAD(3x,L)                                1





LDLREAD(3x,L)               AIX Technical Reference               LDLREAD(3x,L)



the smallest line number equal to or greater than linenum into the memory
beginning at linent.

The ldlread, ldlinit, and ldlitem subroutines each return either SUCCESS or
FAILURE.  The ldlread subroutine fails if there are no line number entries in
the object file, if fcnindx does not index a function entry in the symbol
table, or if it finds no line number equal to or greater than linenum.  The
ldlinit subroutine fails if there are no line number entries in the object file
or if fcnindx does not index a function entry in the symbol table.  The ldlitem
subroutine fails if it finds no line number equal to or greater than linenum.

RELATED INFORMATION

In this book:  "ldclose, ldaclose," "ldfcn," "ldopen, ldaopen," and
"ldtbindex."








































Processed November 7, 1990       LDLREAD(3x,L)                                2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026