This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH]: Some fixes for location lists from the rtlopt-branch
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 27 Jan 2004 19:12:25 -0500 (EST)
- Subject: [PATCH]: Some fixes for location lists from the rtlopt-branch
These problems were discovered on 64 bit machines, IIRC.
Obviously, no regressions in the gdb testsuite, since we don't output
location lists without var-tracking.
Bootstrapped on i686-pc-linux-gnu, no regressions.
--Dan
2004-01-27 Daniel Berlin <dberlin@dberlin.org>
* dwarf2out.c (output_loc_list): Don't use deltas if we have
a separate line info table in use.
Use the correct size for terminators.
(output_die): Use offset, not delta.
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.481
diff -u -3 -p -r1.481 dwarf2out.c
--- dwarf2out.c 27 Jan 2004 20:35:51 -0000 1.481
+++ dwarf2out.c 28 Jan 2004 00:07:41 -0000
@@ -6561,16 +6561,28 @@ output_loc_list (dw_loc_list_ref list_he
"Location list base address specifier base");
}
+ /* Walk the location list, and output each range + expression. */
for (curr = list_head; curr != NULL; curr = curr->dw_loc_next)
{
unsigned long size;
-
- dw2_asm_output_delta (DWARF2_ADDR_SIZE, curr->begin, curr->section,
- "Location list begin address (%s)",
- list_head->ll_symbol);
- dw2_asm_output_delta (DWARF2_ADDR_SIZE, curr->end, curr->section,
- "Location list end address (%s)",
- list_head->ll_symbol);
+ if (separate_line_info_table_in_use == 0)
+ {
+ dw2_asm_output_delta (DWARF2_ADDR_SIZE, curr->begin, curr->section,
+ "Location list begin address (%s)",
+ list_head->ll_symbol);
+ dw2_asm_output_delta (DWARF2_ADDR_SIZE, curr->end, curr->section,
+ "Location list end address (%s)",
+ list_head->ll_symbol);
+ }
+ else
+ {
+ dw2_asm_output_addr (DWARF2_ADDR_SIZE, curr->begin,
+ "Location list begin address (%s)",
+ list_head->ll_symbol);
+ dw2_asm_output_addr (DWARF2_ADDR_SIZE, curr->end,
+ "Location list end address (%s)",
+ list_head->ll_symbol);
+ }
size = size_of_locs (curr->expr);
/* Output the block length for this list of location operations. */
@@ -6581,10 +6593,10 @@ output_loc_list (dw_loc_list_ref list_he
output_loc_sequence (curr->expr);
}
- dw2_asm_output_data (DWARF_OFFSET_SIZE, 0,
+ dw2_asm_output_data (DWARF2_ADDR_SIZE, 0,
"Location list terminator begin (%s)",
list_head->ll_symbol);
- dw2_asm_output_data (DWARF_OFFSET_SIZE, 0,
+ dw2_asm_output_data (DWARF2_ADDR_SIZE, 0,
"Location list terminator end (%s)",
list_head->ll_symbol);
}
@@ -6704,8 +6716,7 @@ output_die (dw_die_ref die)
if (sym == 0)
abort ();
- dw2_asm_output_delta (DWARF_OFFSET_SIZE, sym,
- loc_section_label, "%s", name);
+ dw2_asm_output_offset (DWARF_OFFSET_SIZE, sym, "%s", name);
}
break;