diff options
| author | gnzlbg <gonzalobg88@gmail.com> | 2019-07-09 10:03:12 +0200 |
|---|---|---|
| committer | gnzlbg <gnzlbg@users.noreply.github.com> | 2019-07-14 15:29:19 +0200 |
| commit | f61cb90d87001830717b9b64aa065ef2bb4459c5 (patch) | |
| tree | 2cc7ed31db053b76fd074610c76d01085966bcf4 /library/stdarch/crates/stdarch-test/src/disassembly.rs | |
| parent | dffdd66d81800baaf60245883d03f619552a4a32 (diff) | |
| download | rust-f61cb90d87001830717b9b64aa065ef2bb4459c5.tar.gz rust-f61cb90d87001830717b9b64aa065ef2bb4459c5.zip | |
Try windows
Diffstat (limited to 'library/stdarch/crates/stdarch-test/src/disassembly.rs')
| -rw-r--r-- | library/stdarch/crates/stdarch-test/src/disassembly.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/library/stdarch/crates/stdarch-test/src/disassembly.rs b/library/stdarch/crates/stdarch-test/src/disassembly.rs index 23ebd92e740..576de65e591 100644 --- a/library/stdarch/crates/stdarch-test/src/disassembly.rs +++ b/library/stdarch/crates/stdarch-test/src/disassembly.rs @@ -57,7 +57,8 @@ pub(crate) fn disassemble_myself() -> HashSet<Function> { String::from_utf8_lossy(&output.stderr) ); assert!(output.status.success()); - String::from_utf8(output.stdout) + // Windows does not return valid UTF-8 output: + Ok(String::from_utf8_lossy(&output.stderr).to_string()) } else if cfg!(target_os = "windows") { panic!("disassembly unimplemented") } else if cfg!(target_os = "macos") { @@ -101,6 +102,7 @@ pub(crate) fn disassemble_myself() -> HashSet<Function> { fn parse(output: &str) -> HashSet<Function> { let mut lines = output.lines(); + println!("First 100 lines of the disassembly input containing {} lines:", lines.clone().count()); for line in output.lines().take(100) { println!("{}", line); } @@ -111,7 +113,9 @@ fn parse(output: &str) -> HashSet<Function> { if !header.ends_with(':') || !header.contains("stdarch_test_shim") { continue } + eprintln!("header: {}", header); let symbol = normalize(header); + eprintln!("normalized symbol: {}", symbol); let mut instructions = Vec::new(); while let Some(instruction) = lines.next() { if instruction.ends_with(':') { @@ -178,5 +182,11 @@ fn parse(output: &str) -> HashSet<Function> { }; assert!(functions.insert(function)); } + + eprintln!("all found functions dump:"); + for k in &functions { + eprintln!(" f: {}", k.name); + } + functions } |
