summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/unix/gdb_dwarf_index.prf
blob: 14db4fcf1bbf128c3534a0c28ce0942af79d74f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
!CONFIG(separate_debug_info):CONFIG(debug, debug|release):!staticlib:!static:!contains(TEMPLATE, subdirs):!isEmpty(QMAKE_OBJCOPY) {

    QMAKE_GDB_INDEX = { test -z \"$(DESTDIR)\" || cd \"$(DESTDIR)\"; } && \
      test \$\$(gdb --version | sed -e \'s,[^0-9]\\+\\([0-9]\\)\\.\\([0-9]\\).*,\\1\\2,;q\') -gt 72 && \
      gdb --nx --batch --quiet -ex \'set confirm off\' -ex \'save gdb-index .\' -ex quit \'$(TARGET)\'  && \
      test -f $(TARGET).gdb-index && \
      $$QMAKE_OBJCOPY --add-section \'.gdb_index=$(TARGET).gdb-index\' --set-section-flags \'.gdb_index=readonly\' \'$(TARGET)\' \'$(TARGET)\' && \
      $$QMAKE_DEL_FILE $(TARGET).gdb-index || true

    !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
    QMAKE_POST_LINK = $$QMAKE_GDB_INDEX $$QMAKE_POST_LINK

    silent:QMAKE_POST_LINK = @echo indexing $@ for gdb && $$QMAKE_POST_LINK
}