- /*
- * The prolog+initlocals region does not have a line number, this
- * makes them belong to the first line of the method.
- */
- emit_byte (w, DW_LNS_advance_line);
- emit_sleb128 (w, (gint32)loc->row - (gint32)prev_line);
- prev_line = loc->row;
- }
+ line_diff = (gint32)loc->row - (gint32)prev_line;
+ addr_diff = i - prev_native_offset;
+
+ if (first) {
+ emit_section_change (w, ".debug_line", LINE_SUBSECTION_DATA);
+
+ emit_byte (w, 0);
+ emit_byte (w, sizeof (gpointer) + 1);
+ emit_byte (w, DW_LNE_set_address);
+ if (start_symbol)
+ emit_pointer_unaligned (w, start_symbol);
+ else
+ emit_pointer_value (w, code);
+
+ /*
+ * The prolog+initlocals region does not have a line number, this
+ * makes them belong to the first line of the method.
+ */
+ emit_byte (w, DW_LNS_advance_line);
+ //printf ("FIRST: %d %d %d\n", prev_line, loc->row, il_offset);
+ emit_sleb128 (w, (gint32)loc->row - (gint32)prev_line);
+ prev_line = loc->row;
+ first = FALSE;
+ }