I have created an executable using my login session in an AIX Version 5 Unix system. After to which I have change the file mode to set uid and rwsrwx--x and ownership to root:system by using the following Standard C Library functions.
where name is the name of the executable whose permissions needs to be changed. When I execute my executable using my login session, the executable gives a segmentation fault but the core file is not being generated. When I saw the man page of core in the system it said that "A process with a saved user ID that differs from the real user ID does not produce a memory image. The same holds true for the group ID (GID) and effective
group ID" .
Is it possible that we can generate a core file through some technique which would aid me in tracing the cause of the segmentation fault.
You could truss or tusc the process when you start the program.
In Solaris/HP-ux it goes like :
truss /program/to/start/myprog
When debugging an already running program you can do :
truss -p <processid>
There is one note :
AIX 5.1 has 'truss'.
AIX 4.3.3 and earlier you can use the 'trace' command - but it's a pain because it's a system-level trace from which you can then extract the information for the process you cared about.
As per Perderabo advice, I tried various options by using the 'smit' tool in AIX for "a proces to allow to creat a core file .." but was incapable to do so. I am unable to proceed further cause of this.
I would appreciate if someone could provide me accurate information or solution for the existing issue.
I don't know too much about AIX but on Linux you have to play with 'ulimit' to set the size of core file allowed on your system. If the size of core file being generated is bigger than the limit specified it won't be created. Is there something like this on AIX?