|
1 | 1 | ## Debugging the native libraries in Android Studio with LLDB
|
2 | 2 |
|
3 |
| -1. Make sure the native libraries have been built with debug symbols. If using the `android/build.sh` |
4 |
| - script, run `SKIP_STRIPPING=yes ./android/build.sh --dev-build`. |
5 |
| -2. In Android Studio, go to `Run -> Edit configurations...` |
6 |
| -3. Make sure the `app` configuration is selected. |
7 |
| -4. In the `Debugger` tab, select `Dual (Java + Native)` |
8 |
| -5. Start debugging the app as usual from Android Studio. The app should now stop on a SIGURG signal. |
9 |
| -6. Select the `LLDB` tab in the debugger. Now you can set breakpoints etc, e.g. |
| 3 | +1. In Android Studio, go to `Run -> Edit configurations...` |
| 4 | +2. Make sure the `app` configuration is selected. |
| 5 | +3. In the `Debugger` tab, select `Dual (Java + Native)` |
| 6 | +4. Start debugging the app as usual from Android Studio. The app should now stop on a SIGURG signal. |
| 7 | +5. Select the `LLDB` tab in the debugger. Now you can set breakpoints etc, e.g. |
10 | 8 | `breakpoint set -n open_tun`
|
11 |
| -7. Before continuing run `pro hand -p true -s false SIGURG` |
12 |
| -8. Click `Resume Program` and the app will resume until the breakpoint is hit. |
| 9 | +6. Before continuing run `pro hand -p true -s false SIGURG` |
| 10 | +7. Click `Resume Program` and the app will resume until the breakpoint is hit. |
13 | 11 |
|
14 | 12 | NOTE: When running LLDB, Android Studio can sometimes get into a state where it will try to
|
15 | 13 | connect to the debugger when running the app normally, which blocks the app from starting.
|
|
0 commit comments