Standards / Extensions | C or C++ | Dependencies |
---|---|---|
Language Environment | both |
#include <ctest.h>
int ctrace(char *dumptitle);
Requests a traceback. The output is identified with dumptitle. ctrace() invokes the CEE3DMP Language Environment callable service with the following options: TRACEBACK, NOFILE, NOBLOCK, NOVARIABLE, NOSTORAGE, STACKFRAME(ALL), NOCOND, NOENTRY. See the CEE3DMP Language Environment callable service in z/OS Language Environment Programming Guide. to determine where the output is written to.
If you compile the code using the GONUMBER option, this function will display, along with the traceback, the statement numbers and the offset information.
To avoid infringing on the user's name space, this nonstandard function has two names. One name is prefixed with two underscore characters, and one name is not. The name without the prefix underscore characters is exposed only when you use LANGLVL(EXTENDED).
To use this function, you must either invoke the function using its external entry point name (that is, the name that begins with two underscore characters), or compile with LANGLVL(EXTENDED). When you use LANGLVL(EXTENDED) any relevant information in the header is also exposed.
If successful, ctrace() returns 0.
If unsuccessful, ctrace() returns nonzero.
⁄* CELEBC34
This example shows how ctrace() is used and the output produced.
*⁄
#include <ctest.h>
int main(void) {
int rc;
rc = ctrace("Sample ctrace output");
}
CEE3DMP: Sample ctrace output Language Environment for MVS
06/16/95 6:13:31 PMPage: 1
Information for enclave ????????
Information for thread 8000000000000000
Traceback:
DSA Addr Program Unit PU Addr PU Offset Entry E Addr E Offset Statement Status
00065280 05337708 +0000011C __ctrace 05337708 +0000011C Call
000651E0 052005A8 +0000006C main 052005A8 +0000006C Call
000650C8 0533FA26 +000000B4 @@MNINV 0533FA26 +000000B4 Call
00065018 CEEBBEXT 000079D8 +0000013C CEEBBEXT 000079D8 +0000013C Call
CEE3DMP: Sample ctrace output Language Environment for MVS
06/16/95 6:12:47 PMPage: 1
Information for enclave ????????
Information for thread 8000000000000000
Traceback:
DSA Addr Program Unit PU Addr PU Offset Entry E Addr E Offset Statement Status
00065268 05337708 +0000011C __ctrace 05337708 +0000011C Call
000651E0 052006B8 +0000005E main 052006B8 +0000005E Call
000650C8 0533FA26 +000000B4 @@MNINV 0533FA26 +000000B4 Call
00065018 CEEBBEXT 000079D8 +0000013C CEEBBEXT 000079D8 +0000013C Call