fuhsnn / slimcc

C11 compiler with GNU extensions for x86-64 Linux, working towards C23
MIT License
34 stars 4 forks source link

`.loc` should reflect filename override from #line controls #25

Closed fuhsnn closed 11 months ago

fuhsnn commented 11 months ago
#include <stdlib.h>

void fn(void) {
#22 "foo"
  abort();
}
int main(void){
#11 "bar"
  fn();
}

The above backtraced in gdb should be like

#3  0x000000000040114f in fn () at foo:22
#4  0x0000000000401158 in main () at bar:11