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

  1. Xref: sparky comp.sources.wanted:4283 comp.unix.questions:10902 comp.windows.x:16470
  2. Newsgroups: comp.sources.wanted,comp.unix.questions,comp.windows.x
  3. Path: sparky!uunet!stan!gerber
  4. From: gerber@solbourne.com (Andrew Gerber)
  5. Subject: Re: Stack Traceback program wanted
  6. Message-ID: <BuDC4J.D4A@solbourne.com>
  7. Organization: Solbourne Computer, Inc., Longmont, CO
  8. References: <1992Sep9.143656.20352@kocrsv01.delcoelect.com> <1992Sep09.172755.17887@bnr.uk> <1992Sep9.193434.2713@kocrsv01.delcoelect.com>
  9. Date: Thu, 10 Sep 1992 15:24:18 GMT
  10. Lines: 41
  11.  
  12. In article <1992Sep9.193434.2713@kocrsv01.delcoelect.com> c23st@kocrsv01.delcoelect.com (Spiros Triantafyllopoulos) writes:
  13. >(judging from my weight, adb would probably go out of memory :-). But
  14. >seriously, what we have in mind is really to compile such a function in
  15. >our program and do it 'on demand' every time it crashes, so we can have
  16. >a log of what happened. 
  17. >
  18. >We can always ask the users to run a utility on the core file and see
  19. >what happens afterwards... maybe a little script to examine core and 
  20. >do the $c command.
  21. >
  22.  
  23. I know what you want; many Fortran compilers do this, print a
  24. traceback when the program exits abnormally. I've never seen a C or
  25. C++ program which does this automatically.
  26.  
  27. Solbourne's "pdb" debugger comes with a utility "ct" for "core
  28. traceback"; here's a simple example of its use:
  29.  
  30. unix % ni dump
  31. Abort (core dumped)
  32. unix % ct
  33. Core for program: ni
  34. killing signal: SIGABRT 6: abort
  35. Reading symbolic information for ni
  36. Reading symbolic information for /opt/SUNWste/SC2.0/libC.so
  37. Reading symbolic information for /usr/lib/libc.so.1
  38. Reading symbolic information for /usr/lib/libdl.so.1
  39. 0xef764d78 _kill()+0x8
  40. 0x10e30 main()+0x1cc item.C:47
  41. 0x109fc _start()+0x5c
  42.  
  43. Similar functionality can be obtained from any debugger; ct is just a
  44. quick and dirty way of avoiding debugger startup time.  If you're
  45. interested in ct or pdb, contact Solbourne telesales at (303) 678-4626.
  46. These products run on Sparc machines only.
  47.  
  48. -- 
  49. /-----------------------------------------------------------------/
  50. / Andy Gerber             / gerber@solbourne.com               /
  51. /-----------------------------------------------------------------/
  52.  
  53.