You are not logged in.

#1 2017-03-12 18:55:00

buovjaga
Member
Registered: 2016-04-16
Posts: 17

[SOLVED] Building Firefox with debug symbols

I'm trying to do a debug build of this: https://aur.archlinux.org/packages/fire … -opensuse/
(I want to get a backtrace of a crash)

Here is my modified mozconfig, which still does not get me debug symbols:

    ac_add_options --enable-application=browser
    ac_add_options --prefix=/usr
    ac_add_options --enable-gold
    ac_add_options --enable-rust
    ac_add_options --enable-pie
    #ac_add_options --enable-release
    ac_add_options --enable-official-branding
    #ac_add_options --enable-update-channel=release
    # System libraries
    ac_add_options --with-system-nspr
    ac_add_options --with-system-nss
    ac_add_options --with-system-jpeg
    ac_add_options --with-system-zlib
    ac_add_options --with-system-bz2
    ac_add_options --with-system-png
    ac_add_options --with-system-libevent
    ac_add_options --with-system-libvpx
    ac_add_options --with-system-icu
    ac_add_options --enable-system-hunspell
    ac_add_options --enable-system-sqlite
    ac_add_options --enable-system-ffi
    #ac_add_options --enable-system-cairo
    ac_add_options --enable-system-pixman
    ac_add_options --disable-libproxy
    #ac_add_options --enable-shared-js
    # Features
    ac_add_options --enable-startup-notification
    ac_add_options --enable-pulseaudio
    ac_add_options --disable-gio
    ac_add_options --disable-gconf
    ac_add_options --disable-crashreporter
    ac_add_options --disable-tests
    ac_add_options --disable-updater
    #ac_add_options --disable-debug-symbols
    ac_add_options --disable-install-strip
    #STRIP_FLAGS="--strip-debug"

    # Optimization
    #ac_add_options --enable-optimize
    ac_add_options --disable-optimize
    ac_add_options --enable-debug-symbols="-gdwarf-2"
    # PGO
    #mk_add_options PROFILE_GEN_SCRIPT='EXTRA_TEST_ARGS=10 $(MAKE) -C $(MOZ_OBJDIR) pgo-profile-run'
    #export BUILD_OFFICIAL=1
    #export MOZILLA_OFFICIAL=1
    export MOZ_DEBUG_SYMBOLS=1
    #mk_add_options BUILD_OFFICIAL=1
    #mk_add_options MOZILLA_OFFICIAL=1
    mk_add_options MOZ_DEBUG_SYMBOLS=1

Any ideas on what I should try next?

Last edited by buovjaga (2017-03-13 16:24:09)

Offline

#2 2017-03-12 19:16:27

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] Building Firefox with debug symbols

Looking at https://hg.mozilla.org/mozilla-central/ … ux64/debug
You seem to be missing ac_add_options --enable-debug does ac_add_options --enable-debug-symbols="-gdwarf-2" automatically enable it?
Also https://aur.archlinux.org/cgit/aur.git/ … e-opensuse contains options=('!emptydirs'  'strip' ) did you switch it to options=('!emptydirs'  '!strip' )?

Offline

#3 2017-03-13 15:25:41

buovjaga
Member
Registered: 2016-04-16
Posts: 17

Re: [SOLVED] Building Firefox with debug symbols

loqs wrote:

Looking at https://hg.mozilla.org/mozilla-central/ … ux64/debug
You seem to be missing ac_add_options --enable-debug does ac_add_options --enable-debug-symbols="-gdwarf-2" automatically enable it?
Also https://aur.archlinux.org/cgit/aur.git/ … e-opensuse contains options=('!emptydirs'  'strip' ) did you switch it to options=('!emptydirs'  '!strip' )?

Thanks for the reply!

The Configuring Build Options page from Mozilla says:

mozilla wrote:

ac_add_options --enable-debug
    Enables assertions in C++ and JavaScript, plus other debug-only code. This can significantly slow a build, but it is invaluable when writing patches.  People developing patches (especially in C++) should generally use this option.

So it doesn't seem like it is relevant for the symbols.

I got the gdwarf thing from this page: https://developer.mozilla.org/en-US/doc … ug_Symbols

I will try building with the options=('!emptydirs'  '!strip' ) change now.

Offline

#4 2017-03-13 16:23:43

buovjaga
Member
Registered: 2016-04-16
Posts: 17

Re: [SOLVED] Building Firefox with debug symbols

Holy guacamole! I knew it worked when I saw the size of the package (1GB) and indeed, debug symbols read correctly when doing coredumpctl gdb!!

I did do a fresh git clone to target FF 52, but I used the exact same mozconfig. The only change was your proposed options=('!emptydirs'  '!strip' ) to the PKGBUILD.

Thanks a zillion. Now I can properly report about this crash (simply clicking "Open containing folder" in Downloads)!

Offline

Board footer

Powered by FluxBB