Sponsored Content
Full Discussion: #define in perl
Top Forums UNIX for Dummies Questions & Answers #define in perl Post 302143379 by srinivasan_85 on Thursday 1st of November 2007 04:51:22 AM
Old 11-01-2007
Thanx a lot!

@YOGESH => Thanx for the suggestion. But since I don't have permissions to use CPAN modules, I am not able to try it out as well.
@CBKIHONG => Your solution works perfectly. Thanks a lot!
Also, please enlighten me if "\*" is used to get the address of a symbol and "\$" to get the address of a variable.

Since I'm a beginner in perl, my queries might sound frivolous.

Thanks,
Srini
 

8 More Discussions You Might Find Interesting

1. Programming

mysterious #define

in the header file orville.h, outside of the #ifdef #endif , there is the following #define JOB_CONTROL /* support job-control */ As you can see, the JOB_CONTROL macro has no value associated with it. Here is what I go when I ran grep on the entire source code. $ grep -iR... (6 Replies)
Discussion started by: frequency8
6 Replies

2. Shell Programming and Scripting

Define multiple mail recipents in a variable in perl

hi I have a perl script from which I call a shell script and pass mail variable to it. The mail works fine if I give 1 recipient but fails for multiple. conv.pl:- $mialing = "anu\@abc.com" rest.sh $mialing rest.sh mail -s "hi" $1 This works fine But I need to define multiple... (2 Replies)
Discussion started by: infyanurag
2 Replies

3. Programming

#define

Hello, I would like to conditionaly comment in my code source some fields from arrays. So I use the property ## from the #define definition. my code: ... #define slet /##* #define etsl *##/ ... const T_SVT_ADLL_A653_DESC A_DESC = { { slet qwerty etsl SLICING,... (3 Replies)
Discussion started by: cypleen
3 Replies

4. Programming

help with #define in C

if i do this in C #define NUM 1234512345 then how come i cant print it out using int main(int argc, char **argv) { printf("%d\n", NUM); return 0; } well the result is -1219236538, why isnt it 1234512345 ? (7 Replies)
Discussion started by: omega666
7 Replies

5. Programming

#define in c

Hi, I had a head file, looks like #define MIN_NUM 10 #define MAX_NUM 10 is there any way to get "MAX_NUM" from 10? thanks. peter (9 Replies)
Discussion started by: laopi
9 Replies

6. Shell Programming and Scripting

In Perl can i define a hash with value as variable?

Hi, Is it possible in perl to have a hash defined with variables as theirs key values, like: %account = ('username' => 'boy', 'password' => $password); Thanks (1 Reply)
Discussion started by: zing_foru
1 Replies

7. Programming

When to define functions in C?

Hey everyone. So I'm looking at a few C programming resources, and it seems, by convention how you should write and define a function, is first declare it's existence before your main...then call it somewhere in your main, and then define after, at the end of the program? Is this necessary? I mean... (7 Replies)
Discussion started by: Lost in Cyberia
7 Replies

8. Shell Programming and Scripting

Define Variables

Hi, I just define the variable in script and use those script in another script but the variable not recognize. test1.sh #!/bin/bash DB="test_db" USR="test_user" PWD="test_pwd" HST="24.254.87.12" test2.sh #!/bin/bash ./test1.sh mysql -u $USR -p $PWD -h $HST... (2 Replies)
Discussion started by: fspalero
2 Replies
dladdr(3C)																dladdr(3C)

NAME
dladdr() - get the symbolic information for an address SYNOPSIS
[flag]... cfile ... [library]... Multithread Usage This routine is thread-safe. DESCRIPTION
is one of a family of routines that give the user direct access to the dynamic linking facilities (using the option on the compiler or com- mand line). allows a process to obtain information about the symbol that most closely defines a given address. determines whether the specified address is located within one of the load modules (executable or shared libraries) that make up the process' address space. An address is deemed to fall within a load module when it is between the base address at which the load module was mapped and the highest vir- tual address mapped for that load module, inclusive. If a load module fits this criteria, its dynamic symbol table is searched to locate the nearest symbol to the specified address. The nearest symbol is the one whose value is equal to, or closest to but less than the speci- fied address. dlip is a pointer to a structure. The structure must be allocated by the user. The structure members are set by if the specified address falls within one of the load modules. The structure contains the following members: The fields of the structure contain the following: dli_fname Pointer to the filename of the load module containing the address. The contents of this memory location can change between calls to dli_fbase Handle to the load module. This can be used as the first argument to dli_sname Pointer to the name of the nearest symbol to the specified address. This symbol either has the same address, or is the nearest symbol with a lower address. The contents of this memory location can change between calls to dli_saddr Actual address of the nearest symbol. For code symbols, it contains the address of the OPD (Official Plabel Descrip- tor) for the nearest code symbol. dli_size (ELF process only) Size of the nearest symbol as defined in the dynamic symbol table. dli_bind (ELF process only) Binding attribute of the nearest symbol as defined in the dynamic symbol table. The values for this are those used for a symbol's binding in the ELF symbol table (see dli_type Type of the nearest symbol. For ELF process, this is the same as the value for type in the dynamic symbol table. The values for this are those used for a symbol's type in the ELF symbol table (see For SOM process, this can have the value or as defined in RETURN VALUE
If the specified address does not fall within one of the load modules, is returned; the contents of the structure are not modified. Other- wise, a non-zero value is returned and the fields of the structure are set. DIAGNOSTICS
If no symbol is found within the load module containing address whose value is less than or equal to address, the dli_sname, dli_saddr, and dli_size fields are set to the dli_bind field is set to and the dli_type field is set to For only a subset of externally visible symbols are typically exported: specifically those referenced by the load modules with which the is linked. The exact set of exported symbols for any shared library or the can be controlled using the linker (see ld(1)). ERRORS
If fails, a subsequent call to returns one of the following values: Invalid symbol address in load module. Cannot apply relocation in library. Address not found in any load module. Out of memory. failed on entry to or exit from failed on exit from failed on entry to SEE ALSO
cc(1), ld(1), sh(1), exec(2), dlclose(3C), dlerrno(3C), dlerror(3C), dlsym(3C). Texts and Tutorials (See the option) (See manuals(5) for ordering information) dladdr(3C)
All times are GMT -4. The time now is 08:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy