| ... | ... | @@ -695,6 +695,44 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void { |
| 695 | 695 | \\1 breakpoints deleted; 0 breakpoint locations disabled. |
| 696 | 696 | }, |
| 697 | 697 | ); |
| 698 | db.addLldbTest( |
| 699 | "link_object", |
| 700 | target, |
| 701 | &.{ |
| 702 | .{ |
| 703 | .path = "main.zig", |
| 704 | .source = |
| 705 | \\extern fn fabsf(f32) f32; |
| 706 | \\pub fn main() void { |
| 707 | \\ var x: f32 = -1234.5; |
| 708 | \\ x = fabsf(x); |
| 709 | \\ _ = &x; |
| 710 | \\} |
| 711 | , |
| 712 | }, |
| 713 | }, |
| 714 | \\breakpoint set --file main.zig --source-pattern-regexp 'x = fabsf\(x\);' |
| 715 | \\process launch |
| 716 | \\frame variable x |
| 717 | \\breakpoint delete --force 1 |
| 718 | \\ |
| 719 | \\breakpoint set --file main.zig --source-pattern-regexp '_ = &x;' |
| 720 | \\process continue |
| 721 | \\frame variable x |
| 722 | \\breakpoint delete --force 2 |
| 723 | , |
| 724 | &.{ |
| 725 | \\(lldb) frame variable x |
| 726 | \\(f32) x = -1234.5 |
| 727 | \\(lldb) breakpoint delete --force 1 |
| 728 | \\1 breakpoints deleted; 0 breakpoint locations disabled. |
| 729 | , |
| 730 | \\(lldb) frame variable x |
| 731 | \\(f32) x = 1234.5 |
| 732 | \\(lldb) breakpoint delete --force 2 |
| 733 | \\1 breakpoints deleted; 0 breakpoint locations disabled. |
| 734 | }, |
| 735 | ); |
| 698 | 736 | } |
| 699 | 737 | |
| 700 | 738 | const File = struct { import: ?[]const u8 = null, path: []const u8, source: []const u8 }; |