aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.h
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2018-03-10 06:42:40 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2018-03-10 06:42:40 +0000
commit7b602c4dc28c0eb24fec50fe20af78c13114e8a6 (patch)
tree4de84df5e003b3f53849813f2f9e7085cf81b1fd /gcc/dwarf2out.h
parent7ed12599fa74fdfd9bd36853b50a6086f89df061 (diff)
downloadgcc-7b602c4dc28c0eb24fec50fe20af78c13114e8a6.zip
gcc-7b602c4dc28c0eb24fec50fe20af78c13114e8a6.tar.gz
gcc-7b602c4dc28c0eb24fec50fe20af78c13114e8a6.tar.bz2
[IEPM] [PR debug/84620] use constant form for DW_AT_GNU_entry_view
When outputting entry views in symbolic mode, we used to use a lbl_id, but that outputs the view as an addr, perhaps even in an indirect one, which is all excessive and undesirable for a small assembler-computed constant. Introduce a new value class for symbolic views, so that we can output the labels as constant data, using as narrow forms as possible, but wide enough for any symbolic views output in the compilation. We don't know exactly where the assembler will reset views, but we count the symbolic views since known reset points and use that as an upper bound for view numbers. Ideally, we'd use uleb128, but then the compiler would have to defer .debug_info offset computation to the assembler. I'm not going there for now, so a symbolic uleb128 assembler constant in an attribute is not something GCC can deal with ATM. for gcc/ChangeLog PR debug/84620 * dwarf2out.h (dw_val_class): Add dw_val_class_symview. (dw_val_node): Add val_symbolic_view. * dwarf2out.c (dw_line_info_table): Add symviews_since_reset. (symview_upper_bound): New. (new_line_info_table): Initialize symviews_since_reset. (dwarf2out_source_line): Count symviews_since_reset and set symview_upper_bound. (dw_val_equal_p): Handle symview. (add_AT_symview): New. (print_dw_val): Handle symview. (attr_checksum, attr_checksum_ordered): Likewise. (same_dw_val_p, size_of_die): Likewise. (value_format, output_die): Likewise. (add_high_low_attributes): Use add_AT_symview for entry_view. (dwarf2out_finish): Reset symview_upper_bound, clear zero_view_p. From-SVN: r258411
Diffstat (limited to 'gcc/dwarf2out.h')
-rw-r--r--gcc/dwarf2out.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h
index a1856a5..a0ba414 100644
--- a/gcc/dwarf2out.h
+++ b/gcc/dwarf2out.h
@@ -161,7 +161,8 @@ enum dw_val_class
dw_val_class_const_implicit,
dw_val_class_unsigned_const_implicit,
dw_val_class_file_implicit,
- dw_val_class_view_list
+ dw_val_class_view_list,
+ dw_val_class_symview
};
/* Describe a floating point constant value, or a vector constant value. */
@@ -233,6 +234,7 @@ struct GTY(()) dw_val_node {
} GTY ((tag ("dw_val_class_vms_delta"))) val_vms_delta;
dw_discr_value GTY ((tag ("dw_val_class_discr_value"))) val_discr_value;
dw_discr_list_ref GTY ((tag ("dw_val_class_discr_list"))) val_discr_list;
+ char * GTY ((tag ("dw_val_class_symview"))) val_symbolic_view;
}
GTY ((desc ("%1.val_class"))) v;
};