Mobile/Fennec/Debugging: Difference between revisions

From MozillaWiki
< Mobile‎ | Fennec
Jump to navigation Jump to search
(Created page with "Debugging Fennec can be trickier than Firefox because it uses multiple processes. For example to debug reftests in fennec on desktop linux the following recipe works: python ru...")
 
No edit summary
Line 1: Line 1:
Debugging Fennec can be trickier than Firefox because it uses multiple processes.
Debugging Fennec can be trickier than Firefox because it uses multiple processes.  


For example to debug reftests in fennec on desktop linux the following recipe works:
For example to debug reftests in fennec on desktop linux the following recipe works:  


python runreftest.py --debugger=gdb TEST_PATH/reftest.list
python runreftest.py --debugger=gdb TEST_PATH/reftest.list  


once inside gdb
once inside gdb  
# this will break on fork calls
(gdb) catch fork


# this will break on exec calls
#this will break on fork calls
(gdb) catch exec


(gdb) run
(gdb) catch fork


# the first fork will be for glx probing and can be ignor
#this will break on exec calls
(gdb) continue


# the next fork is the content process, make sure we follow into it
(gdb) catch exec
(gdb) set follow-fork-mode child
(gdb) continue


# this will break on the exec
(gdb) run
(gdb) break some_function_in_the content process
 
#the first fork will be for glx probing and can be ignor
 
(gdb) continue
 
#the next fork is the content process, make sure we follow into it
 
(gdb) set follow-fork-mode child (gdb) continue
 
#this will break on the exec
 
(gdb) break some_function_in_the content process  
 
 
<pre>sdqwd
</pre>

Revision as of 05:47, 19 May 2011

Debugging Fennec can be trickier than Firefox because it uses multiple processes.

For example to debug reftests in fennec on desktop linux the following recipe works:

python runreftest.py --debugger=gdb TEST_PATH/reftest.list

once inside gdb

  1. this will break on fork calls

(gdb) catch fork

  1. this will break on exec calls

(gdb) catch exec

(gdb) run

  1. the first fork will be for glx probing and can be ignor

(gdb) continue

  1. the next fork is the content process, make sure we follow into it

(gdb) set follow-fork-mode child (gdb) continue

  1. this will break on the exec

(gdb) break some_function_in_the content process


sdqwd