PATCH: PR 18655

Mark Mitchell mark@codesourcery.com
Mon May 9 20:25:00 GMT 2005


This patch fixes a problem with the generation of debug information on
PowerPC GNU/Linux.  I posted this patch on Friday, and Alan Modra and
Dan Jacobowitz said it looked sensible.  Since then, I've done the
usual GCC testing.  I tried to run the GDB testsuite, but the results
weren't very good on the powerpc64-linux-gnu box I was using; probably
the kernel or C library need updating.  However, the results were the
same before and after the patch.  I've also made myself familiar
enough with the code that now the patch seems nearly obvious to me.

So, I went ahead and checked it on the mainline.

If there are any problems, please let me know.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2005-05-09  Mark Mitchell  <mark@codesourcery.com>

	PR 18655
	* dwarf2out.c (output_call_frame_info): Use DWARF2_FRAME_REG_OUT
	before outputting DWARF_FRAME_RETURN_COLUMN.

Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.461.2.12.2.1
diff -c -5 -p -r1.461.2.12.2.1 dwarf2out.c
*** dwarf2out.c	1 Apr 2005 20:31:48 -0000	1.461.2.12.2.1
--- dwarf2out.c	7 May 2005 00:12:55 -0000
*************** output_call_frame_info (int for_eh)
*** 1934,1943 ****
--- 1934,1944 ----
    char augmentation[6];
    int augmentation_size;
    int fde_encoding = DW_EH_PE_absptr;
    int per_encoding = DW_EH_PE_absptr;
    int lsda_encoding = DW_EH_PE_absptr;
+   int return_reg;
  
    /* Don't emit a CIE if there won't be any FDEs.  */
    if (fde_table_in_use == 0)
      return;
  
*************** output_call_frame_info (int for_eh)
*** 2055,2068 ****
    dw2_asm_output_nstring (augmentation, -1, "CIE Augmentation");
    dw2_asm_output_data_uleb128 (1, "CIE Code Alignment Factor");
    dw2_asm_output_data_sleb128 (DWARF_CIE_DATA_ALIGNMENT,
  			       "CIE Data Alignment Factor");
  
    if (DW_CIE_VERSION == 1)
!     dw2_asm_output_data (1, DWARF_FRAME_RETURN_COLUMN, "CIE RA Column");
    else
!     dw2_asm_output_data_uleb128 (DWARF_FRAME_RETURN_COLUMN, "CIE RA Column");
  
    if (augmentation[0])
      {
        dw2_asm_output_data_uleb128 (augmentation_size, "Augmentation size");
        if (eh_personality_libfunc)
--- 2056,2070 ----
    dw2_asm_output_nstring (augmentation, -1, "CIE Augmentation");
    dw2_asm_output_data_uleb128 (1, "CIE Code Alignment Factor");
    dw2_asm_output_data_sleb128 (DWARF_CIE_DATA_ALIGNMENT,
  			       "CIE Data Alignment Factor");
  
+   return_reg = DWARF2_FRAME_REG_OUT (DWARF_FRAME_RETURN_COLUMN, for_eh);
    if (DW_CIE_VERSION == 1)
!     dw2_asm_output_data (1, return_reg, "CIE RA Column");
    else
!     dw2_asm_output_data_uleb128 (return_reg, "CIE RA Column");
  
    if (augmentation[0])
      {
        dw2_asm_output_data_uleb128 (augmentation_size, "Augmentation size");
        if (eh_personality_libfunc)



More information about the Gcc-patches mailing list