2
1

790-debian_dwarf2-cfi-warning.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. Status: Unsuitable for upstream (at least, without a lot of arguing).
  2. GCC does not specify the state of every last register in the CIE. Since
  3. GCC's focus is on correctness of runtime unwinding, any registers which
  4. have to be unwound will be specified; but unmodified registers will not
  5. be explicitly marked. (How about modified, call-clobbered registers?
  6. I'm not sure if they are marked as unavailable.)
  7. GDB issues a noisy warning about this. The warning is generally not useful,
  8. and we can get it extremely frequently (any time we load a new CIE).
  9. This patch disables the warning. Alternately we could set the complaints
  10. threshold to zero, or implement a default frame init-register method for
  11. every architecture. But someday the compiler will support using different
  12. calling conventions for internal functions, so that's not much of a stopgap.
  13. ARM has a complex algorithm for handling this, involving scanning all CIEs -
  14. benefit not completely clear outside of the ARM context of flexible register
  15. sets.
  16. Index: gdb-6.3/gdb/dwarf2-frame.c
  17. ===================================================================
  18. --- gdb-6.3.orig/gdb/dwarf2-frame.c 2004-11-15 11:54:57.000000000 -0500
  19. +++ gdb-6.3/gdb/dwarf2-frame.c 2004-12-08 18:02:23.896409471 -0500
  20. @@ -705,9 +705,12 @@ dwarf2_frame_cache (struct frame_info *n
  21. table. We need a way of iterating through all the valid
  22. DWARF2 register numbers. */
  23. if (fs->regs.reg[column].how == DWARF2_FRAME_REG_UNSPECIFIED)
  24. - complaint (&symfile_complaints,
  25. - "Incomplete CFI data; unspecified registers at 0x%s",
  26. - paddr (fs->pc));
  27. + {
  28. + if (0)
  29. + complaint (&symfile_complaints,
  30. + "Incomplete CFI data; unspecified registers at 0x%s",
  31. + paddr (fs->pc));
  32. + }
  33. else
  34. cache->reg[regnum] = fs->regs.reg[column];
  35. }