home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / msdos / programm / 12537 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.1 KB

  1. Path: sparky!uunet!crdgw1!rpi!uwm.edu!ux1.cso.uiuc.edu!usenet.ucs.indiana.edu!bronze.ucs.indiana.edu!yawei
  2. From: yawei@bronze.ucs.indiana.edu (~{QG9p~})
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: Tracing function call path on Ctrl-C break?
  5. Message-ID: <C1JErG.LC6@usenet.ucs.indiana.edu>
  6. Date: 28 Jan 93 00:02:04 GMT
  7. References: <1993Jan26.194939.1326@oracle.us.oracle.com>
  8. Sender: news@usenet.ucs.indiana.edu (USENET News System)
  9. Organization: Indiana University
  10. Lines: 13
  11. Nntp-Posting-Host: bronze.ucs.indiana.edu
  12.  
  13. In article <1993Jan26.194939.1326@oracle.us.oracle.com> fyu@shanghai.oracle.com (Francis H. Yu) writes:
  14. >Is there any way to let a C program trace back to the function and the
  15. >statement in the source file when a Ctrl-C break occur?  I do not want
  16. >to run the program in CodeView.
  17.  
  18.  
  19. You may be able to first obtain the value of the BP register (DOS should
  20. tell you this during an int 23h trap), and then trace backward for 
  21. the function call frames.  After that it is just a matter of matching
  22. the addresses of the functions to their entries in the symbol table.
  23. It's not foolproof, but may work.
  24.  
  25.   Ya-Gui Wei
  26.