Stripping debug symbols from a debug binary



  • Problem statement: When I encounter a crash in application and get a core file, I should be able to do a back trace and find detailed information.

    Possible solution: I can use a debug version of the binary (using the debug keyword in the .pro file). The downside is, I cannot use debug binary for customer releases.

    I know that in gcc/Makefile I can compile my code with -g option and then strip the debug symbols (after stripping debug symbols, the binary is equivalent to a release version). Store the stripped debug symbols. Then if I encounter crash, using gdb I can supply the stored debug symbols to the release binary and can get detailed stack trace. More information can be found in the below links "Your text to link here...":http://stackoverflow.com/questions/866721/how-to-generate-gcc-debug-symbol-outside-the-build-target
    and "Your text to link here...":http://marcioandreyoliveira.blogspot.ae/2008/03/how-to-debug-striped-programs-with-gdb.html

    Question: Using Qt and QMake how can I achieve the same thing? Basically if I get a crash on release version, how can I get detailed back trace? What are the possible approaches?

    Thanks,
    -Sandeep



  • I found out that I can do the same thing with Qt and QMake, as it of-course uses gnu Makefile internally. But is it the only and right way of doing or any other alternatives available?

    Thanks,
    -Sandeep


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.