Bug 42257 - /t:_GDB doesn't work with ndk r11c
Summary: /t:_GDB doesn't work with ndk r11c
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 6.1.0 (C7)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Habersack
Depends on:
Reported: 2016-06-29 16:43 UTC by Andi McClure
Modified: 2016-09-01 17:54 UTC (History)
2 users (show)

Tags: XATriaged
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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Andi McClure 2016-06-29 16:43:02 UTC
We have a documented feature by which you can run monodroid under gdb:


Running with current master (and, I believe, any release using r11c) the feature does not work. It fails with:

/Users/andi/work/g/_android/monodroid/out/lib/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets: error : Error executing task GetGdbPaths: error XA5101: C compiler for target Arm64 was not found. Tried paths: "/Users/andi/work/g/_android/android-sdk-tool/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin/aarch64-linux-android-gdb"

This is because of two problems, both outlined in this mailing list thread:


The various hardware-target gdbs have been collapsed into one multitarget gdb; and the new, replacement gdb contains a bug in r11c where "osabi" is not correctly set.

The fix contains two steps:

1. Instead of calling aarch64-linux-android-gdb or whatever, call just gdb

2. Either one of the two changes must be made:

2a. Upgrade to r12, which fixes the osabi problem, or

2b. Change our gdb.env script to run
set osabi GNU/Linux
before doing anything else.
Comment 1 Ludovic Henry 2016-09-01 17:01:43 UTC
this should be fixed with https://github.com/xamarin/xamarin-android/pull/193
Comment 2 Marek Habersack 2016-09-01 17:54:00 UTC
Closing as per comment 1