Operating System - HP-UX
1830212 Members
1435 Online
109999 Solutions
New Discussion

program error with SIGSEGV

 
Jeff Bruce
Occasional Contributor

program error with SIGSEGV

I have a developer who's program keeps failing. Any ideas


root@dudley:/home/abmint/vdac/bin> file core
core: ELF-64 core file - PA-RISC 2.0 from 'abmrun' - received SIGSEGV

root@dudley:/home/abmint/vdac/bin> what core
core:
$ PATCH/11.00:PHCO_28425 Mar 4 2003 17:53:13 $
HP-UX libm shared pa20_rtm64 C Math Library 20000331 (200955) UX11.01
$ PATCH/11.0:PHNE_27795 Sep 30 2002 08:28:17 $
Pthread Interfaces
libpthread HP-UX (Release B.11.00): Thu Jun 7 11:32:39 PDT 2001
libcl.sl version B.11.01.18 - Jan 3 2003
92453-07 linker command s800.sgs dld PA64 B.11.36 PBO 030403
That which does not kill me, makes me stronger
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: program error with SIGSEGV

The "file" command for this is essentially useless. You need to have him compile with "-g" and then execute the program and allow it to crash. You then use a debugger (gdb) to do a stack trace and you should be able to spot the problem and unless the error occurs in a library for which you don't have the soure, the debugger will tell you the exact line in the source code. Even if in a library, the debugger will should you the chain of functions that led to the library function call. This is really Debugging C/C++ 101 stuff.
If it ain't broke, I can fix that.
Kent Ostby
Honored Contributor

Re: program error with SIGSEGV

If he has a version compiled with debug options, he can at least get a stack by doing:

echo \$r | adb abmrun core

This will at least get him the basics of where he was.

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"