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
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
Debugging Fennec can be trickier than Firefox because it uses multiple processes.
See [[Mobile/Fennec/Android/GDB|Debugging Fennec with GDB]].


For example to debug reftests in fennec on desktop linux the following recipe works:
Debugging Fennec can be trickier than Firefox because it uses multiple processes.


python runreftest.py --debugger=gdb TEST_PATH/reftest.list
For example to debug reftests in fennec on desktop linux the following recipe works:


once inside gdb
python runreftest.py --debugger=gdb TEST_PATH/reftest.list
# this will break on fork calls
(gdb) catch fork


# this will break on exec calls
once inside gdb
(gdb) catch exec
<pre>
# break on fork calls
(gdb) catch fork


(gdb) run
# break on exec calls
(gdb) catch exec


# the first fork will be for glx probing and can be ignor
(gdb) run
(gdb) continue


# the next fork is the content process, make sure we follow into it
#the first fork will be for glx probing and can be ignor
(gdb) set follow-fork-mode child
(gdb) continue  
(gdb) continue


# this will break on the exec
#the next fork is the content process, make sure we follow into it
(gdb) break some_function_in_the content process
(gdb) set follow-fork-mode child (gdb) continue
 
#this will break on the exec
(gdb) break some_function_in_the content process  
</pre>

Latest revision as of 16:18, 10 July 2014

See Debugging Fennec with GDB.

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

# break on fork calls
(gdb) catch fork 

# break on exec calls
(gdb) catch exec 

(gdb) run 

#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