r/Compilers • • Sep 09 '26

Cross-platform stack traces

https://marinohimself.ch/blog/cross-platform-stack-traces.html
1 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/chnoblouch Sep 09 '26

That's true, but for now I mainly care about printing call stacks coming from my own language. My compiler always generates code for updating the frame pointer, so this should only be an issue when foreign functions are involved, in which case they would be skipped in the trace. I also believe -fomit-frame-pointer has fallen somewhat out of favor in the past years?

It would be great to have support for generating and parsing DWARF, but that would be a lot of work and I want to focus on other parts of the compiler first.

1

u/FloweyTheFlower420 Sep 09 '26

this seems like just an ubuntu thing. i can run perf with callgraph=dwarf just fine, so I don't see the value of not omitting frame pointers. llvm -O3 will omit frame pointers by default i believe.