# std.debug.Dwarf: better source location information · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/022bca9b0600da3dda8b30fefe8eb817647b0f08)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 022bca9b0600da3dda8b30fefe8eb817647b0f08

Requested commit: 022bca9b0600da3dda8b30fefe8eb817647b0f08

Commit: 022bca9b0600da3dda8b30fefe8eb817647b0f08

Tree: 9a855d043651aef5e599292ed461d49326d9739c

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.debug.Dwarf: better source location information

Two fixes here:

Sort by addresses after generating the line table. Debug information in
the wild is not sorted and the rest of the implementation requires this
data to be sorted.

Handle DW.LNE.end_sequence correctly. When I originally wrote this code,
I misunderstood what this opcode was supposed to do. Now I understand
that it marks the *end* of an address range, meaning the current address
does *not* map to the current line information.

This fixes source location information for a big chunk of ReleaseSafe
code.

```

## Parents

- [a9e7fb0e0189e01ebf67b144aca3fd8c318925c3](https://git.cafe/gitcafe/zig/commit/a9e7fb0e0189e01ebf67b144aca3fd8c318925c3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/022bca9b0600da3dda8b30fefe8eb817647b0f08?format=markdown)
