![]() Use -launch= to start the next launchableĪctivity. Starting ndk-gdb with this option specified launches the first launchable activity listed You can override this default behavior by using -start toĮxplicitly launch the application on the target device before the debugging session. When you start ndk-gdb, it tries by default to attach to an existing running instance of Note that this option does not kill the actual app being debugged, which you must kill This option kills the other session, and replaces it with a new one. It is necessary only for debugging problems when the debugger can't connect to theĪpp, and the error messages that ndk-gdb displays are not enough.īy default, ndk-gdb aborts if it finds that another native debugging session is already This option tells the build system to print verbose information about the native-debugging If set, the script will use the LLDB Debugger for the session instead of gdb. Common ndk-gdb options and their descriptions. Shows a number of the more commonly used ones, along with brief descriptions. To see a complete list of options, type ndk-gdb -help on the command line. ![]() launch= option to automatically start your activity before the debugging ![]() Checks that, on the device, the installed application with the same package name is alsoīy default, ndk-gdb searches for an already-running application process, and displays anĮrror if it doesn't find one.Checks that your application is declared debuggable in its manifest.these checks include making sure that the following conditions are satisfied: Ndk-gdb handles many error conditions, and displays an informative error message if itįinds a problem. Note that when you quit the GDB prompt, the application process that you're debugging stops. For a comprehensive list of commands, see the Use b to set breakpoints, and c (for "continue") to You interact with ndk-gdb in the same way as you would with GNU GDB. Next, ndk-gdb displays a normal GDB prompt. Symbol/debug versions of these libraries on your target device. This is normal, because your host machine does not contain On successfully attaching to yourĪpplication process, ndk-gdb outputs a long series of error messages, noting that it cannotįind various system libraries. When you invoke ndk-gdb, it configures the session to look for your source filesĪnd symbol/debug versions of your generated native libraries. Here, $PROJECT points to your project's root directory, and $NDK points to your To invoke the ndk-gdb script, change into the application directory or any directory under Debug on a device or emulator running Android 2.2 or higher.ĪPI level that you declare in your AndroidManifest.xml file does not matter.Build your app to run on Android 2.2 (Android API level 8) or higher.element that sets the android:debuggable attribute to true. Enable app debugging in your AndroidManifest.xml file by including an.The ndk-gdb scriptĭoes not support using the legacy make APP= method to build. Build your app using the ndk-build script.Users who prefer to use a GUI shouldįor command-line native debugging to work, these requirements must be met: The NDK includes a shell script named ndk-gdb to start aĬommand-line native debugging session.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |