- 论坛徽章:
- 0
|
回复 #3 hugbee 的帖子
mt__trce Subroutine
Purpose
Dumps traceback information into a lightweight core file.
Library
PTools Library (libptools_ptr.a)
Syntax
void mt__trce (int FileDescriptor, int Signal, struct sigcontext *Context, int Node);
Here is an example fyi...
#cat test.c
//xlc test.c -lptools_ptr
#include <stdio.h>
int testfun1(int* i)
{
mt__trce(2, 0, NULL, 0);
return (*i)++;
}
int testfun(int* i)
{
(*i)++;
return testfun1(i);
}
int main(int argc, char* argv)
{
int a = 1;
return testfun(&a);
}
#xlc test.c -lptools_ptr
[root@test170b:/tmp]#./a.out
+++PARALLEL TOOLS CONSORTIUM LIGHTWEIGHT COREFILE FORMAT version 1.0
+++LCB 1.0 Mon Apr 28 17:41:05 2008 Generated by IBM AIX 5.3
#
+++ID Node 0 Process 2207826 Thread 1
+++STACK
testfun1 : 0x00000020
testfun : 0x00000024
main : 0x00000020
---STACK
---ID Node 0 Process 2207826 Thread 1
---LCB |
|