i am getting Segmentation Fault (core dumped) on solaris,
but when i run the same program with same input on linux it runs successfully.
How can i trace the fault in program on solaris.
i am getting Segmentation Fault (core dumped) on solaris,
but when i run the same program with same input on linux it runs successfully.
How can i trace the fault in program on solaris.
Hi junaid.nehvi , would appreciate if you can show us whats the exact errors you see? errors on the console or maybe those from the /var/adm/messages file?
Hi junaid.nehvi , would appreciate if you can show us whats the exact errors you see? errors on the console or maybe those from the /var/adm/messages file?
******************************************
on the screen i get Segmentation Fault (core dumped)
rest i am new to solaris and unix so can't identify the problem....
however i changed some inputs and i didn;t got the error.
hhhmm.. its ok then. Thankx anyway
The usual way is to compile your program with the "-g" option and then running it under the control of a debugger.
Alternatively, you can get the crash location by using the pstack command on the generated core file.
After you run the debugger (gdb, for instance) try to generate a "backtrace" ("bt" in gdb) showing the call-frames, including the last function called when the program died. It's probabyl inside a library call that has a different set of arguments than the one in Linux.;