Skip to content

Commit

Permalink
Adding support for multi-arch debugging on ndk 8b+, breaking compatib…
Browse files Browse the repository at this point in the history
…ility on previous versions
  • Loading branch information
lukeweber committed Feb 12, 2013
1 parent da705ae commit 4f18d33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/main/java/com/jayway/maven/plugins/android/AndroidNdk.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,15 @@ public String getNdkBuildPath()
}
}


public File getGdbServer( String toolchain ) throws MojoExecutionException
public File getGdbServer( String ndkArchitecture ) throws MojoExecutionException
{
final File gdbServerFile;

gdbServerFile = new File( ndkPath, "toolchains/" + toolchain + "/prebuilt/gdbserver" );
String toolchain = "";
if ( "armeabi".equals( ndkArchitecture ) || "armeabi-v7a".equals( ndkArchitecture ) )
{
ndkArchitecture = "arm";
}
gdbServerFile = new File( ndkPath, "prebuilt/android-" + ndkArchitecture + "/gdbserver/gdbserver" );

// Some basic validation
if ( ! gdbServerFile.exists() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ private void optionallyCopyGdbServer( File destinationDirectory, String architec
if ( apkDebug )
{
// Copy the gdbserver binary to libs/<architecture>/
final File gdbServerFile = getAndroidNdk().getGdbServer( apkNativeToolchain );
final File gdbServerFile = getAndroidNdk().getGdbServer( architecture );
final File destDir = new File( destinationDirectory, architecture );
final File destFile = new File( destDir, "gdbserver" );
if ( ! destFile.exists() )
Expand Down

0 comments on commit 4f18d33

Please sign in to comment.