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