This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Generate DW_AT_ranges for non-contiguous code


Andreas Schwab wrote:
[...] That ain't gonna work.

Thanks for the catch. Enclosed is a patch which should fix.


Sterling
Index: dwarf2dbg.c
===================================================================
RCS file: /cvs/src/src/gas/dwarf2dbg.c,v
retrieving revision 1.87
diff -d -u -r1.87 dwarf2dbg.c
--- dwarf2dbg.c	8 Aug 2006 19:09:33 -0000	1.87
+++ dwarf2dbg.c	10 Oct 2006 16:48:30 -0000
@@ -1591,13 +1591,10 @@
     }
   else
     {
-      /* This attributes is emitted if the code is disjoint.  */
+      /* This attribute is emitted if the code is disjoint.  */
       
       /* DW_AT_ranges */
-      expr.X_op = O_symbol;
-      expr.X_add_symbol = section_symbol (ranges_seg);
-      expr.X_add_number = 0;
-      emit_expr (&expr, sizeof_address);
+      TC_DWARF2_EMIT_OFFSET (section_symbol (ranges_seg), sizeof_offset);
     }
 
   /* DW_AT_name.  We don't have the actual file name that was present

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]