Thread View: comp.os.msdos.programmer
2 messages
2 total messages
Started by Francis H. Yu
Tue, 26 Jan 1993 19:49
Tracing function call path on Ctrl-C break?
Author: Francis H. Yu
Date: Tue, 26 Jan 1993 19:49
Date: Tue, 26 Jan 1993 19:49
13 lines
1390 bytes
1390 bytes
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. I know that I can use signal() to trap SIGINT, but how do I retrieve the line number in the source code and function call path? If I compile with CodeView debugging flags, the information must be there. Please kindly reply to fyu@oracle.com. Thanks. -- Francis H. Yu Oracle Corporation, 500 Oracle Parkway, Box 659504, Redwood Shores, CA 94065 Email: fyu@shanghai.oracle.com Voice: (415) 506-3129 FAX: (415) 506-7103
Re: Tracing function call path on Ctrl-C break?
Author: ~{QG9p~}
Date: Thu, 28 Jan 1993 00:02
Date: Thu, 28 Jan 1993 00:02
13 lines
1160 bytes
1160 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads