home *** CD-ROM | disk | FTP | other *** search
- Organization: Pittsburgh Supercomputing Center, Carnegie Mellon, Pittsburgh, PA
- Path: sparky!uunet!tcsi.com!iat.holonet.net!news.cerf.net!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!bb3.andrew.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!db6p+
- Newsgroups: comp.unix.wizards
- Message-ID: <0fNNaLi00WB2FgoGE3@andrew.cmu.edu>
- Date: Tue, 26 Jan 1993 15:05:43 -0500
- From: "Douglas A. Balog" <db6p+@andrew.cmu.edu>
- Subject: Accessing the text segment of a process.
- Lines: 17
-
- Hi,
- I want to have a subroutine that looks at the text segment of a process and
- builds a table of what variables and functions are there. So that later on in
- the program I can call a function or reference a variable by its name. Kind of
- like asking a debugger to run a function.
-
- I know of a way to compile the program, run a perl script which calls nm and
- then recompile the program. But every time I recompile, I have to do it twice.
-
- I also know of a way to popen(nm argv[0]) and find the info that way.
-
- I really want to look at the text segment and figure this out.
-
- Is this possible ?
-
- Thanks for any info,
- Doug
-