[patch] Dwarf3 CIE format

Nick Clifton nickc@redhat.com
Thu May 13 14:51:00 GMT 2004


Hi Paul,

>The patch below adds binutils support for dwarf3 fortam CIE frame debug 
>entries.
>  
>
I have applied this patch with a few minor changes:

>2004-05-12  Paul Brook  <paul@codesourcery.com>
>
>	* bfd/eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle dwarf3
>	format CIE entries.
>	* binutils/readelf.c (display_debug_frames): Ditto.
>	* gas/dw2gencfi.c (output_cie): Ditto.
>	(fde_entry): Change return_column to unsigned.
>	(cie_entry): Ditto.
>  
>

I broke this ChangeLog out into three separate entries, one each for the 
bfd/ gas/ and binutils/ directories.

>Index: gas/dw2gencfi.c
>===================================================================
>RCS file: /cvs/src/src/gas/dw2gencfi.c,v
>retrieving revision 1.16
>diff -u -p -r1.16 dw2gencfi.c
>--- gas/dw2gencfi.c	7 Mar 2004 08:51:20 -0000	1.16
>+++ gas/dw2gencfi.c	12 May 2004 11:59:40 -0000
>@@ -91,14 +91,14 @@ struct fde_entry
>   symbolS *end_address;
>   struct cfi_insn_data *data;
>   struct cfi_insn_data **last;
>-  unsigned int return_column;
>+  unsigned return_column;
> };
> 
> struct cie_entry
> {
>   struct cie_entry *next;
>   symbolS *start_address;
>-  unsigned int return_column;
>+  unsigned return_column;
>   struct cfi_insn_data *first, *last;
> };
>  
>
I did not apply these two deltas.  I can see no good reason for removing 
the "int" type from these fields.

There is one other point.  There is a comment in bfd/elf-eh-frame.c just 
above the patched code:

      /* Note - in DWARF2 the return address column is an unsigned byte.
         In DWARF3 it is a ULEB128.  We are following DWARF3.  For most
         ports this will not matter as the value will be less than 128.
         For the others (eg FRV, SH, MMIX, IA64) they need a fixed GCC
         which conforms to the DWARF3 standard.  */

Does this comment still apply ?

Cheers
  Nick





More information about the Binutils mailing list