ldlread(3) CLIX ldlread(3)
NAME
ldlread, ldlinit, ldlitem - Manipulates line number entries of a common
object file function
LIBRARY
COFF Object File Manipulation Library (libld.a)
SYNOPSIS
#include <stdio.h>
#include <filehdr.h>
#include <linenum.h>
#include <ldfcn.h>
#include "INCDIR/filehdr.h"
#include "INCDIR/linenum.h"
#include "INCDIR/ldfcn.h"
int ldlread(
LDFILE ldptr ,
long fcnindx ,
unsigned short linenum ,
LINENO *linent) );
int ldlinit(
LDFILE *ldptr ,
long fcnindx );
int ldlitem(
LDFILE *ldptr ,
unsigned short linenum ,
LINENO *linent );
DESCRIPTION
The ldlread() function searches the line number entries of the common
object file currently associated with ldptr. The ldlread() function
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() function reads the
entry with the smallest line number equal to or greater than linenum into
the memory beginning at linent.
2/94 - Intergraph Corporation 1
ldlread(3) CLIX ldlread(3)
The functions ldlinit() and ldlitem() 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() function simply locates
the line number entries for the function identified by fcnindx. The
ldlitem() function finds and reads the entry with the smallest line number
equal to or greater than linenum into the memory beginning at linent.
The functions ldlread(), ldlinit(), and ldlitem() each return either
SUCCESS or FAILURE. The ldlread() function 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() function fails if there are no line
number entries in the object file or if the fcnindx parameter does not
index a function entry in the symbol table. The ldlitem function fails if
it finds no line number equal to or greater than linenum.
The programs must be loaded with the object file access function library
libld.a.
INCDIR is the standard directory list for #include files, usually
/usr/include. LIBDIR is the set of standard library files, usually /lib.
RELATED INFORMATION
Functions: ldclose(3), ldopen(3), ldtbindex(3),
Files: ldfcn(0)
2 Intergraph Corporation - 2/94