File tree 2 files changed +10
-9
lines changed
test/standalone/coff_dwarf
2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,10 @@ pub fn build(b: *std.Build) void {
7
7
b .default_step = test_step ;
8
8
9
9
const optimize : std.builtin.OptimizeMode = .Debug ;
10
- const target = b .standardTargetOptions (.{});
11
-
12
- if (builtin .os .tag != .windows ) return ;
10
+ const target = if (builtin .os .tag == .windows )
11
+ b .standardTargetOptions (.{})
12
+ else
13
+ b .resolveTargetQuery (.{ .os_tag = .windows });
13
14
14
15
if (builtin .cpu .arch == .aarch64 ) {
15
16
// https://github.com/ziglang/zig/issues/18427
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ pub fn main() !void {
17
17
18
18
const module = try debug_info .getModuleForAddress (add_addr );
19
19
const symbol = try module .getSymbolAtAddress (allocator , add_addr );
20
- defer symbol .deinit ( allocator );
20
+ defer if ( symbol .source_location ) | sl | allocator . free ( sl . file_name );
21
21
22
- try testing .expectEqualStrings ("add" , symbol .symbol_name );
23
- try testing .expect (symbol .line_info != null );
24
- try testing .expectEqualStrings ("shared_lib.c" , std .fs .path .basename (symbol .line_info .? .file_name ));
25
- try testing .expectEqual (@as (u64 , 3 ), symbol .line_info .? .line );
26
- try testing .expectEqual (@as (u64 , 0 ), symbol .line_info .? .column );
22
+ try testing .expectEqualStrings ("add" , symbol .name );
23
+ try testing .expect (symbol .source_location != null );
24
+ try testing .expectEqualStrings ("shared_lib.c" , std .fs .path .basename (symbol .source_location .? .file_name ));
25
+ try testing .expectEqual (@as (u64 , 3 ), symbol .source_location .? .line );
26
+ try testing .expectEqual (@as (u64 , 0 ), symbol .source_location .? .column );
27
27
}
You can’t perform that action at this time.
0 commit comments