home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / wizards / 5661 < prev    next >
Encoding:
Text File  |  1993-01-27  |  1.1 KB  |  27 lines

  1. Organization: Pittsburgh Supercomputing Center, Carnegie Mellon, Pittsburgh, PA
  2. 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+
  3. Newsgroups: comp.unix.wizards
  4. Message-ID: <0fNNaLi00WB2FgoGE3@andrew.cmu.edu>
  5. Date: Tue, 26 Jan 1993 15:05:43 -0500 
  6. From: "Douglas A. Balog" <db6p+@andrew.cmu.edu>
  7. Subject: Accessing the text segment of a process.
  8. Lines: 17
  9.  
  10. Hi,
  11.  I want to have a subroutine that looks at the text segment of a process and
  12. builds a table of what variables and functions are there. So that later on in
  13. the program I can call a function or reference a variable by its name. Kind of
  14. like asking a debugger to run a function.
  15.  
  16. I know of a way to compile the program, run a perl script which calls nm and
  17. then recompile the program. But every time I recompile, I have to do it twice.
  18.  
  19. I also know of a way to popen(nm argv[0]) and find the info that way.
  20.  
  21. I really want to look at the text segment and figure this out.
  22.  
  23. Is this possible ?
  24.  
  25. Thanks for any info,
  26. Doug
  27.