3 ms·
It's not so much DWARF is the problem as it is that the information is just lost in omit-framepointer mode. You can't reconstruct it from nothing. There's a r
by loeg 4y ago
It's not so much DWARF is the problem as it is that the information is just lost in omit-framepointer mode. You can't reconstruct it from nothing.
There's a related problem of compilers generating imperfect debuginfo that fails to reconstruct local variables from registers/memory due to an incomplete DWARF representation, but I don't think that plays a roll in unwinding. (But maybe something similar does.)
- Dylan16807 4y agoWhat information is lost? The call stack can't be lost or you'd crash immediately.
- saagarjha 4y agoIt's lost in the translation to DWARF. Of course the program knows how to unwind its own stack correctly, but explaining how to do this for arbitrary programs is untenable without DWARF to help, and it's annoying to parse and compilers don't emit it correctly.
- Dylan16807 4y agoIf the information is lost by DWARF then I'd say that DWARF is clearly the problem. Unless DWARF can handle it fine and compilers are thoroughly broken, in which case it's a tossup between "DWARF is fundamentally flawed" and "compiler designers are lazy for some unknown reason"?
- saagarjha 4y agoDWARF can handle it fine, it’s that compilers don’t generate correct information or the tools to parse DWARF don’t do it properly.