Changes

Jump to: navigation, search

Mobile/Fennec/Android/GDB

2,604 bytes added, 20:07, 20 March 2013
Using JimDB
= Using JimDB =
== First run == In order to debug Fennec, JimDB needs a copy of your system libraries. When you try to debug Fennec on a particular device for the first time, JimDB will download the libraries from your device. This may take some time but will only need to run once. You may need to restart JimDB in order for debug symbols to work. == FenInit == FenInit is the Python script that simplifies launching Fennec on your device and setting up a debug environment. When JimDB starts, FenInit runs automatically and presents several options, # Debug Fennec (default)# Debug Fennec with env vars and args# Debug using jdb# Debug content Mochitest# Debug compiled-code unit test === Debug Fennec === This is the default option. Once you choose an object directory to use, the script will automatically launch Fennec, and run GDBServer to attach to Fennec. The script tries to scan your user directory for object directories. For more control, see the "Configuring JimDB" section on how to specify default object directories or where to scan for object directories. === Debug Fennec with env vars and args === This option gives you the additional ability to specify environment variables and arguments when launching Fennec === Debug using jdb === This option will let you use the Java debugger (jdb) to debug the native Java portion of Fennec. This is the default option if you already have a previous JimDB debugging session running. JDB support is experimental. It is able to at least set breakpoints, show source code, and examine objects. === Debug content Mochitest === This option will let you debug a regular Mochitest. Make sure Fennec is compiled with the '--enable-tests' option in the mozconfig file. Because running Mochitests require a copy of the XUL Runtime Environment (XRE), the script will offer to automatically download a copy of XRE for you, as well as launching the test harness. You can specify a file or a directory to test, or set TEST_PATH. Environment variables and arguments to the test harness are also supported. === Debug compiled-code unit test === This option will let you debug a C++ test. Environment variables and arguments are supported. = Configuring JimDB = == utils/gdbinit and utils/gdbinit.local utils/gdbinit is the GDB command file that JimDB runs at launch. It contains the launch commands as well as settings for JimDB. utils/gdbinit also loads utils/gdbinit.local. Because utils/gdbinit can change frequently across updates, it's recommended to copy your custom settings to utils/gdbinit.local, so that updates do not override your settings. = FAQ ==
=== What is moz-gdb? ===
Confirm
507
edits

Navigation menu