# x86: fix generating debug info for variables · gitcafe/zig

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

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

Visibility: public

Requested revision: aeaffd42f6d1c8fc92fa7669a579a8e6c46eb641

Requested commit: aeaffd42f6d1c8fc92fa7669a579a8e6c46eb641

Commit: aeaffd42f6d1c8fc92fa7669a579a8e6c46eb641

Tree: aad5e99e972b3cb4fe3b92aaf355ea86037de334

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
x86: fix generating debug info for variables

Add handling for these additional `MCValue`s:
* `.immediate` - lower to `DW.OP.consts` or `DW.OP.constu` depending
  on signedness followed by popping off the DWARF stack with
  `DW.OP.stack_value`
* `.undef` - lower to `DW.OP.implicit_value`
* `.none` - lower to `DW.OP.lit0` followed by popping off the DWARF
  stack with `DW.OP.stack_value`

For any remaining unhandled case, we generate `DW.OP.nop` in order
not to mess up remaining DWARF info.

```

## Parents

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

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