@@ -10374,7 +10374,7 @@ dwarf2out_maybe_output_loclist_view_pair (dw_loc_list_ref curr)
#ifdef DW_LLE_view_pair
dw2_asm_output_data (1, DW_LLE_view_pair, "DW_LLE_view_pair");
- if (dwarf2out_as_locview_support)
+ if (dwarf2out_as_locview_support && dwarf2out_as_loc_support)
{
if (ZERO_VIEW_P (curr->vbegin))
dw2_asm_output_data_uleb128 (0, "Location view begin");
@@ -10396,8 +10396,10 @@ dwarf2out_maybe_output_loclist_view_pair (dw_loc_list_ref curr)
}
else
{
- dw2_asm_output_data_uleb128 (curr->vbegin, "Location view begin");
- dw2_asm_output_data_uleb128 (curr->vend, "Location view end");
+ dw2_asm_output_data_uleb128 (ZERO_VIEW_P (curr->vbegin)
+ ? 0 : curr->vbegin, "Location view begin");
+ dw2_asm_output_data_uleb128 (ZERO_VIEW_P (curr->vend)
+ ? 0 : curr->vend, "Location view end");
}
#endif /* DW_LLE_view_pair */
@@ -10430,7 +10432,7 @@ output_loc_list (dw_loc_list_ref list_head)
vcount++;
/* ?? dwarf_split_debug_info? */
- if (dwarf2out_as_locview_support)
+ if (dwarf2out_as_locview_support && dwarf2out_as_loc_support)
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -10460,10 +10462,12 @@ output_loc_list (dw_loc_list_ref list_head)
}
else
{
- dw2_asm_output_data_uleb128 (curr->vbegin,
+ dw2_asm_output_data_uleb128 (ZERO_VIEW_P (curr->vbegin)
+ ? 0 : curr->vbegin,
"View list begin (%s)",
list_head->vl_symbol);
- dw2_asm_output_data_uleb128 (curr->vend,
+ dw2_asm_output_data_uleb128 (ZERO_VIEW_P (curr->vend)
+ ? 0 : curr->vend,
"View list end (%s)",
list_head->vl_symbol);
}
@@ -1475,9 +1475,7 @@ process_options ()
= (flag_var_tracking
&& debug_info_level >= DINFO_LEVEL_NORMAL
&& dwarf_debuginfo_p ()
- && !dwarf_strict
- && dwarf2out_as_loc_support
- && dwarf2out_as_locview_support);
+ && !dwarf_strict);
}
else if (debug_variable_location_views == -1 && dwarf_version != 5)
{