Sponsored Content
Top Forums Programming Search the symbol table of a child process Post 303034389 by Corona688 on Wednesday 24th of April 2019 11:21:24 AM
Old 04-24-2019
Quote:
Originally Posted by alphakili
Now, I simply do not get: How does that give me access to the symbols of the execve process?
It doesn't. The child is supposed to print its own symbols.

Either that, or you go whole-hog and attach a debugger. Probably much easier to use gdb than build it yourself.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

no symbol table

Hi@all, I try to compile c code on hpux 11.11 pa-risc 2 with gcc (32bit). I compile with the option -g, so that I get the symbol table, but it is not available. Does someone knows something on this? thx (2 Replies)
Discussion started by: Dom_Cyrus
2 Replies

2. Programming

how to view symbol table in unix

hi , How to view the contents of a "c" program symbol table information in unix. (1 Reply)
Discussion started by: saravanan_nitt
1 Replies

3. Linux

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (0 Replies)
Discussion started by: vinod_chitrali
0 Replies

4. Programming

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (2 Replies)
Discussion started by: vinod_chitrali
2 Replies

5. Shell Programming and Scripting

How to make the parent process to wait for the child process

Hi All, I have two ksh script. 1st script calls the 2nd script and the second script calls an 'C' program. I want 1st script to wait until the 'C' program completes. I cant able to get the process id for the 'C' program (child process) to make the 1st script to wait for the second... (7 Replies)
Discussion started by: sennidurai
7 Replies

6. Programming

Symbol table of a C program

Hi, is there any command to see symbol table info. will it show where its allocating memory for varibales golbals & locals and code.(i mean the segments). i read there is a section called read only data segment and this is where initialized data such as strings stores. i have wriiten the... (7 Replies)
Discussion started by: MrUser
7 Replies

7. Shell Programming and Scripting

[KSH/Bash] Starting a parent process from a child process?

Hey all, I need to launch a script from within 2 other scripts that can run independently of the two parent scripts... Im having a hard time doing this, if anyone knows how please let me know. More detail. ScriptA (bash), ScriptB (ksh), ScriptC (bash) ScriptA, launches ScriptB ScirptB,... (7 Replies)
Discussion started by: trey85stang
7 Replies

8. Shell Programming and Scripting

script to get child process for a process

!/bin/sh pid=$(ps -Aj | grep MSTRSvr | grep -v grep | awk '{print $1}') sid=$(ps -Aj | grep MSTRSvr | grep -v grep | awk '{print $3}') ps -s "$sid" I am not able to get the desired output it says process list error if i use watch ps -s "$sid" it considers only the first session id (5 Replies)
Discussion started by: schippada
5 Replies

9. Emergency UNIX and Linux Support

signal between parent process and child process

Hello, everyone. Here's a program: pid_t pid = fork(); if (0 == pid) // child process { execvp ...; } I send a signal (such as SIGINT) to the parent process, the child process receive the signal as well as the parent process. However I don't want to child process to receive the... (7 Replies)
Discussion started by: jackliang
7 Replies

10. Shell Programming and Scripting

forking a child process and kill its parent to show that child process has init() as its parent

Hi everyone i am very new to linux , working on bash shell. I am trying to solve the given problem 1. Create a process and then create children using fork 2. Check the Status of the application for successful running. 3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies
Exporter::Easy(3pm)					User Contributed Perl Documentation				       Exporter::Easy(3pm)

