# debug: fix reading \-gdwarf generated debug sections in COFF files · gitcafe/zig

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

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

Visibility: public

Requested revision: f991b9dc05706613839743f970a32d516085f182

Requested commit: f991b9dc05706613839743f970a32d516085f182

Commit: f991b9dc05706613839743f970a32d516085f182

Tree: cd78cc290863b47a88c5e2892f78695be9d97010

Author: kcbanner

Committer: kcbanner

## Message

```
debug: fix reading -gdwarf generated debug sections in COFF files

I had accidentally regressed support for -gdwarf in 461fb499f3cff9038a427eae120fb34defc9ab38 when I changed the logic to
use the already-mapped exe/dll image instead of loading it from disk. The string table is mapped as all zeroes by the loader,
so if a section header's name is longer than 8 bytes (like the ones generated by -gdwarf), then the name can't be read.

Now, if any section headers require the string table, the file is mapped from disk.

windows: Add NtCreateSection/NtMapViewOfSection/NtUnmapViewOfSection

```

## Parents

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

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