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