Re: Part II: Revenge of the CoreDumps
Posted in 1998
>> What is the case number?? > >#789609 > >How do I need to compile a 4gl in order to use a debugger? I know that >I can't STRIP the executable, as I do now. No - Don't strip the problem as we need the entry point and name table from the executable. Otherwise you can use the same options as otherwise. I would not initially use the -g option as many SEGVs are actually cause by problems with the stack and by building -g option, you will change the usage of the stack and possibably "hide" the problem. I can't remember the xdb commands, but using adb you can still get the stack and registers at the point of failure. This can be useful in discovering the nature of the problem. adb <executable> <core> $c $R <cntrl>-d The $c will attempt to print the stack trace at the time of the failure and the $R will dump the registers at the failure. One thing to understand, however --- often the actual routine that took the hit is not actually in the stack. This is because the stack is displaying return address and the routine that is getting the failure will probably not have called any other routines. Try to get this information first from your existing core files before modifying the executable (and possibably changing the nature of the failures.) One other word of warning -- if the routine at the top of the stack is from a shared library, the $c command may not work. Madison Pruet