home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / aix / 9565 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  2.4 KB

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime.austin.ibm.com!yogi.austin.ibm.com!marc
  2. From: marc@yogi.austin.ibm.com (Marc J. Stephenson)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: Core File Question- Who created it?
  5. Message-ID: <1992Sep8.143420.21935@awdprime.austin.ibm.com>
  6. Date: 8 Sep 92 14:34:20 GMT
  7. References: <22064@nntp_server.ems.cdc.com> <rob.715618443@cod.csi.on.ca>
  8. Sender: news@awdprime.austin.ibm.com (USENET News)
  9. Distribution: usa
  10. Organization: IBM, Austin
  11. Lines: 40
  12.  
  13. In article <rob.715618443@cod.csi.on.ca> rob@csi.on.ca (Rob McAteer) writes:
  14. >bguest@ateam.ems.cdc.com (Brandon Guest) writes:
  15. >
  16. >>    Given a core file, how can I figure out what object file created it?
  17. >>Any help would be greatly appreciated.  Email replies okay.
  18. >AIX provides a command 'crash' that can provice some cryptic clues about
  19. >a core dump (I don't know if it is "universal").
  20. >-- 
  21. >Rob McAteer                                   CAnet: rob@csi.on.ca
  22. >Carp Systems International                    Voice: (613) 592-5780
  23. >600 Terry Fox Drive, Suite 200                  Fax: (613) 592-0584
  24. >Kanata, Ontario, Canada     K2L 4B6
  25.  
  26. crash is useful for looking at system dumps; not core dumps.
  27.  
  28. There are lots of ways to look at the core file to determine who dumped core -
  29. my favorite is to run dbx on anything.  dbx will identify the name of the 
  30. program which dumped (unless the program matches the core file).  One 
  31. example of an implementation:
  32.  
  33. $ ls
  34. core
  35. $ echo q | dbx -q /etc/motd
  36. Core file program (hello) does not match current program (core ignored)
  37. warning: cannot execute /etc/motd
  38. reading symbolic information ...
  39.  
  40. The program which dumped core in the above example is hello, as indicated in
  41. parentheses.  By specifying /etc/motd as the "debuggee," I guaranteed that
  42. the debuggee would not match the program which dumped core.
  43.  
  44. By the way, the information is indeed in the ld_info structure - the "execed"
  45. program name is found in the first ld_info structure (in the ldinfo_filename
  46. field (described in /usr/include/sys/ldr.h)) pointed to by the c_tab field
  47. in the core file header.  A program could easily be written to print out the
  48. name of the program - I just let dbx do it for me.
  49. -- 
  50. Marc Stephenson            IBM AWD (Advanced Workstations Division - Austin,TX)
  51. DISCLAIMER: The content of this posting is independent of official IBM position.
  52. INTERNET->marc@perfmap.austin.ibm.com    VNET: MARC at AUSVMQ  IBM T/L: 678-3189
  53.