Operating System - HP-UX
1829537 Members
2132 Online
109992 Solutions
New Discussion

Debugging core files of 10.20 compiled code running on 11.0

 
Jason Samuels
Occasional Contributor

Debugging core files of 10.20 compiled code running on 11.0

We are having problems debugging core dumps from code compiled on HPUX 10.20 with aCC and running on 11.0. Basically, the only thing that shows up when investigating the stack is a reference to the va() function. We have tried using dde and xdb. Object code and source is all available to the debugger, but it seems confused, thereby confusing me.

Are there any flags or settings that might help or has anyone had luck with this scenario?

TIA,
Jason
4 REPLIES 4
Steven Gillard_2
Honored Contributor

Re: Debugging core files of 10.20 compiled code running on 11.0

A couple of questions:

Is the symbol information available in the executable? (ie has it been stripped?)

On which system are you attempting to debug - where it crashed or where it was compiled? Its usually better to debug on the system where the crash occurred. If you're going to move the core file to another system you must make sure that all shared libraries involved are identical - something which may not be so easy when two different OS releases are involved.

Regards,
Steve
Jason Samuels
Occasional Contributor

Re: Debugging core files of 10.20 compiled code running on 11.0

We are attempting to debug on an 11.0 system, albeit not the original system. I will look into the possibility of trying on the original, but since it is a production box, we tend to stay away from that.

The code was compiled without stripping the symbols.

We have not had problems debugging 10.20 compiled/run code on 10.20. Same goes for 11.0 compiled/run code.
Steven Gillard_2
Honored Contributor

Re: Debugging core files of 10.20 compiled code running on 11.0

If you are going to move the core file to another system, make sure they are at exactly the same patch levels - especially for the libraries like libc, libpthread and the aC++ libs. Use the 'chatr' command on the executable to determine which libraries are involved. Also make sure the debugger is able to load shared library information - there are times when gdb in particular has trouble locating shared libraries.

I have successfully obtained stack traces on 11.0 for 10.20 compiled executables in the past, so it is possible.

Regards,
Steve
Paula J Frazer-Campbell
Honored Contributor

Re: Debugging core files of 10.20 compiled code running on 11.0

Jason

You WILL have problems debugging on a non orig system as there is a possibility that not all libs will be there.

I am afraid that the prod box is the place to be.

Paula
If you can spell SysAdmin then you is one - anon