ldlread(3x)ldlread(3x)Name
ldlread, ldlinit, ldlitem - manipulate line number entries of a common object file function
Syntax
#include <stdio.h>
#include <filehdr.h>
#include <syms.h>
#include <ldfcn.h>
int ldlread (ldptr, fcnindx, linenum, linent)
LDFILE *ldptr;
long fcnindx;
unsigned short linenum;
LINER linent;
int ldlinit (ldptr, fcnindx)
LDFILE *ldptr;
long fcnindx;
int ldlitem (ldptr, linenum, linent)
LDFILE *ldptr;
unsigned short linenum;
LINER linent;
Description
The function searches the line number entries of the common object file currently associated with ldptr. The 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, which is the index of its local symbols entry in the object file symbol table. The function reads
the entry with the smallest line number equal to or greater than linenum into linent.
The and functions provide the same behavior as After an initial call to or can be used to retrieve a series of line number entries associ-
ated with a single function. The function simply finds the line number entries for the function identified by fcnindx. The function finds
and reads the entry with the smallest line number equal to or greater than linenum into linent.
The functions and each return either success or failure. The function fails if one of the following occurs:
o If line number entries do not exist in the object file.
o If fcnindx does not index a function entry in the symbol table.
o If it does not find a line number equal to or greater than linenum.
The fails if it does not find a line number equal to or greater than linenum.
See Alsoldclose(3x), ldopen(3x), ldtbindex(3x), ldfcn(5)
RISC ldlread(3x)
Check Out this Related Man Page
ldclose(3x)ldclose(3x)Name
ldclose, ldaclose - close a common object file
Syntax
#include <stdio.h>
#include <filehdr.h>
#include <syms.h>
#include <ldfcn.h>
int ldclose (ldptr)
LDFILE *ldptr;
int ldaclose (ldptr)
LDFILE *ldptr;
Description
The and functions provide uniform access to simple object files and object files that are members of archive files. An archive of common
object files can be processed as if it is a series of simple common object files.
If TYPE(ldptr) does not represent an archive file, closes the file and frees the memory allocated to the LDFILE structure associated with
ldptr. If TYPE(ldptr) is the magic number for an archive file and if archive has more files, reinitializes OFFSET(ldptr) to the file
address of the next archive member and returns failure. The LDFILE structure is prepared for a later In all other cases, returns success.
The function closes the file and frees the memory allocated to the LDFILE structure associated with ldptr regardless of the value of
TYPE(ldptr). The function always returns success. This function is often used with
See Alsofclose(3s), intro(3x)ldopen(3x), ldfcn(5), paths.h(4)
RISC ldclose(3x)
Heres a script i wrote as a bit of practise. What it does is insert a line in the middle of a file. The line being $1 and the file being $2
#!/bin/bash
rm tempfile
touch tempfile
count=1
linenum= `wc -l < $2`
if
then
echo $1 >> $2
else
even=`expr "$linenum" % 2`
if
then... (3 Replies)
I have a huge file and every paragraph has a date. But I want to retrieve the paras for the last two days only. So I can grep and findout the linenum for the first line since yesterday. Now I want to display everything after that line. And I am trying to do this inside a script so the linenum is a... (4 Replies)
im working a a perl script for a class and i need to call a file and print it out with line numbers.
i need help with this line with what to put in the capitalized words
SYNTAX ($LINEEQUALITY OPERATOR<MY_FILE>){
also should i replace MY_FILE with a different syntax or will that work?
... (5 Replies)
Hi Experts,
Please let me know how to below situation:
Looking for:
sed "${linenum}d" $filename > $filename _Without_7C
Working Command:
sed "${linenum}d" A020820122200.tis2webGMNA001_GDS_DIDOut.txt > A020820122200.tis2webGMNA001_GDS_DIDOut.txt_Without_7C
appriciate if you can... (7 Replies)
I have to compare 2 files which means 2 files with common entries in same column and separate those common entries in a diferent file as well right before those entries common so that I can separat common and Uncommon entries in rows in 2 different files. Is it possible
For eg.
one file
... (3 Replies)
I am looking at a log file which just tells me the filename and the line number inside that file that has the Error. What I am interested is knowing the encapsulating function. For example, here are the contents of the log file
Error: foo.file on line wxy
Error: foo.file... (3 Replies)