Skip to content

Commit

Permalink
Bug 1897179 - Update GeckoView native debugging docs with new symbols…
Browse files Browse the repository at this point in the history
… search dir. r=geckoview-reviewers,nalexander,ohall

The location of the built libraries was changed by bug 1459764.

Additionally update the search paths in the .lldbinit file that gets
put in the objdir during build.

Differential Revision: https://phabricator.services.mozilla.com/D210667
  • Loading branch information
jamienicol committed May 17, 2024
1 parent 2b802d3 commit cc80124
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
4 changes: 1 addition & 3 deletions build/.lldbinit.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ script topsrcdir = "@topsrcdir@"; lldb.debugger.HandleCommand("command source -s
settings set symbols.enable-external-lookup true

# This is where libxul.so and libmozglue.so are produced in full builds.
settings append target.exec-search-paths @topobjdir@/toolkit/library/build
settings append target.exec-search-paths @topobjdir@/mozglue/build
settings append target.exec-search-paths @topobjdir@/security
settings append target.exec-search-paths @topobjdir@/dist/bin

# This is where artifact builds unpacks "crashreporter-symbols-full" uncompressed ELF debug symbols.
settings append target.debug-file-search-paths @topobjdir@/dist/crashreporter-symbols
Expand Down
11 changes: 4 additions & 7 deletions mobile/android/docs/geckoview/contributor/native-debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,12 @@ exist) and add the following lines.
The first line tells LLDB to enable inline breakpoints - Android Studio
will need this if you want to use visual breakpoints.

The remaining lines tell LLDB where to go to find the symbols for
debugging.
The next line tells LLDB where to go to find the symbols for debugging.

.. code:: bash
settings set target.inline-breakpoint-strategy always
settings append target.exec-search-paths <PATH>/objdir-android-opt/toolkit/library/build
settings append target.exec-search-paths <PATH>/objdir-android-opt/mozglue/build
settings append target.exec-search-paths <PATH>/objdir-android-opt/security
settings append target.exec-search-paths <PATH>/objdir-android-opt/dist/bin
Set up Android Studio to perform native debugging.
==================================================
Expand All @@ -89,8 +86,8 @@ Set up Android Studio to perform native debugging.
that configures Gecko and child processes in order to attach
debuggers at the correct times.
4. Under ``Symbol Directories``, add a new path pointing to
``<PATH>/objdir-android-opt/toolkit/library/build``, the same path
that you entered into your ``.lldbinit`` file.
``<PATH>/objdir-android-opt/dist/bin``, the same path that you
entered into your ``.lldbinit`` file.
5. Select ``Apply`` and ``OK`` to close the window.

Debug Native code in Android Studio
Expand Down

0 comments on commit cc80124

Please sign in to comment.