[RFA/dwarf] Pass some global state around

Daniel Jacobowitz drow@mvista.com
Wed Nov 12 17:12:00 GMT 2003


On Tue, Nov 11, 2003 at 04:39:31PM -0500, Jim Blandy wrote:
> 
> So, if I'm reading it right, this patch is almost entirely mechanical:
> 
> - Create a new dwarf2_cu type, which contains the CU header, and a
>   pointer to the objfile.
> 
> - Create and initialize it at external entry points to dwarf2read.c.
> 
> - Replace all CU and objfile arguments with dwarf2_cu arguments;
>   similarly for uses.
> 
> If that's correct, please go ahead and commit this.  However, it would
> be nice if the ChangeLog entry were a little more like the description
> I wrote above.

That's right.  I've fixed the ChangeLog and checked it in:

2003-11-12  Daniel Jacobowitz <drow@mvista.com>

	* dwarf2read.c (struct dwarf2_cu): New type.

	(dwarf2_build_psymtabs_hard, psymtab_to_symtab_1): Create a
	dwarf2_cu structure to pass down.

	(scan_partial_symbols, add_partial_symbol, add_partial_namespace)
	(add_partial_enumeration, locate_pdi_sibling, process_die)
	(read_file_scope, read_func_scope)
	(read_lexical_block_scope, dwarf2_get_pc_bounds)
	(dwarf2_add_field, dwarf2_attach_fields_to_type)
	(dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type)
	(read_structure_scope, read_enumeration, read_array_type)
	(read_common_block, read_namespace, read_tag_pointer_type)
	(read_tag_ptr_to_member_type, read_tag_reference_type)
	(read_tag_const_type, read_tag_volatile_type, read_tag_string_type)
	(read_subroutine_type, read_typedef, read_base_type, read_comp_unit)
	(read_die_and_children, read_die_and_siblings, dwarf2_read_section)
	(dwarf2_read_abbrevs, dwarf2_lookup_abbrev, read_partial_die)
	(read_full_die. read_attribute_value, read_attribute)
	(read_address, dwarf_decode_line_header, dwarf_decode_lines)
	(var_decode_location, new_symbol, dwarf2_const_value, die_type)
	(die_containing_type, type_at_offset, tag_type_to_type)
	(read_type_die, dwarf_base_type, decode_locdesc, dwarf_decode_macros)
	(dwarf2_symbol_mark_computed): Accept and use a dwarf2_cu object.

My apologies to David for what is sure to be a bit of a merge headache. 
Next, time permitting, will probably be moving more information into
the dwarf2_cu.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb-patches mailing list