93f68a2 Add dwarf2_per_objfile member to DWARF batons

3 files Authored by Tom Tromey 3 years ago, Committed by Simon Marchi 3 years ago,
    Add dwarf2_per_objfile member to DWARF batons
    
    Various DWARF callbacks expect to be able to fetch the objfile and / or
    dwarf2_per_objfile from the DWARF CU object.  However, this won't be
    possible once sharing is implemented.
    
    Because these objects are related to full symbols (e.g., they are used
    to implement location expressions), they can simply store the
    dwarf2_per_objfile they need.
    
    This patch adds a per_objfile member to the various "baton" structures
    and arranges to set this value when constructing the baton.
    
    YYYY-MM-DD  Tom Tromey  <tom@tromey.com>
    YYYY-MM-DD  Simon Marchi  <simon.marchi@efficios.com>
    
    	* dwarf2/loc.c (struct piece_closure) <per_objfile>: New member.
    	(allocate_piece_closure): Set "per_objfile" member.
    	(dwarf2_find_location_expression, dwarf2_locexpr_baton_eval)
    	(locexpr_describe_location, loclist_describe_location): Use new
    	member.
    	* dwarf2/read.c (read_call_site_scope)
    	(mark_common_block_symbol_computed, attr_to_dynamic_prop)
    	(dwarf2_const_value_attr, dwarf2_fetch_die_loc_sect_off)
    	(fill_in_loclist_baton, dwarf2_symbol_mark_computed): Set
    	per_objfile member.
    	* dwarf2/loc.h (struct dwarf2_locexpr_baton) <per_objfile>: New
    	member.
    	(struct dwarf2_loclist_baton) <per_objfile>: New member.
    
        
file modified
+12 -4
file modified
+7 -1
file modified
+17 -7