home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!destroyer!sol.ctr.columbia.edu!emory!emory!not-for-mail
- From: zellich@STL-07SIMA.ARMY.MIL (Rich Zellich)
- Newsgroups: comp.databases.informix
- Subject: Re: tracking execution
- Date: 13 Nov 1992 13:38:04 -0500
- Organization: Mailing List Gateway
- Lines: 53
- Sender: walt@mathcs.emory.edu
- Distribution: world
- Message-ID: <1e0smcINN4b3@emory.mathcs.emory.edu>
- Reply-To: zellich@STL-07SIMA.ARMY.MIL (Rich Zellich)
- NNTP-Posting-Host: emory.mathcs.emory.edu
- X-Informix-List-ID: <list.1605>
-
- I think this may be what you're looking for...
- -Rich
- -------
-
-
- The following is in our project's master .h file:
- (Note that *every* module in the project does OssTrace("thismodulename");
- as the first line of executable code in the module [where thismodulename
- is, of course, the individual module name...should someone forget to do
- this in a new module, then the "(unknown)" declaration in WriteOssLog.c
- will be used].)
-
- /*
- * OssTrace will eventually be defined to not only declare a static variable
- * containing the name of the function, but call WriteOssLog if we are
- * tracing.
- */
- extern char __exec_start[], __exec_end[], __ossname[];
-
- #define OssTrace(x) static char __ossname[] = x; \
- if (oss_trace||oss_debug) { WriteOssLog(ERR_TRACE, __exec_start); \
- __osstrace(__ossname, __FILE__); }
-
- /*
- * WriteOssLog passes the name of the function, obtained from OssTrace.
- * If not defined in the current function, it will pick up the one defined
- * in WriteOssLog itself, which will be empty.
- */
- #define WriteOssLog(i, m) _WriteOssLog(__ossname, __FILE__, __LINE__, i, m)
-
-
-
-
- WriteOssLog.c contains the following global declarations:
-
- char __exec_start[] = "Starting execution";
- char __exec_end[] = "Ending execution";
- char __ossname[] = "(unknown)";
-
-
-
-
-
- The following is a typical call to WriteOssLog():
-
- if ( status == ABEND )
- {
- /*:DON Error:*/
- UpdateMsg(ABEND, &LVT);
- sprintf(msg, don_error, MG_DON);
- WriteOssLog(ERR_MISC, msg);
- return(ULMainReturn(&LVT, rep_req_flag, &original_a0));
- }
-