Can’t set breakpoints

Sysprogs forums Forums VisualGDB Can’t set breakpoints

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

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #568


    I have a native android app that builds and runs ok (with bugs of course!) so I’m trying out this tool.
    Everything seemed to be pretty happy; the New Android Project wizard read in my existing files (plural, I have many in a subdir hierarchy) and created a nice project for me, that also builds correctly.
    When I hit run though, my breakpoints won’t set. Here is what the GDB session outputs. See below (way, way below) for a snippet of what my files look like.

    To get around the ridiculously non-operational call all-subdir-makefiles script, I use a format like this in my files:

    I wonder if the problem is in the ‘//’ that somehow got generated as part of the path? Or, maybe it’s something else?




    Please run the “info sources” command as described here.
    The command will list all source files known by GDB and will probably answer why r:/Projects/VA128//jni/arch_android.cpp is not accepted.
    Feel free to post the “info sources” output here.



    Thank you for your reply. That page was helpful for me understanding what was going on, at least partially. I had paths of the form:

    in my “info sources” but paths of the form

    were expected by my .so file. From the helpful page you sent me:

    Note that GDB requires the file path to be EXACTLY the same as reported by “info sources”, including double slash before “jni”.

    A clean build using VisualGDB’s built-in make commands resolved that problem. Nice!
    Unfortunately, it’s still not working. But now, I get this:

    Not quite sure what to do next ๐Ÿ™‚



    That is very strange. Is the library actually loaded at the time you set the breakpoint? Could you please run the “info sources” and “info shared” commands just after you set the breakpoint and post the entire log containing all 3 commands here?



    No problem. It’s too big to include here (by almost double) so I’ve attached it as a separate file.


    Hope it’s helpful! ๐Ÿ™‚

    Edit: Hmm, could it be the lower-case ‘r’ drive letter vs. the upper-case ‘R’ drive letter?? Where did that lower-case one come from? ๐Ÿ™‚

    Edit 2: Here’s Visual GDB’s startup output in case it’s helpful: [attachment=0:187uuw55]VisualGDB[/attachment:187uuw55]



    Thank you for the log files!
    It looks like there’s a bug in gdb 6.x shipped with the latest NDK that it refuses to take fully-qualified file paths on Windows. On ARM targets this is fixed by using prebuilt GDB 7.x that is provided with VisualGDB.
    We have added a workaround to the upcoming VisualGDB 2.8 to use file-name-only syntax as a last resort if GDB refuses to accept all other file name variations.

    The only workaround with the current version is to issue the breakpoint commands with file-name-only syntax manually (e.g. -break-insert -f arch_android.cpp:116).
    Alternatively you could use an ARM target until we release VisualGDB 2.8.



    And thank you for the help! I’ve tested and confirmed your hypothesis, ARM toolchain seems to work fine. ๐Ÿ™‚
    Of course I’ve already gotten spoiled by HAXM…I supposed I’ll have to work with my real device now… ๐Ÿ˜‰

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

You must be logged in to reply to this topic.