This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

i use ds-5 debug,but breakpoint useless.

I use option [attach to a running android application].in addition to breakpoint useless the other is good.

i have replaced ds-5 gdbsever.

wrong.jpgwrong1.jpg

I build the apk in mac,debug in winx64.

  • Hi tida,

    A lot of the problems are down to not filling out the AndroidManifest.xml properly, as DS-5 requires certain things to be present to work out what to do. Especially important are the "process" and "activity" elements, but also the "debuggable" attributes for <application>.

    Do you have debug enabled in your build (modern Android build tools should modify the manifest dynamically if building for debug, *if* they are built using ant) or hardcoded into your manifest (this may be necessary if you're using ndk-build)?

    ADT will complain about hardcoding the debuggable attribute, but without this, the NDK library will have symbols (for resolution to link things together and for JNI to call into it) but not debug information. It is this debug information that will allow the debugger to find the source file used and correlate the source lines that correspond to the output code.

    You may also be having a bit of trouble with source code paths - building source code on a Mac and then loading it into a debugger on a PC may not work ideally because the paths stored in the debug information will be relative to the Mac. Before you set a breakpoint, use the command "set substitute-path" to give the debugger a hint as to the difference between your Mac and PC filesystem. For instance:

         set substitute-path "/home/tida/projects/" "C:\Client2"

    The documentation is here:

         ARM DS-5 Debugger Command Reference: set substitute-path

    Hope that helps you out.

    Ta,

    Matt