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
    Posts
  • #568

    aqualung99
    Participant

    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 Android.mk 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 Android.mk files look like.

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

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

    #2421

    support
    Keymaster

    Hi,

    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.

    #2420

    aqualung99
    Participant

    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 ๐Ÿ™‚

    #2422

    support
    Keymaster

    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?

    #2423

    aqualung99
    Participant

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

    [attachment=1:187uuw55]VisualGDB info.zip[/attachment:187uuw55]

    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 startup.zip[/attachment:187uuw55]

    #2425

    support
    Keymaster

    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.

    #2424

    aqualung99
    Participant

    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.