#638: Enable symbols for backtraces -------------------------+-------------------------------------------------- Reporter: hinder | Owner: eschnett Type: enhancement | Status: new Priority: major | Milestone: ET_2011_10 Component: SimFactory | Version: Keywords: | -------------------------+-------------------------------------------------- The attached patch adds the option -rdynamic to CFLAGS and CXXFLAGS for all optionlists using the Intel or GCC compilers. This makes backtraces from Carpet (new in ET_2011_10) contain meaningful symbols rather than gibberish or nothing. This has been present in datura and damiana for a long time and works well.
From man gcc:
-rdynamic Pass the flag -export-dynamic to the ELF linker, on targets that support it. This instructs the linker to add all symbols, not only used ones, to the dynamic symbol table. This option is needed for some uses of “dlopen” or to allow obtaining backtraces from within a program.
Given the usefulness of good backtraces and the nature of this option, I think it might be feasible and useful to get this in before the release, assuming that there will be another round of tests.
I have only enabled this for GCC and Intel because I haven’t tested it with other compilers, nor with Fortran. I clearly haven't tested this on all the machines it applies to.