HOW I GET INFORMATION FOR A PROGRAM CORE DOWN
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Liu Jiachuan wrote: > > Hi, everybody. > I have write a system on SCO unix 5.0.4, and the informix is online 7.3. > This system includes several processes. Now this system has been finished. > But sometimes a process may exit with a core file. I can't know the reason > why the process exit. I guess it may be caused by pointer's voilation.But I > have checked my program, and I still can't find the position. > On informix online 5.3, I have modified the file $HOME/bin/esql. When it > pre-compile the .ec files, I use "sed" command to delete all line including > "#line", and compile it using option "-g", then when it exit with core, I > can find the position where it vialate the memory using sdb command. But on > informix online 7.3, the sdb "command" can't work. > Can you tell me Why or other methods to find out the postion. You can use the -G option instead to debug the generated .c source and the linenumber records will correspond to the .c rather than to the .ec. Also get a better debugger. Art S. Kagel
Hi, everybody. I have write a system on SCO unix 5.0.4, and the informix is online 7.3. This system includes several processes. Now this system has been finished. But sometimes a process may exit with a core file. I can't know the reason why the process exit. I guess it may be caused by pointer's voilation.But I have checked my program, and I still can't find the position. On informix online 5.3, I have modified the file $HOME/bin/esql. When it pre-compile the .ec files, I use "sed" command to delete all line including "#line", and compile it using option "-g", then when it exit with core, I can find the position where it vialate the memory using sdb command. But on informix online 7.3, the sdb "command" can't work. Can you tell me Why or other methods to find out the postion. Wait for you answer. Thank you.
Liu Jiachuan wrote: > > Hi, everybody. > I have write a system on SCO unix 5.0.4, and the informix is online 7.3. > This system includes several processes. Now this system has been finished. > But sometimes a process may exit with a core file. I can't know the reason > why the process exit. I guess it may be caused by pointer's voilation.But I > have checked my program, and I still can't find the position. > On informix online 5.3, I have modified the file $HOME/bin/esql. When it > pre-compile the .ec files, I use "sed" command to delete all line including > "#line", and compile it using option "-g", then when it exit with core, I > can find the position where it vialate the memory using sdb command. But on > informix online 7.3, the sdb "command" can't work. > Can you tell me Why or other methods to find out the postion. > Wait for you answer. > Thank you. You can print stack of your program when it crashed. First run debugger (I used sdb) with your program and corresponding core file sdb <your-program> core Then press 't' (I'm not sure, you can checked it by man). Debuger will show you post mortem program stack. And you will get a function name where your program crashed (top of stack) Eduard