[Libreoffice-commits] online.git: android/app android/README

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Apr 10 15:49:25 UTC 2019


 android/README           |   51 +++++++++++++++++++++++++++++++++++++++++++++++
 android/app/build.gradle |    8 -------
 2 files changed, 51 insertions(+), 8 deletions(-)

New commits:
commit 75949f6fd2638458075e3b34f31d43815368c19a
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed Apr 10 12:38:55 2019 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Wed Apr 10 17:49:06 2019 +0200

    android: How to debug the native code with symbols.
    
    Also no need to avoid stripping any more, the symbols are not necessary
    inside the .apk.
    
    Change-Id: I4d9f4c3db26c3d61af3cc5167589fcc82834d7f9
    Reviewed-on: https://gerrit.libreoffice.org/70516
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/android/README b/android/README
index b0ff55cb3..5e63218af 100644
--- a/android/README
+++ b/android/README
@@ -50,6 +50,57 @@ build the native parts on Windows.
   + Open this 'android' subdir as a project
   + Build from Android Studio (Build -> Make Project)
 
+== Debugging ==
+
+To debug the native code in Android Studio, you need the debugging symbols and
+to setup lldb to actually read & use them.
+
+* [Temporary] Cherry pick the following patches in your core.git (if they are
+  not in master yet):
+
+  https://gerrit.libreoffice.org/70366
+  https://gerrit.libreoffice.org/70367
+  https://gerrit.libreoffice.org/70369
+  https://gerrit.libreoffice.org/70370
+  https://gerrit.libreoffice.org/70389
+
+* Add debugging symbols for the modules you are interested in
+
+  To autogen.input, add something like:
+
+    --enable-symbols="vcl/ desktop/ sal/ svx/ framework/ sfx2/ tools/ cppu/ cppuhelper/ filter/ comphelper/ Library_sw Library_swd Library_swui"
+
+  clean the appropriate modules, like
+
+    make vcl.clean desktop.clean sal.clean svx.clean framework.clean sfx2.clean tools.clean cppu.clean cppuhelper.clean filter.clean comphelper.clean sw.clean
+
+  and rebuild using 'make'.
+
+* Add android/source/obj/local/armeabi-v7a from core.git as a Symbol Directory
+
+  In Android Studio, choose Run -> Debug... -> Edit Configurations...
+
+  There go to the Android App -> app, choose the Debugger tab, and:
+
+  Debug type: Auto (or Dual)
+
+  Symbol Directories: here add the full path, like
+
+    /local/libreoffice/master-android/android/source/obj/local/armeabi-v7a
+
+  This path contains the non-stripped version of the liblo-native-code.so, and
+  the debugger will read the symbols from that one (even if the APK contains
+  the stripped version).
+
+  [Alternatively you can add the following to your ~/.lldbinit instead:
+
+    settings set target.inline-breakpoint-strategy always
+    settings append target.exec-search-paths /local/libreoffice/master-android/android/source/obj/local/armeabi-v7a
+  ]
+
+From now on, you will be able to debug directly in the Android Stuido
+debugger.  Happy debugging!
+
 == Tip: How to speed up your core.git build ==
 
 If you use icecream for parallel building, you can use it for
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 522ff61b9..b972d243e 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -40,14 +40,6 @@ android {
             path "src/main/cpp/CMakeLists.txt"
         }
     }
-
-    if (gradle.startParameter.taskNames.contains(":app:assembleDebug")) {
-        // do not strip the .so's in the debug buils to allow convenient
-        // debugging
-        packagingOptions {
-            doNotStrip '**/*.so'
-        }
-    }
 }
 
 repositories {


More information about the Libreoffice-commits mailing list