Two projects on a solution

Sysprogs forums Forums VisualGDB Two projects on a solution

This topic contains 4 replies, has 2 voices, and was last updated by  support 8 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #438

    andu
    Participant

    Hello,

    I have two android projects with native code: one is a sample that is used to test the real project and the project let’s call it Lib.
    To debug the java part from both of them while running the sample in Eclipse I created a linked source to Lib.

    For the native code part I succeed to create a visualGDB project for the sample and do some debug, but from this project I can only debug the code from sample and I cannot debug the Lib. Can you please let me know how to add the Lib project to Sample or how to create a solution with the both projects?

    I have also tried to create a project for the Lib, but I receive ‘AndroidManifest.xml not found or could not be loaded’ error.

    Thanks

    #2104

    support
    Keymaster

    Hi,

    In order to debug your Lib VisualGDB would need 2 things:
    1. An AndroidManifest.xml file so that it can know which app to attach to.
    2. The libraries with debug symbols put into obj and libs folders, so that VisualGDB can set breakpoints and find code in source files.

    You can emulate both by copying the files to the project directory:
    1. Copy AndroidManifest.xml file to the directory of your lib project (or to the directory that you specified as a “build directory” when creating the project)
    If this does not solve the problem, please attach your AndroidManifest.xml here.
    2. Copy your .so file to libsarmeabi
    3. Copy your .so file with symbols to
    objarmeabi

    Once this is done, the library project should be debuggable the same way as the app project (including co-debug with Eclipse).
    If you have any further difficulties, feel free to post here or contact support directly.

    #2105

    andu
    Participant

    I did not try your previous suggestion, because I created the visual GDB project from the scratch(several times) and every time I try to debug I receive the following error:”Cannot connect to gdbserver. Please start debugging again, If the problem persist, increase additional gdbserver startup delay in VisualGDB project settings”.
    And then I don’t receive any suggestion from VisualGDB ->”The knowledge base contains no information about your problem. Please ensure that you have the latest NDK/SDK installed and then try debugging again.”
    And sometimes(rarely) I receive same error message but none of the fixes from http://visualgdb.com/KB/?ProblemID=nopkg work.

    My steps are: stat debug session from Eclipse then attach to the running activity from Visual Studio. An window with “VisualGDB is starting the Android debug session..” appears and then the previous error message.

    Gdbserver log:
    Attached; pid = 5599
    Listening on port 5039
    Remote debugging from host 127.0.0.1

    GDB log:
    -gdb-set solib-search-path C:/Users/andumitru/AppData/Local/VisualGDB/AndroidBinaryCache/0123456789ABCDEF;D:/…/ADCTest/obj/local/armeabi
    ^done
    -target-select remote :5039
    ~”Ignoring packet error, continuing…n”
    ~”Ignoring packet error, continuing…n”
    =thread-group-started,id=”i1″,pid=”42000″
    =thread-created,id=”1″,group-id=”i1″
    ~”Ignoring packet error, continuing…n”
    =thread-group-exited,id=”i1″
    ^error,msg=”Malformed response to offset query, timeout”

    I am using the latest SDK and Android NDK, Revision 8b version and Visual studio 2008. Do you have any idea how to fix this?
    The odd thing is that yesterday worked and I did the same steps as today(but I erased that project), the only thing that is different is the device I’m running the application on. This can be an issue?

    Thanks

    #2106

    support
    Keymaster

    Hi,

    Based on the log you have provided, some data gets lost between your PC and the Android device, so that GDB cannot really debug it.
    This might happen if you are running VisualGDB inside a VM or if it can be also caused by a buggy device driver.

    Are both devices using the same driver (according to Windows device manager)? Is there any software on your computer that might try to access the Android device on its own and thus interfere with debugging?

    #2103

    andu
    Participant

    I believe it was a buggy device.
    I also tried your previous suggestions and worked.
    Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.