(wasm: &str, extra_args: &[&str])
| 448 | } |
| 449 | |
| 450 | fn test_dwarf_simple(wasm: &str, extra_args: &[&str]) -> Result<()> { |
| 451 | println!("testing {wasm:?}"); |
| 452 | let mut args = vec![ |
| 453 | "-Ccache=n", |
| 454 | "-Oopt-level=0", |
| 455 | "-Ddebug-info", |
| 456 | "-Wshared-memory", |
| 457 | ]; |
| 458 | args.extend(extra_args); |
| 459 | args.push(wasm); |
| 460 | let output = lldb_with_script( |
| 461 | &args, |
| 462 | r#" |
| 463 | breakpoint set --file dwarf_simple.rs --line 3 |
| 464 | breakpoint set --file dwarf_simple.rs --line 5 |
| 465 | r |
| 466 | fr v |
| 467 | c |
| 468 | fr v |
| 469 | breakpoint disable 2 |
| 470 | c"#, |
| 471 | )?; |
| 472 | |
| 473 | check_lldb_output( |
| 474 | &output, |
| 475 | r#" |
| 476 | check: Breakpoint 1: no locations (pending) |
| 477 | check: Unable to resolve breakpoint to any actual locations. |
| 478 | check: 1 location added to breakpoint 1 |
| 479 | check: stop reason = breakpoint 1.1 |
| 480 | check: dwarf_simple.rs:3 |
| 481 | check: a = 100 |
| 482 | check: dwarf_simple.rs:5 |
| 483 | check: a = 110 |
| 484 | check: b = 117 |
| 485 | check: resuming |
| 486 | check: exited with status = 0 |
| 487 | "#, |
| 488 | )?; |
| 489 | Ok(()) |
| 490 | } |
| 491 | |
| 492 | #[test] |
| 493 | #[ignore] |
no test coverage detected