Skip to content

Commit

Permalink
Auto merge of #33848 - alexcrichton:android-gdb-sysroot, r=michaelwoe…
Browse files Browse the repository at this point in the history
…rister

test: Use `set sysroot` for more NDK compatibility

Recent versions of the Android NDK no longer ship debuggers like
`arm-linux-androideabi-gdb`, but instead one prebuilt binary `gdb`. We can
symlink this into place at least to get our detection still working, but it now
needs to be told what the sysroot is so it can correctly do... something. Long
story short, tests didn't pass with this change and after this change they pass.
  • Loading branch information
bors committed May 29, 2016
2 parents 7746a33 + 0f3e865 commit 397cfae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,15 @@ actual:\n\

cmds = cmds.replace("run", "continue");

let tool_path = match self.config.android_cross_path.to_str() {
Some(x) => x.to_owned(),
None => self.fatal("cannot find android cross path")
};

// write debugger script
let mut script_str = String::with_capacity(2048);
script_str.push_str(&format!("set charset {}\n", Self::charset()));
script_str.push_str(&format!("set sysroot {}\n", tool_path));
script_str.push_str(&format!("file {}\n", exe_file.to_str().unwrap()));
script_str.push_str("target remote :5039\n");
script_str.push_str(&format!("set solib-search-path \
Expand Down Expand Up @@ -515,11 +521,6 @@ actual:\n\
}
}

let tool_path = match self.config.android_cross_path.to_str() {
Some(x) => x.to_owned(),
None => self.fatal("cannot find android cross path")
};

let debugger_script = self.make_out_name("debugger.script");
// FIXME (#9639): This needs to handle non-utf8 paths
let debugger_opts =
Expand Down

0 comments on commit 397cfae

Please sign in to comment.