|Tech Tip: How to Build Firefox with Debugging Symbols on Linux
||[Jul. 4th, 2012|08:08 pm]
Shlomif's Technical Posts Community
I spent a large part of today building Firefox on one of my Linux machines and
trying to figure out why
gdb did not display debugging symbols, and instead only displayed question
marks in the backtrace (?? ). Eeventually, I found a solution, so
I'd like to document the process for other people in the future.
The solution is documented
this bug report that I filed and involves the following steps:
Checkout the firefox source from the
Put something like the following in the .mozconfig file in the
source's root (where client.mk can be found):
The important lines are the --enable-debug,
--enable-debug-symbols and the LDFLAGS one.
Type make -f client.mk. Now you'll need to wait.
Type make -f client.mk install PKG_SKIP_STRIP=1 and make sure
you do not forget the PKG_SKIP_STRIP=1 parameter.
Now you can use gdb ~/opt/firefox-from-hg/bin/firefox to debug
Firefox with all the debugging symbols.