On tor, 2018-12-06 at 16:32 +0100, Andreas Arnez via Dwarf-Discuss
wrote:
> If GDB uses caller-saved register values from the inner-most frame in
> outer frames, then this is a bug.  Note that this could also be
> caused
> by bad CFI.

Hmm, right. I'm not very familiar with the design philosophy of GDB,
but as far as I have understood it they prefer to rely on producer to 
emit such information. In the LLVM bug report [0] I wrote for this I
mentioned using DW_CFA_undefined for caller-saved registers, or at
least for those that it knows are clobbered.

Neither GCC nor Clang emits CFI for caller-saved registers at the
moment. I have not been successful in finding out why, but my
(uneducated) guess is that, maybe at least one of the reasons, is
debug info size concerns?

[0] https://bugs.llvm.org/show_bug.cgi?id=39752

Best regards,
David
_______________________________________________
Dwarf-Discuss mailing list
Dwarf-Discuss@lists.dwarfstd.org
http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org

Reply via email to