3d4560f Move the frame data to the BFD when possible

Authored and Committed by Tom Tromey 4 years ago
    Move the frame data to the BFD when possible
    
    Now that comp_unit and the remaining frame data are all independent of
    the objfile, it can all be stored on the BFD and shared across
    inferiors.
    
    As with other code doing this same thing, care must be taken to not
    share the data when the objfile requires relocations.  So, two keys
    are used: one for the BFD and one for the objfile, and
    gdb_bfd_requires_relocations is used to differentiate between the two
    cases.
    
    gdb/ChangeLog
    2020-02-12  Tom Tromey  <tom@tromey.com>
    
    	* dwarf2/frame.c (dwarf2_frame_bfd_data): New global.
    	(dwarf2_frame_objfile_data): Add comment.
    	(find_comp_unit, set_comp_unit): New functions.
    	(dwarf2_frame_find_fde): Use find_comp_unit.
    	(dwarf2_build_frame_info): Use set_comp_unit.
    
        
file modified
+8 -0
file modified
+34 -5