Question

We have a customer that reported crash on AIX server, and they provided us the core dump. The core dump is generated by release libraries and executable.

Now if I use dbx to analyze it, I am not able to get the line number.

Is there a way to attach the source code to dbx? Can I just recompile the libraries and executable with debug information then load them to dbx, will that work?

Or do I need to give customer a debug version of our libs and executable and let them reproduce the crash and send ur the core dump?

Was it helpful?

Solution

The core file will need to match the same executable you're trying to attach dbx to. If you want debug symbols, you'll need to have the customer run a debug version (compiled with -g, unstripped) and send you the core generated from that crash.

Having dbx display source is another step, see the -I option or "use" command to point dbx to the associated source files with your debug build.

Note that I often find a crash won't happen in a debug vs release build. Can be frustrating sometimes.

If you are particularly adventurous, you can use the combination of "where" (show the current function and offset within that function) to display the assembler. Generate assembler from your source file (-S option from xlc) and you can get pretty close to what C/C++ statement is causing the issue. I've done this many times when trying to recreate something that dumps core in production without a debug build in place.

Good luck!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top