Bug 17904 - Unable to debug using GDB command
Summary: Unable to debug using GDB command
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.12.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2014-02-20 03:03 UTC by narayanp
Modified: 2014-03-12 18:42 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 17904 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description narayanp 2014-02-20 03:03:44 UTC
Steps to reproduce:
I am following steps from test case: https://testrail.xamarin.com/index.php?/tests/view/1558291

Actual result: I am successfully able to build project using first steps but when I am following step 2 to run sample using GDB, I am getting build error mentioned in gist: https://gist.github.com/saurabh360/31efe791d316acb2fcd3

Expected result: User should able to run sample using GDB command.

Environment details:
All Mac and Windows
X.S 4.2.4(build 17)
mono 3.2.7
X.Android 4.12.0-25 and 4.12.0-22

Regression Status:
NOT A REGRESSION: same behavior with stable X.Android 4.10.1-68/73
Comment 1 Peter Collins 2014-02-20 12:55:09 UTC
In the gist you've linked the install target is failing because there is "No available device". Please Ensure your device is connected and is visible via the `adb devices` command and try to run this again.

adb can be found at:
$(ANDROID_SDK_PATH)/platform-toolds/adb devices
Comment 2 narayanp 2014-02-28 02:48:10 UTC
I have checked this again after connecting device with following builds:

All Mac
X.S 4.2.4(build 22)
Mono 3.2.7
X.Android 4.12.0-28

I am still getting error when running command xbuild /t:_Gdb sample.csproj this time it may be different. This is the gist for the same: https://gist.github.com/saurabh360/0c3ef8b6a4841182b2a6

Also please let us know how can we do the same on windows because when we run xbuild command on windows it gives error in command prompt like "xbuild is not recognized as an internal or external command". after exploring on google for this we found this link: http://originaldll.com/file/xbuild%20%283%29.exe/31594.html from here I have downloaded xbuild but it is also not working on windows
Comment 3 Peter Collins 2014-02-28 14:42:25 UTC
It looks like the failure is being caused by a permission issue:
failed to copy '/Users/nischal/Desktop/android-ndk-r8e/prebuilt/android-arm/gdbserver/gdbserver' to '/data/data/mono.samples.button/files/.__override__/gdbserver': Permission denied

What device are you attempting to deploy to? I would suggest disabling the "Fast Deployment" option within Xamarin studio and then install the application again.

Also, in order to test this case on windows please use MSBuild instead of xbuild. It can be found in your .net framework path (similar to C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe)
Comment 4 narayanp 2014-03-11 10:33:59 UTC
I have tried this issue with following builds:

Samsung S4 version 4.3
LG P500 version 2.3.3

I have disable fast deployment from project using Xamarin Studio and then used these command to install but I am still getting error. This is the screencast for the same: https://gist.github.com/saurabh360/5de10a45ccbc02981914
Comment 5 Peter Collins 2014-03-12 18:33:56 UTC
I have seen the previous failure[1] mentioned on our wrench lanes but this only occurs when building against Release mode. I am also unable to reproduce it locally, so I assume it is an environment issue with our wrench bots

[1] failed to copy
 ' ' to '/data/data/mono.samples.button/files/.__override__/gdbserver': Permission
Comment 6 Peter Collins 2014-03-12 18:42:14 UTC
I was actually just able to reproduce the issue mentioned in comment 5, but it does not appear to be the same error shown the output in comment 4 (and only happens when building Release) I will file a new bug for this.