Building Firefox with Debug Symbols

  • Revision slug: Building_Firefox_with_Debug_Symbols
  • Revision title: Building Firefox with Debug Symbols
  • Revision id: 53896
  • Created:
  • Creator: Ted_Mielczarek
  • Is current revision? No
  • Comment kill --enable-static reference

Revision Content

By default, a release build of Firefox will not generate debug symbols suitable for debugging or post-processing into the breakpad symbol format. Use the following mozconfig settings to do a build with symbols:

On Windows

export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-debugger-info-modules=yes

Note that a typical release build will have additional options. See {{template.Source("tools/tinderbox-configs/firefox/win32/mozconfig")}} for the configuration used for nightly builds.

On Mac

 export CFLAGS="-g -gfull"
 export CXXFLAGS="-g -gfull"

You should use CFLAGS/CXXFLAGS instead of passing compiler flags in --enable-optimize, because --enable-optimize=flags overrides module-specific optimization settings, which you really don't want to do. See {{template.Bug(407794)}} for more info.

See {{template.Source("tools/tinderbox-configs/firefox/macosx/mozconfig")}} for the configuration used for nightly builds.

On Linux

Unfortunately the default debugger flags produce output that cannot be used with crash reporter, so you have to force compatible debugger output like this:

 export CFLAGS="-gstabs+"
 export CXXFLAGS="-gstabs+"

See {{template.Source("tools/tinderbox-configs/firefox/linux/mozconfig")}} for the configuration used for nightly builds.

After the build

After the build is complete, run the following command to generate an archive of breakpad symbol files:

make -C objdir buildsymbols

The tinderbox uses an additional uploadsymbols target to upload symbols to a socorro server. See {{template.Source("toolkit/crashreporter/tools/upload_symbols.sh")}} for more information about the environment variables used by this target.

{{ wiki.languages( { "ja": "ja/Building_Firefox_with_Debug_Symbols" } ) }}

Revision Source

<p>
</p><p>By default, a release build of Firefox will not generate debug symbols suitable for debugging or post-processing into the <a href="en/Crash_Reporting">breakpad</a> symbol format. Use the following <a href="en/Configuring_Build_Options">mozconfig</a> settings to do a build with symbols:
</p>
<h3 name="On_Windows"> On Windows </h3>
<pre class="eval">export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-debugger-info-modules=yes
</pre>
<p>Note that a typical release build will have additional options. See {{template.Source("tools/tinderbox-configs/firefox/win32/mozconfig")}} for the configuration used for nightly builds.
</p>
<h3 name="On_Mac"> On Mac </h3>
<pre class="eval"> export CFLAGS="-g -gfull"
 export CXXFLAGS="-g -gfull"
</pre>
<p>You should use CFLAGS/CXXFLAGS instead of passing compiler flags in --enable-optimize, because --enable-optimize=flags overrides module-specific optimization settings, which you really don't want to do.  See {{template.Bug(407794)}} for more info.
</p><p>See {{template.Source("tools/tinderbox-configs/firefox/macosx/mozconfig")}} for the configuration used for nightly builds.
</p>
<h3 name="On_Linux"> On Linux </h3>
<p>Unfortunately the default debugger flags produce output that cannot be used with crash reporter, so you have to force compatible debugger output like this:
</p>
<pre class="eval"> export CFLAGS="-gstabs+"
 export CXXFLAGS="-gstabs+"
</pre>
<p>See {{template.Source("tools/tinderbox-configs/firefox/linux/mozconfig")}} for the configuration used for nightly builds.
</p>
<h3 name="After_the_build"> After the build </h3>
<p>After the build is complete, run the following command to generate an archive of breakpad symbol files:
</p>
<pre class="eval">make -C objdir buildsymbols
</pre>
<p>The tinderbox uses an additional <code>uploadsymbols</code> target to upload symbols to a socorro server. See {{template.Source("toolkit/crashreporter/tools/upload_symbols.sh")}} for more information about the environment variables used by this target.
</p>
<div class="noinclude">
</div>
{{ wiki.languages( { "ja": "ja/Building_Firefox_with_Debug_Symbols" } ) }}
Revert to this revision