Opened 7 years ago

Closed 7 years ago

#228 closed enhancement (fixed)

qmake: Add .sym file generation

Reported by: dmik Owned by:
Priority: major Milestone: Qt 4.7
Component: General Version: 4.6.3
Severity: low Keywords:


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 Changed 7 years ago by dmik

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 Changed 7 years ago by dmik

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 7 years ago by dmik (previous) (diff)

comment:3 Changed 7 years ago by dmik

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 Changed 7 years ago by dmik

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 7 years ago by dmik

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:6 Changed 7 years ago by dmik

  • Resolution set to fixed
  • Status changed from reopened to closed

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.