home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / hp / 9973 < prev    next >
Encoding:
Text File  |  1992-09-02  |  2.1 KB  |  55 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!centerline!franl
  3. From: franl@centerline.com (Fran Litterio)
  4. Subject: Re: Need doc on debug info in executable
  5. In-Reply-To: ken@virtech.uucp's message of Wed, 2 Sep 92 14:56:47 GMT
  6. Message-ID: <FRANL.92Sep2150900@draco.centerline.com>
  7. Sender: news@centerline.com
  8. Nntp-Posting-Host: draco
  9. Organization: CenterLine Software, Inc.
  10. References: <1992Sep2.145647.12397@virtech.uucp>
  11. Date: Wed, 2 Sep 1992 20:09:00 GMT
  12. Lines: 41
  13.  
  14. ken@virtech.uucp (Kenneth E. Jordan) writes:
  15.  
  16. > I'm working on a library that produces stack tracebacks, and would like
  17. > to print the source file name and line number of each call, along with
  18. > the function names.
  19.  
  20. Section 4 of Appendix C of the PA-RISC Procedure Calling Conventions
  21. Reference Manuage (Edition 2, Part # 09740-90015) says:
  22.  
  23.    C.4.  Obtaining a Stack Trace 
  24.  
  25.    Applications can obtain stack traces easily using the following utility
  26.    routine:
  27.  
  28.              U_STACK_TRACE()
  29.  
  30.    This routine can be called from any place without any arguments.  It will
  31.    print the stack trace from the caller's frame onwards onto the standard
  32.    output stream.
  33.  
  34. U_STACK_TRACE() is in /usr/lib/libf.a and /usr/lib/libf.sl.
  35.  
  36. > Where can I find documentation on the format of the debugging
  37. > information (i.e., the "$DEBUG$" space) in an executable?
  38.  
  39. Ask HP for the header file symtab.h from their XDB sources.  It has
  40. comments that read more like an API spec than typical C comments.
  41.  
  42. > Currently, this is for the 9000/800 series, but I will probably want
  43. > it eventually for the 300 series too.  From /usr/include/debug.h, it
  44. > looks like the actual data for the 300 might be the same as the 800.
  45.  
  46. It is.  HP debugger symbols are very architecture neutral (though on
  47. the Series 700 you have to apply linker-style relocations to certain
  48. fields of certain debugger symbols if you want to obtain the relative
  49. address of a static data object -- a minor wart on an otherwise very
  50. nice debugger symbol format).
  51. --
  52. franl@centerline.com   || Fran Litterio                               
  53. uunet!centerline!franl || CenterLine Software R&D                     
  54. 617-498-3255           || 10 Fawcett St, Cambridge, MA, USA 02138-1110
  55.