User:MarkFinkle/MaemoDebugging: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with ' export MOZ_DEBUG_SYMBOLS=1 ac_add_options --enable-debugger-info-modules=yes ac_add_options --disable-install-strip make package PKG_SKIP_STRIP=1 apt-get install gdb gdbs...')
 
No edit summary
Line 1: Line 1:
I had no previous development experience on Linux before working on Fennec. However, we use the tools we have, so I started playing with <code>gdb</code> and <code>gdbserver</code>.


To debug Fennec/XULRunner, you'll need a build with at least debug symbols. Creating full debug builds in scratchbox has failed many times. Using debug symbols is a little more lightweight.


Add the following to you <code>mozconfig</code>:
<pre>
export MOZ_DEBUG_SYMBOLS=1
export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-debugger-info-modules=yes
ac_add_options --enable-debugger-info-modules=yes
</pre>


Now the Fennec/XULRunner binaries have debug symbols. However, the packaging phase will strip the symbols. You need to disable the strip.


In mozconfig:
<pre>
ac_add_options --disable-install-strip
ac_add_options --disable-install-strip
</pre>


During a package:
<pre>
make package PKG_SKIP_STRIP=1  
make package PKG_SKIP_STRIP=1  
</pre>


Now you can copy the binaries to the device. Because the debug binaries are larger than the release versions, you probably want to copy the application to /media/mmc2 since it has much more space available:
<pre>
scp fennec-archive.tar.bz2 root@192.168.10.100:/media/mmc2
</pre>
In order to use <code>gdb</code> or <code>gdbserver</code> on the device, you'll need to install it:
<pre>
apt-get install gdb
apt-get install gdb
</pre>


gdbserver host:5555 ./fennec
gdbserver host:5555 ./fennec
canmove, Confirmed users, Bureaucrats and Sysops emeriti
2,798

edits

Navigation menu