diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2022-01-25 21:47:21 +0100 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2022-01-26 17:28:58 +0100 |
| commit | 4192be84039cfac9ec458dc42370f67d700bd8ed (patch) | |
| tree | 0cd4faa2a22d76730ebcc008cfc6e232957aef49 /src/Compilation.zig | |
| parent | aa4eaea778d090e7f0fde74409106d02c075d1ec (diff) | |
| download | zig-4192be84039cfac9ec458dc42370f67d700bd8ed.tar.gz zig-4192be84039cfac9ec458dc42370f67d700bd8ed.zip | |
elf: implement slice types in debug info
Implements slice types including `[]const u8` for passing as
formal parameters in DWARF. Breaking on a function accepting
a slice in `gdb` will now yield the same behavior as stage1 and/or
LLVM backend:
```zig
fn sumArrayLens(a: []const u32, b: []const u8) usize {
return a.len + b.len;
}
```
Both `a` and `b` can now be inspected in the debugger:
```
Breakpoint 1, sumArrayLens (a=..., b=...) at arr.zig:59
(gdb) p a
$1 = {ptr = 0x7fffffff685c, len = 5}
(gdb) p b
$2 = {ptr = 0x7fffffff683d "\252\252\252\\h\377\377\377\177", len = 3}
(gdb)
```
Diffstat (limited to 'src/Compilation.zig')
0 files changed, 0 insertions, 0 deletions
