Note that there are some explanatory texts on larger screens.

plurals
  1. PONot able to attach the ndk-gdb to the android application
    primarykey
    data
    text
    <p>I am trying to attach the ndk-gdb to my Android application. </p> <p>I am using is <code>Android-ndk-r6b</code> and device is Android 2.3,Samsung Galaxy S II. </p> <p>I followed all the steps in this example <a href="http://freelancer-suman.blogspot.in/p/debugging-native-code-in-android-app.html" rel="nofollow noreferrer">Click here for the example</a></p> <p>And also I tried with one application, when I am trying to attach gdb with another application but the verbose showing that it is always getting attached to the first application itself</p> <pre><code>Found package name: &lt;1st attached package name&gt; </code></pre> <p>I tried to launch the <code>ndk-gdb</code> using this command for the first time:</p> <pre><code> ndk-gdb --start --force --verbose </code></pre> <p>I tried to attach to another application with the below command but not able to succeed:</p> <pre><code>ndk-gdb --launch=com.example.hellogdbserver.HelloGdbServer --force --verbose </code></pre> <p>I am always getting the below error with first application:</p> <pre><code>ERROR: Non-debuggable application installed on the target device.Please re-install the debuggable version! </code></pre> <p>This is complete shell log which i am getting </p> <pre><code> sh-4.1$ ndk-gdb --verbose --start --force Android NDK installation path: /cygdrive/c/Android/android-ndk Using default adb command: /cygdrive/c/Android/android-sdk-windows/platform-tools/adb ADB version found: Android Debug Bridge version 1.0.26 Using final ADB command: '/cygdrive/c/Android/android-sdk-windows/platform-tools/adb' Using auto-detected project path: /cygdrive/d/EclipseTestWorkspace/hello-gdbserver Found package name: com.example.hellogdbserver ABIs targetted by application: armeabi Device API Level: 10 Device CPU ABIs: armeabi-v7a armeabi Compatible device ABI: armeabi Found debuggable flag: true Found device gdbserver: /data/data/com.example.hellogdbserver/lib/gdbserver Using gdb setup init: /cygdrive/d/EclipseTestWorkspace/hello-gdbserver/libs/armeabi/gdb.setup Using toolchain prefix: /cygdrive/c/Android/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi- Using app out directory: /cygdrive/d/EclipseTestWorkspace/hello-gdbserver/obj/local/armeabi ERROR: Could not extract package's data directory. Are you sure that your installed application is debuggable? sh-4.1$ </code></pre> <p>Please let me know how can I resolve the above error and also how to attach to new package.</p> <p>My phone is not rooted. Hope this wont affect the gdb.</p> <p>This was not helpful as well <a href="https://stackoverflow.com/questions/6158953/running-ndk-gdb-with-package-not-found-error-on-motorola-phone">Link to similar problem</a>. As my phone is new phone and dont have any app, other than the current developing app. (Only packages which come along with the Samsung phone are present. No app is downloaded from the market. )</p> <p>Thanks &amp; Regards,<br> SSuman185</p> <hr> <p>Please go through the link <a href="http://freelancer-suman.blogspot.in/p/debugging-native-code-in-android-app.html" rel="nofollow noreferrer">Debugging native code in android app using the android ndk gdb</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload