Opened 13 years ago

Closed 13 years ago

#228 closed enhancement (fixed)

qmake: Add .sym file generation

Reported by: Dmitry A. Kuminov Owned by:
Priority: major Milestone: Qt 4.7
Component: General Version: 4.6.3
Severity: low Keywords:
Cc:

Description

It is useful to have .sym files for all .DLLs and .EXEs since they allow to reconstruct the execution flow of a crashed application from the process dump file which is useful for analyzing crashes happening on the end user side.

The .sym files should be also read by the IBM debuggers to show the symbols when stepping through the release version of the application (that does not have debugging info built in). Although it doesn't always work (I couldn't find why so far) it's better than nothing.

Change History (6)

comment:1 by Dmitry A. Kuminov, 13 years ago

The supoprt for .sym generation will be implemented by recognizing a new 'sym' flag in the CONFIG variable. This flag will turn generation of the .map file (just as the 'map' flag does) and add a rule to convert .map to .sym. The .map file will be deleted afterwards (unless 'map' is also present in CONFIG).

The default presence of the 'sym' flag will be defined by configure.cmd based on the presence of mapsym.exe (necessary for .map to .sym conversion) in PATH, just the way we do this for 'exepack' and lxlite.exe.

There will also be a new 'install_debuginfo' CONFIG flag. When present, it will cause all install targets to install .sym files along with the corresponding DLLs and executables.

comment:2 by Dmitry A. Kuminov, 13 years ago

The .sym support is done in r954. Note that after r957, the 'map' CONFIG option is no more present by default, but the 'sym' option is (if mapsym is present on PATH during configure). This means that by default, we now generate .sym files instead of .map files (for all DLLs and EXEs).

Last edited 13 years ago by Dmitry A. Kuminov (previous) (diff)

comment:3 by Dmitry A. Kuminov, 13 years ago

In r958 I had to disable the .sym file generation in debug builds by default for two reasons:

  1. Crappy mapsym hangs on big .map files (e.g. the 40 MB one from the WebKit).
  2. It doesn't make much sense since the debug info is built into the executable in debug mode.

Applying this default (retaining the possibility to overwrite it with +sym/-sym) was a big challenge. qmake isn't well thought.

comment:4 by Dmitry A. Kuminov, 13 years ago

Resolution: fixed
Status: newclosed

comment:5 by Dmitry A. Kuminov, 13 years ago

Resolution: fixed
Status: closedreopened

comment:6 by Dmitry A. Kuminov, 13 years ago

Resolution: fixed
Status: reopenedclosed

Implemented installing .sym files along with the target EXEs/DLLs in r963. Note that this is rather the default behavior, as long as 'sym' is present in CONFIG (since having them along is the most useful case). This may be disabled by putting 'no_install_debuginfo' to CONFIG.

Note: See TracTickets for help on using tickets.