NAME
Exporter::Easy - Takes the drudgery out of Exporting symbols SYNOPSIS
In module YourModule.pm: package YourModule; use Exporter::Easy ( OK => [ '$munge', 'frobnicate' ] # symbols to export on request ); In other files which wish to use YourModule: use ModuleName qw(frobnicate); # import listed symbols frobnicate ($left, $right) # calls YourModule::frobnicate DESCRIPTION
Exporter::Easy makes using Exporter easy. In it's simplest case it allows you to drop the boilerplate code that comes with using Exporter, so require Exporter; use base qw( Exporter ); use vars qw( @EXPORT ); @EXPORT = ( 'init' ); becomes use Exporter::Easy ( EXPORT => [ 'init' ] ); and more complicated situations where you use tags to build lists and more tags become easy, like this use Exporter::Easy ( EXPORT => [qw( init :base )], TAGS => [ base => [qw( open close )], read => [qw( read sysread readline )], write => [qw( print write writeline )], misc => [qw( select flush )], all => [qw( :base :read :write :misc)], no_misc => [qw( :all !:misc )], ], OK => [qw( some other stuff )], ); This will set @EXPORT, @EXPORT_OK, @EXPORT_FAIL and %EXPORT_TAGS in the current package, add Exporter to that package's @ISA and do a "use vars" on all the variables mentioned. The rest is handled as normal by Exporter. HOW TO USE IT
Put use Exporter::Easy ( KEY => value, ...); in your package. Arguments are passes as key-value pairs, the following keys are available TAGS The value should be a reference to a list that goes like (TAG_NAME, TAG_VALUE, TAG_NAME, TAG_VALUE, ...), where TAG_NAME is a string and TAG_VALUE is a reference to an array of symbols and tags. For example TAGS => [ file => [ 'open', 'close', 'read', 'write'], string => [ 'length', 'substr', 'chomp' ], hash => [ 'keys', 'values', 'each' ], all => [ ':file', ':string', ':hash' ], some => [':all', '!open', ':hash'], ] This is used to fill the %EXPORT_TAGS in your package. You can build tags from other tags - in the example above the tag "all" will contain all the symbols from "file", "string" and "hash". You can also subtract symbols and tags - in the example above, "some" contains the symbols from all but with "open" removed and all the symbols from "hash" removed. The rule is that any symbol starting with a ':' is taken to be a tag which has been defined previously (if it's not defined you'll get an error). If a symbol is preceded by a '!' it will be subtracted from the list, otherwise it is added. If you try to redefine a tag you will also get an error. All the symbols which occur while building the tags are automatically added your package's @EXPORT_OK array. OK The value should be a reference to a list of symbols and tags (which will be exapanded). These symbols will be added to the @EXPORT_OK array in your package. Using OK and and OK_ONLY together will give an error. OK_ONLY The value should be a reference to a list of symbols and tags (which will be exapanded). The @EXPORT_OK array in your package will contains only these symbols.. This totally overrides the automatic population of this array. If you just want to add some symbols to the list that Exporter::Easy has automatically built then you should use OK instead. Using OK_ONLY and OK together will give an error. EXPORT The value should be a reference to a list of symbol names and tags. Any tags will be expanded and the resulting list of symbol names will be placed in the @EXPORT array in your package. The tag created by the ALL key is not available at this stage. FAIL The value should be a reference to a list of symbol names and tags. The tags will be expanded and the resulting list of symbol names will be placed in the @EXPORT_FAIL array in your package. They will also be added to the @EXPORT_OK list. ALL The value should be the name of tag that doesn't yet exist. This tag will contain a list of all symbols which can be exported. ISA If you set this to 0 then Exporter will not be added to your @ISA list. VARS If this is set to 1 or not provided then all $, @ and % variables mentioned previously will be available to use in your package as if you had done a "use vars" on them. If it's set to a reference to a list of symbols and tags then only those symbols will be available. If it's set to 0 then you'll have to do your own "use vars" in your package. PROCESSING ORDER
We need take the information provided and build @EXPORT, @EXPORT_OK, @EXPORT_FAIL and %EXPORT_TAGS in the calling package. We may also need to build a tag with all of the symbols and to make all the variables useable under strict. The arguments are processed in the following order: TAGS, EXPORT, OK, OK_ONLY and FAIL, ALL, VARS and finally ISA. This means you cannot use the tag created by ALL anywhere except in VARS (although vars defaults to using all symbols anyway). SEE ALSO
For details on what all these arrays and hashes actually do, see the Exporter documentation. AUTHOR
Written by Fergal Daly <fergal@esatclear.ie>. LICENSE
Under the same license as Perl itself perl v5.12.4 2004-07-24 Exporter::Easy(3pm)
All times are GMT -4. The time now is 01:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy