DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

ldlread(S)


ldlread, ldlinit, ldlitem -- manipulate line number entries of a common object file function

Syntax

cc . . . -lld

#include  <filehdr.h>
#include  <linenum.h>
#include  <ldfcn.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

ldlread- begins its search with the line number

ldlinit- reads the entry with the smallest line number

ldlitem- retrieves a series of line number entries

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.

The ldlinit and ldlitem functions 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. ldlinit simply locates the line number entries for the function identified by fcnindx. ldlitem finds and reads the entry with the smallest line number equal to or greater than linenum into the memory beginning at linent.

The ldlread, ldlinit, and ldlitem functions each return either SUCCESS or FAILURE. ldlread 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. ldlinit 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. ldlitem fails if it finds no line number equal to or greater than linenum.

The programs must be loaded with the object file access routine library libld.a.

See also

ldfcn(FP), ldlseek(S), ldrseek(S), ldtbindex(S)

Standards conformance

ldlread, ldlinit and ldlitem are not part of any currently supported standard; they are an extension of AT&T System V provided by the Santa Cruz Operation.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003