Commit Graph

694 Commits

Author SHA1 Message Date
Tom Tromey 0726159622 * dwarf2read.c (dw2_get_file_names_reader): Ignore partial units. 2012-06-11 20:19:22 +00:00
Tom Tromey 356d9f9d9e * dwarf2read.c (dw2_get_primary_filename_reader): New function.
(dw2_find_symbol_file): Use it.
2012-06-11 18:45:01 +00:00
Doug Evans 034e5797f0 * dwarf2read.c (dwarf2_cu): Add comment. 2012-06-07 17:30:12 +00:00
Doug Evans d790cf0a9c * objfiles.h (ALL_OBJFILE_PRIMARY_SYMTABS): New macro.
(ALL_PRIMARY_SYMTABS): Use it.
	(ALL_PSPACE_PRIMARY_SYMTABS): Ditto.
	* dwarf2read.c (dw2_find_symbol_file): Ditto.
	* linespec.c (iterate_over_all_matching_symtabs): Ditto.
	* symtab.c (lookup_symbol_aux_objfile): Ditto.
	(basic_lookup_transparent_type): Ditto.
2012-06-04 02:57:28 +00:00
Tom Tromey 6f0c7050fc bfd/
* opncls.c (bfd_fopen): Always close fd on failure.
	(bfd_fdopenr): Likewise.
gdb/
	* symfile.c (symfile_bfd_open): Don't close desc if bfd_fopen
	fails.
	* solib.c (solib_bfd_fopen): Don't close fd if bfd_fopen fails.
	* exec.c (exec_file_attach): Don't close scratch_chan if bfd_fopen
	fails.
	* dwarf2read.c (try_open_dwo_file): Don't close fd if bfd_fopen
	fails.
2012-05-29 14:23:40 +00:00
Jan Kratochvil 685b110556 gdb/
PR symtab/13277: Resolving opaque structures in ICC generated binaries.
	* dwarf2read.c (struct dwarf2_cu) <producer_is_icc>: New field.
	(producer_is_gxx_lt_4_6): Move the checking and caching to...
	(check_producer): ... this new function, which also checks for ICC
	and caches the result.
	(producer_is_icc): New function.
	(read_structure_type): Don't set TYPE_STUB_SUPPORTED if the
	producer was ICC.

gdb/testsuite/
	PR symtab/13277: Resolving opaque structures in ICC generated binaries.
	* gdb.dwarf2/dw2-icc-opaque.S: New file.
	* gdb.dwarf2/dw2-icc-opaque.exp: New file.
2012-05-24 22:09:21 +00:00
Doug Evans f664829eae * dwarf2-frame.c (struct dwarf2_cie): Make initial_instructions, end
"const gdb_byte *".
	(struct dwarf2_fde): Make instructions, end "const gdb_byte *".
	(execute_cfa_program): Update to match API of leb128 functions.
	(read_1_byte, read_4_bytes, read_8_bytes): Make buf parameter
	"const gdb_byte *".
	(read_unsigned_leb128, read_signed_leb128): Delete.
	(read_initial_length): Change type of buf argument to
	"const gdb_byte *".
	(read_encoded_value): Update to match API of leb128 functions.
	(decode_frame_entry): Change result to "const gdb_byte *", and
	similarly for "start" parameter.
	(decode_frame_entry_1): Ditto.  Use new leb128 reader functions.
	(dwarf2_build_frame_info): Change local frame_ptr to
	"const gdb_byte *".
	* dwarf2expr.c (safe_read_uleb128, safe_read_sleb128): Replaces
	read_uleb128, read_sleb128.  All callers updated.
	(safe_skip_leb128): New function.
	(dwarf_block_to_dwarf_reg): Update to match API of leb128 functions.
	Call gdb_read_uleb128, gdb_skip_leb128 instead of read_uleb128.
	(dwarf_block_to_dwarf_reg_deref): Update to match API of leb128
	functions.  Call gdb_read_uleb128, gdb_read_sleb128 instead of
	read_uleb128, read_sleb128.
	(dwarf_block_to_fb_offset, dwarf_block_to_sp_offset): Ditto.
	(execute_stack_op): Update to match API of leb128 functions.
	* dwarf2expr.h: #include "leb128.h".
	(read_uleb128, read_sleb128): Delete.
	(gdb_read_uleb128, gdb_read_sleb128, gdb_skip_leb128): New functions.
	(safe_read_uleb128, safe_read_sleb128, safe_skip_leb128): Declare.
	* dwarf2loc.c (debug_loc_kind): New enum.
	(decode_debug_loc_addresses): New function.
	(decode_debug_loc_dwo_addresses): New function.
	(dwarf2_find_location_expression): Rewrite.
	(dwarf2_compile_expr_to_ax): Update to match API of leb128 functions.
	(locexpr_describe_location_piece): Ditto.
	(disassemble_dwarf_expression): Ditto.
	(locexpr_describe_location_1): Ditto.
	(loclist_describe_location): Rewrite.
	* dwarf2loc.h (dwarf2_loclist_baton): New member "from_dwo".
	* dwarf2read.c (die_reader_specs): New member "buffer_end".
	(dwarf2_section_buffer_overflow_complaint): Renamed from
	dwarf2_macros_too_long_complaint.  All callers updated.
	(skip_leb128): Delete.
	(init_cu_die_reader): Initialize reader->buffer_end.
	(skip_one_die): Replace call to skip_leb128 with safe_skip_leb128.
	(skip_form_bytes): New arg buffer_end.  All callers updated.
	Replace call to skip_leb128 with gdb_skip_leb128.
	(skip_unknown_opcode): New arg mac_end.  All callers updated.
	(fill_in_loclist_baton): Initialize baton->from_dwo.
2012-05-22 18:45:22 +00:00
Doug Evans a3ec0bb1c4 * dwarf2read.c (recursively_find_pc_sect_symtab): Initialize "s"
before use.  Check for symtab->includes == NULL before scanning it.
2012-05-20 17:15:29 +00:00
Sergio Durigan Junior 22e048c9dd 2012-05-18 Sergio Durigan Junior <sergiodj@redhat.com>
* ada-lang.c:
	* ada-tasks.c:
	* ada-varobj.c:
	* amd64-darwin-tdep.c:
	* arm-symbian-tdep.c:
	* arm-tdep.c:
	* avr-tdep.c:
	* ax-gdb.c:
	* bfin-linux-tdep.c:
	* breakpoint.c:
	* c-valprint.c:
	* cli/cli-cmds.c:
	* coffread.c:
	* cp-support.c:
	* cris-tdep.c:
	* dwarf2-frame-tailcall.c:
	* dwarf2-frame.c:
	* dwarf2expr.c:
	* dwarf2loc.c:
	* dwarf2read.c:
	* elfread.c:
	* eval.c:
	* expprint.c:
	* f-valprint.c:
	* frv-tdep.c:
	* h8300-tdep.c:
	* hppa-hpux-tdep.c:
	* hppa-tdep.c:
	* hppanbsd-tdep.c:
	* i386-nto-tdep.c:
	* i386-tdep.c:
	* i387-tdep.c:
	* ia64-tdep.c:
	* jit.c:
	* linespec.c:
	* linux-tdep.c:
	* lm32-tdep.c:
	* m2-valprint.c:
	* m32c-tdep.c:
	* m32r-rom.c:
	* m32r-tdep.c:
	* m68k-tdep.c:
	* m68klinux-tdep.c:
	* mi/mi-main.c:
	* microblaze-tdep.c:
	* mips-linux-tdep.c:
	* mips-tdep.c:
	* mn10300-tdep.c:
	* p-valprint.c:
	* parse.c:
	* ppc-linux-tdep.c:
	* ppc-sysv-tdep.c:
	* printcmd.c:
	* python/py-finishbreakpoint.c:
	* python/py-inferior.c:
	* python/py-infthread.c:
	* python/py-type.c:
	* python/python.c:
	* remote-fileio.c:
	* remote-m32r-sdi.c:
	* remote-mips.c:
	* reverse.c:
	* rl78-tdep.c:
	* rs6000-aix-tdep.c:
	* rs6000-tdep.c:
	* s390-tdep.c:
	* score-tdep.c:
	* sh64-tdep.c:
	* skip.c:
	* solib-darwin.c:
	* solib-dsbt.c:
	* solib-frv.c:
	* sparc-tdep.c:
	* spu-multiarch.c:
	* spu-tdep.c:
	* stack.c:
	* symfile.c:
	* symtab.c:
	* tic6x-tdep.c:
	* tracepoint.c:
	* v850-tdep.c:
	* valarith.c:
	* valprint.c:
	* value.c:
	* xcoffread.c:
	* xtensa-tdep.c:
	* ada-lang.c:
	* ada-tasks.c:
	* ada-varobj.c:
	* amd64-darwin-tdep.c:
	* arm-symbian-tdep.c:
	* arm-tdep.c: Delete unused variables.
2012-05-18 21:02:52 +00:00
Tom Tromey 9703b51377 * psymtab.c (find_pc_sect_symtab_from_partial): Return the symtab
directly corresponding to the found psymtab.
	* dwarf2read.c (recursively_find_pc_sect_symtab): New function.
	(dw2_find_pc_sect_symtab): Use it.
	* block.h (blockvector_contains_pc): Declare.
	* block.c (find_block_in_blockvector): New function.
	(blockvector_for_pc_sect): Use it.
	(blockvector_contains_pc): New function.
2012-05-18 14:26:26 +00:00
Sergio Durigan Junior 81b9b86eb8 2012-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
* coffread.c (cs_section_address): Passing proper argument for
	`bfd_get_section_vma'.
	* dwarf2read.c (dwarf2_locate_sections): Likewise, for
	`bfd_get_section_flags'.
	* remote.c (remote_trace_set_readonly_regions): Likewise, for
	`bfd_get_section_vma'.
2012-05-16 22:10:49 +00:00
Tom Tromey abc9d0dc6e PR macros/13205:
* macrotab.h: (macro_define_special): Declare.
	(enum macro_special_kind): New.
	(struct macro_definition) <argc, replacement>: Update comments.
	* macrotab.c (new_macro_definition): Unconditionally set 'argc'.
	(macro_define_object_internal): New function.
	(macro_define_object): Use it.
	(macro_define_special): New function.
	(fixup_definition): New function.
	(macro_lookup_definition, foreach_macro_in_scope)
	(foreach_macro): Use fixup_definition.
	* macroexp.h (macro_stringify): Declare.
	* macroexp.c (free_buffer_return_text): New function.
	(stringify): Constify "arg".
	(macro_stringify): New function.
	* dwarf2read.c (macro_start_file): Call macro_define_special.
testsuite
	* gdb.base/macscp1.c (macscp_expr): Add comment.
	* gdb.base/macscp.exp: Test __FILE__ and __LINE__.
2012-05-16 20:31:10 +00:00
Tom Tromey 95554aad6c * dwarf2read.c (recursively_write_psymbols): New function.
(write_psymtabs_to_index): Use it.

	* dwarf2read.c (struct dwarf2_queue_item) <pretend_language>: New
	field.
	(load_cu, dw2_do_instantiate_symtab, process_psymtab_comp_unit)
	(load_partial_comp_unit): Update.
	(queue_comp_unit): Add argument 'pretend_language'.
	(process_queue): Update.
	(psymtab_to_symtab_1): Skip dependencies that have a user.
	(load_partial_comp_unit_reader): Give meaning to the 'data'
	argument.
	(load_full_comp_unit): Add 'pretend_language' argument.
	(process_full_comp_unit): Add 'pretend_language' argument.  Set
	language on CU.
	(process_imported_unit_die, read_file_scope, read_type_unit_scope):
	Update.
	(maybe_queue_comp_unit): Add 'pretend_language' argument.
	(follow_die_offset, follow_die_sig, read_signatured_type_reader):
	Update.
	(prepare_one_comp_unit): Add 'pretend_language' argument.

	* dwarf2read.c: (dwarf2_per_cu_ptr): New typedef.
	(struct dwarf2_per_objfile) <just_read_cus>: New field.
	(struct dwarf2_per_cu_data) <imported_symtabs>: New field.
	(dw2_do_instantiate_symtab): Check whether symtab was read in
	before queueing.
	(dw2_instantiate_symtab): Add assertion.  Call
	process_cu_includes.
	(process_psymtab_comp_unit): Compute 'dependencies' for psymtab.
	(partial_symtab_p): New typedef.
	(set_partial_user): New function.
	(dwarf2_build_psymtabs_hard): Use set_partial_user.
	(scan_partial_symbols): Add imported CU to imported_symtabs.
	(dwarf2_psymtab_to_symtab): Call process_cu_includes.
	(psymtab_to_symtab_1): Do nothing if psymtab is readin.
	(get_symtab, recursively_compute_inclusions)
	(compute_symtab_includes, process_cu_includes)
	(process_imported_unit_die): New functions.
	(process_die) <DW_TAG_imported_unit>: New case.
	(dwarf2_per_objfile_free): Free 'imported_symtabs'.

	* dwarf2read.c (struct dwarf2_per_cu_data) <psymtab>: Update
	comment.
	(struct partial_die_info) <locdesc>: Remove.
	<d>: New field.
	(process_psymtab_comp_unit): Add 'read_partial' argument.
	Update.
	(process_type_comp_unit, dwarf2_build_psymtabs_hard): Update.
	(scan_partial_symbols): Handle DW_TAG_imported_unit.
	(add_partial_symbol): Update.
	(process_die): Handle DW_TAG_partial_unit.
	(read_file_scope): Update comment.
	(load_partial_dies): Handle DW_TAG_imported_unit.
	(read_partial_die): Handle DW_TAG_partial_unit, DW_AT_import.
	(determine_prefix, dwarf2_name): Handle DW_TAG_partial_unit.
2012-05-10 20:17:51 +00:00
Tom Tromey f39c6ffde7 * dwarf2read.c (dwarf_tag_name): Return const char *. Use
get_DW_TAG_name.
	(dwarf_attr_name): Return const char *.  Use get_DW_AT_name.
	(dwarf_form_name): Return const char *.  Use get_DW_FORM_name.
	(dwarf_stack_op_name): Remove.
	(dwarf_cfi_name): Return const char *.  Use get_DW_ATE_name.
	(decode_locdesc): Use get_DW_OP_name.
	* dwarf2loc.c (unimplemented): Use get_DW_OP_name.
	(dwarf2_compile_expr_to_ax): Likewise.
	(disassemble_dwarf_expression): Likewise.
	* dwarf2expr.h: (dwarf_stack_op_name): Remove.
2012-05-07 15:18:38 +00:00
Doug Evans 943cb7566b * dwarf2read.c (dw2_find_symbol_file): Don't crash if there are no files. 2012-05-03 05:27:36 +00:00
Doug Evans fd8205284b * dwarf2read.c (init_cutu_and_read_dies): Renamed from
init_and_read_dies_worker.  All callers updated.
	(init_cu_and_read_dies, init_tu_and_read_dies): Delete.  All calls
	replaced with init_cutu_and_read_dies.
	(load_partial_comp_unit): Pass 1 for use_existing_cu.
	(find_partial_die): Remove FIXME.  Don't free current CU.

	testsuite/
	* gdb.dwarf2/pr13961.S: New file.
	* gdb.dwarf2/pr13961.exp: New file.
2012-05-01 03:00:36 +00:00
Doug Evans fceca5159f * dwarf2read.c (dwarf_decode_macros): New arg section_name.
All callers updated.
	(init_cu_die_reader): Verify the section is non-empty.
	(dwarf_decode_line_header): Don't dereference section->asection
	until we know the section is present.
2012-04-30 15:50:40 +00:00
Doug Evans 3019eac3a2 Initial support for Fission. http://gcc.gnu.org/wiki/DebugFission
* symfile.c (default_symfile_relocate): Use sectp->owner instead of
	objfile->obfd.
	* symfile.h (dwarf2_debug_sections): New member addr.
	* dwarf2expr.c (execute_stack_op): New case DW_OP_GNU_addr_index.
	(ctx_no_get_addr_index): New function.
	* dwarf2expr.h (dwarf_expr_context_funcs): New member get_addr_index.
	(ctx_no_get_addr_index): Declare.
	* dwarf2-frame.c (dwarf2_frame_ctx_funcs): Update.
	* dwarf2loc.c (dwarf_expr_get_addr_index): New function.
	(dwarf_expr_ctx_funcs): Update.
	(needs_get_addr_index): New function.
	(needs_frame_ctx_funcs): Update.
	* dwarf2loc.h (dwarf2_read_addr_index): Declare.
	* dwarf2read.c: #include "gdbcore.h".
	(dwarf2_per_objfile): New members addr, dwo_files.
	(dwarf2_elf_names): Add entry for addr.
	(struct dwo_section_names): New type.
	(dwo_section_names): New static global.
	(dwarf2_cu): New members dwo_unit, addr_base, have_addr_base.
	(dwarf2_per_cu_data): New member is_debug_types, all boolean uses of
	old debug_types_section member updated to use this.
	Rename member debug_types_section to info_or_types_section,
	all uses updated.
	(signatured_type): Rename member type_offset to type_offset_in_tu,
	all uses updated.  New member type_offset_in_section.
	(struct dwo_sections): New type.
	(struct dwo_unit): New type.
	(struct dwo_file): New type.
	(die_reader_specs): New member dwo_file.
	(dwarf2_locate_sections): Watch for .debug_addr.
	(zlib_decompress_section): Use sectp->owner instead of objfile->obfd.
	(dwarf2_read_section): Get bfd of section from bfd's asection,
	instead of objfile.
	(create_cus_from_index): Initialize the_cu->info_or_types_section.
	(create_signatured_type_table_from_index): Initialize
	sig_type->info_or_types_section.
	(dw2_get_file_names): Statement lists for type units with DWO files
	live in the DWO file.
	(create_debug_types_hash_table): New function.
	(create_all_type_units): Rewrite.
	(init_cu_die_reader): New arg dwo_file, all callers updated.
	(init_and_read_dies_worker): Get section from
	this_cu->info_or_types_section.  Set sig_type->type_offset_in_section.
	Watch for DW_AT_GNU_dwo_name and if present lookup the file and
	continue reading the CU/TU from there.
	(init_cutu_and_read_dies_no_follow): New arg dwo_file, all callers
	updated.  Get section from this_cu->info_or_types_section.
	(create_all_comp_units): Initialize this_cu->info_or_types_section.
	(skip_one_die): New cases DW_FORM_GNU_addr_index,
	DW_FORM_GNU_str_index.
	(hash_dwo_file, eq_dwo_file): New functions.
	(allocate_dwo_file_hash_table): New function.
	(hash_dwo_unit, eq_dwo_unit): New functions.
	(allocate_dwo_unit_table): New function.
	(dwarf2_locate_dwo_sections): New function.
	(struct create_dwo_info_table_data): New type.
	(create_debug_info_hash_table_reader): New function.
	(create_debug_info_hash_table): New function.
	(try_open_dwo_file, open_dwo_file, init_dwo_file): New function.
	(lookup_dwo_file): New function.
	(lookup_dwo_comp_unit, lookup_dwo_type_unit): New functions.
	(free_dwo_file, free_dwo_file_cleanup): New functions.
	(free_dwo_file_from_slot, free_dwo_files): New functions.
	(dwarf2_get_pc_bounds): Handle DW_FORM_GNU_addr_index.
	(dwarf2_record_block_ranges): Ditto.
	(read_partial_die): Ditto.
	(process_enumeration_scope): Update to use type_offset_in_section.
	(read_full_die_1): New function.
	(read_full_die): Rewrite.
	(read_attribute_value): New cases DW_FORM_GNU_addr_index,
	DW_FORM_GNU_str_index.
	(read_addr_index_1, read_addr_index): New functions.
	(read_addr_index_from_leb128): New function.
	(struct dwarf2_read_addr_index_data): New type.
	(dwarf2_read_addr_index_reader): New function.
	(dwarf2_read_addr_index): New function.
	(read_str_index): New function.
	(leb128_size): New function.
	(dwarf_decode_line_header): Delete arg abfd, all callers updated.
	If processing a type unit from a DWO file, get the line section
	from the DWO file.
	(var_decode_location): Watch for DW_OP_GNU_addr_index.
	(dwarf2_const_value_attr): New cases DW_FORM_GNU_addr_index,
	DW_FORM_GNU_str_index.
	(lookup_die_type): Check whether section offset of type's die is
	known before looking it up.  Remove assert.  Condition can
	legimately happen for inter-cu type references.
	(dwarf_attr_name): Handle Fission attributes.
	(dwarf_form_name): Handle Fission forms.
	(dump_die_shallow): New cases DW_FORM_GNU_addr_index,
	DW_FORM_GNU_str_index.
	(follow_die_sig): Update to use type_offset_in_section.
	(decode_locdesc): New case DW_OP_GNU_addr_index.
	(skip_form_bytes): New cases DW_FORM_GNU_addr_index,
	DW_FORM_GNU_str_index.
	(cu_debug_loc_section): New function.
	(fill_in_loclist_baton, dwarf2_symbol_mark_computed): Call it.
	(dwarf2_per_objfile_free): Unmap .debug_addr section.
	Free DWO files if present.
	* xcoffread.c (dwarf2_xcoff_names): Add .debug_addr.

	testsuite/
	* gdb.dwarf2/dw2-intercu.S (.Ltype_int2_in_cu2): Renamed from
	.Ltype_int_in_cu2.  Use name "int2" instead of "int".
	All uses updated.
	* gdb.dwarf2/dw2-intercu.exp: Add "ptype int2" ahead of
	"ptype func_cu1" to expand cu2 before cu1.
2012-04-28 23:22:14 +00:00
Doug Evans dee91e82ae Refactor DIE reading.
* dwarf2read.c (dwarf2_per_objfile): Replace members
	debug_info_type_hash and debug_types_type_hash with die_type_hash.
	(die_reader_specs): New member "die_section".  Temporarily make
	member "buffer" non-const, pending constifying all info_ptr uses.
	(die_reader_func_ftype): New typedef.
	(dw2_get_file_names_reader): New function.
	(dw2_get_file_names): Rewrite.
	(read_and_check_type_unit_head): Rename arg type_offset to
	type_offset_in_tu.
	(create_all_type_units): Improve debugging message.
	Improve dummy type unit check.
	(init_cu_die_reader): New arg "section".  All callers updated.
	(init_and_read_dies_worker): New function.
	(init_cu_and_read_dies, init_tu_and_read_dies): New functions.
	(init_cutu_and_read_dies_no_follow): New function.
	(init_cutu_and_read_dies_simple): New function.
	(process_psymtab_comp_unit_reader): New function.
	(process_psymtab_comp_unit): Delete args section,
	is_debug_types_section.  Rewrite.  All callers updated.
	(process_psymtab_type_unit): Renamed from process_type_comp_unit.
	All callers updated.  Rewrite.
	(load_partial_comp_unit_reader): New function.
	(load_partial_comp_unit): Rewrite.
	(skip_children): New arg reader.  Delete args buffer, cu.
	All callers updated.
	(skip_one_die): New arg reader.  Delete args buffer, cu.
	All callers updated.
	(locate_pdi_sibling): New arg reader.  Delete args buffer, abfd, cu.
	All callers updated.
	(load_full_comp_unit_reader): New function.
	(load_full_comp_unit): Rewrite.
	(read_comp_unit): Delete.
	(read_die_and_children_1): Delete, contents moved ...
	(read_die_and_children): ... here.
	(dwarf2_read_abbrevs): New arg abbrev_section.  All callers updated.
	(load_partial_dies): New arg reader.  Delete args abfd, buffer, cu.
	All callers updated.
	(read_partial_die): New arg reader.  Delete args abfd, buffer, cu.
	All callers updated.
	(find_partial_die): Rewrite load_all_dies support.
	(read_attribute_value): New arg reader.  Delete args abfd, cu.
	All callers updated.
	(read_attribute): New arg reader.  Delete args abfd, cu.
	All callers updated.
	(load_full_type_unit): Add assert.
	(read_signatured_type_reader): New function.
	(read_signatured_type): Rewrite.
	(free_stack_comp_unit): Remove call to age_cached_comp_units.
	(free_one_cached_comp_unit): Change target_cu arg to target_per_cu.
	All callers updated.  Set per_cu->cu = NULL after freeing it.
	(dwarf2_per_cu_offset_and_type): Renamed from dwarf2_offset_and_type.
	(per_cu_offset_and_type_hash): Renamed from offset_and_type_hash.
	(per_cu_offset_and_type_eq): Renamed from offset_and_type_eq.
	(set_die_type): Update.
	(get_die_type_at_offset): Update.
	(read_file_scope): Call prepare_one_comp_unit.
	(read_type_unit_scope): Ditto.
	(prepare_one_comp_unit): Set producer if present.
2012-04-28 22:46:17 +00:00
Doug Evans 0fefef5932 * dwarf2read.c (dwarf2_read_index): Don't use index if symbol table
is empty.
2012-04-28 04:38:14 +00:00
Mark Wielaard 91da14142c * dwarf2read.c (dwarf2_get_pc_bounds): Check DW_AT_high_pc form to
see whether it is an address or a constant offset from DW_AT_low_pc.
       (dwarf2_record_block_ranges): Likewise.
       (read_partial_die): Likewise.
2012-04-27 18:55:19 +00:00
Jan Kratochvil 4fae6e18a2 gdb/
Fix DW_AT_lower_bound defaults for DWARF-4+.
	* dwarf2read.c (read_subrange_type): Remove initialization of low and
	high.  New variable low_default_is_valid.  Implement DWARF-4+
	DW_AT_lower_bound defaults.  Print complaint for DW_AT_lower_bound with
	no default by the DWARF standard.
2012-04-26 20:32:30 +00:00
Doug Evans a766d390bb Initial pass at Go language support.
* NEWS: Mention Go.
	* Makefile.in (SFILES): Add go-exp.y, go-lang.c, go-typeprint.c,
	go-valprint.c.
	(COMMON_OBS): Add go-lang.o, go-val.print.o, go-typeprint.o.
	(YYFILES): Add go-exp.c.
	(YYOBJ): Add go-exp.o.
	(local-maintainer-clean): Delete go-exp.c.
	* defs.h (enum language): Add language_go.
	* dwarf2read.c: #include "go-lang.h".
	(fixup_go_packaging): New function.
	(process_full_comp_unit): Call it when processing Go CUs.
	(dwarf2_physname): Add Go support.
	(read_file_scope): Handle missing language spec for GNU Go.
	(set_cu_language): Handle DW_LANG_Go.
	* go-exp.y: New file.
	* go-lang.h: New file.
	* go-lang.c: New file.
	* go-typeprint.c: New file.
	* go-valprint.c: New file.
	* symtab.c: #include "go-lang.h".
	(symbol_set_language): Handle language_go.
	(symbol_find_demangled_name, symbol_set_names): Ditto.
	(symbol_natural_name, demangle_for_lookup, find_main_name): Ditto.

	testsuite/
	* configure.ac: Create gdb.go/Makefile.
	* configure: Regenerate.
	* gdb.base/default.exp: Add "go" to "set language" testing.
	* gdb.go/Makefile.in: New file.
	* gdb.go/basic-types.exp: New file.
	* gdb.go/chan.exp: New file.
	* gdb.go/chan.go: New file.
	* gdb.go/handcall.exp: New file.
	* gdb.go/handcall.go: New file.
	* gdb.go/hello.exp: New file.
	* gdb.go/hello.go: New file.
	* gdb.go/integers.exp: New file.
	* gdb.go/integers.go: New file.
	* gdb.go/methods.exp: New file.
	* gdb.go/methods.go: New file.
	* gdb.go/package.exp: New file.
	* gdb.go/package1.go: New file.
	* gdb.go/package2.go: New file.
	* gdb.go/print.exp: New file.
	* gdb.go/strings.exp: New file.
	* gdb.go/strings.go: New file.
	* gdb.go/types.exp: New file.
	* gdb.go/types.go: New file.
	* gdb.go/unsafe.exp: New file.
	* gdb.go/unsafe.go: New file.
	* lib/future.exp: Add Go support.
	(gdb_find_go, gdb_find_go_linker): New procs.
	(gdb_default_target_compile): Add Go support.
	* lib/gdb.exp (skip_go_tests): New proc.
	* lib/go.exp: New file.

	doc/
	* gdb.texinfo (Supported Languages): Add Go.
	(Go): New node.
2012-04-25 14:07:23 +00:00
Doug Evans 4568ecf961 * dwarf2read.c (partial_die_full_name): Record DW_FORM_ref_addr in
attr.u.unsnd instead of attr.u.addr.
	(read_attribute_value) Ditto for cases DW_FORM_ref_addr,
	DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4, DW_FORM_reg8,
	DW_FORM_ref_udata.
	(dump_die_shallow): Update cases DW_FORM_ref_addr,
	DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4.  Add cases DW_FORM_ref8,
	DW_FORM_ref_udata.
	(dwarf2_get_ref_die_offset): Use DW_UNSND for reference attributes.
2012-04-23 16:46:02 +00:00
Jan Kratochvil 12df843f84 gdb/
Fix 64-bit constants on 32-bit hosts.
	* dwarf2read.c (read_unsigned_leb128): Change declaration return type
	from unsigned long to ULONGEST.
	(read_signed_leb128): Change declaration return type from long to
	LONGEST.
	(dwarf2_const_value_attr): Change declaration parameter value from long
	to LONGEST.
	(dwarf2_compute_name): Change variable value from long to LONGEST.
	(read_unsigned_leb128): Change return type, variable result and some
	casts from unsigned long to ULONGEST.
	(read_signed_leb128): Change return type, variable result and some
	casts from long to LONGEST.
	(dwarf2_const_value_data, dwarf2_const_value_attr): Change parameter
	value from long to LONGEST.
	(dwarf2_const_value): Change variable value from long to LONGEST.
	* symmisc.c (print_symbol): Change SYMBOL_VALUE format strings to use
	plongest and hex_string.
	* symtab.h (struct general_symbol_info): Change ivalue from long to
	LONGEST, remove the comment.
	* tracepoint.c (validate_actionline, collect_symbol, scope_info):
	Change SYMBOL_VALUE format strings to use plongest and hex_string.
2012-04-18 06:52:33 +00:00
Jan Kratochvil 14e75d8ea4 gdb/
PR symtab/7259:
	* ada-exp.y (convert_char_literal): Use TYPE_FIELD_ENUMVAL.
	* ada-lang.c (ada_discrete_type_high_bound)
	(ada_discrete_type_low_bound): Use TYPE_FIELD_ENUMVAL for
	TYPE_CODE_ENUM.
	(ada_identical_enum_types_p): Use TYPE_FIELD_ENUMVAL.
	(pos_atr, value_val_atr): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM.
	* ada-typeprint.c (print_enum_type): Change variable lastval to LONGEST.
	Use TYPE_FIELD_ENUMVAL.
	* ada-valprint.c (print_optional_low_bound, ada_print_scalar)
	(ada_val_print_1): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM.
	* c-typeprint.c (c_type_print_base): Move variable lastval to inner
	block, change it to LONGEST.  Use TYPE_FIELD_ENUMVAL for
	TYPE_CODE_ENUM.
	* coffread.c (coff_read_enum_type): Use SET_FIELD_ENUMVAL.
	* dwarf2read.c (process_enumeration_scope): Likewise.
	* gdb-gdb.py (TypeFlagsPrinter): Use field.enumval instead of
	field.bitpos.
	(class StructMainTypePrettyPrinter): Support also
	FIELD_LOC_KIND_ENUMVAL.
	* gdbtypes.c (get_discrete_bounds): Use TYPE_FIELD_ENUMVAL for
	TYPE_CODE_ENUM.
	(recursive_dump_type): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM.
	(copy_type_recursive): Support also FIELD_LOC_KIND_ENUMVAL.
	* gdbtypes.h (enum field_loc_kind): New FIELD_LOC_KIND_ENUMVAL.
	(struct main_type.flds_bnds.fields.loc): Adjust bitpos comment.  New
	field enumval.
	(struct main_type.flds_bnds.bields): Adjust loc_kind and bitsize to
	accommodate enumval.
	(struct call_site): Adjust loc_kind to accommodate enumval.
	(FIELD_ENUMVAL, FIELD_ENUMVAL_LVAL, SET_FIELD_ENUMVAL)
	(TYPE_FIELD_ENUMVAL): New macros.
	* m2-typeprint.c (m2_enum): Use TYPE_FIELD_ENUMVAL.
	* mdebugread.c (parse_symbol): Use TYPE_FIELD_ENUMVAL for
	TYPE_CODE_ENUM.
	* p-typeprint.c (pascal_type_print_base): Likewise.
	* python/lib/gdb/printing.py (class FlagEnumerationPrinter): Use
	enumval.
	* python/lib/gdb/types.py (make_enum_dict): Likewise.
	* python/py-type.c (convert_field): New variable addrstring.  Use
	TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM.
	(check_types_equal): Support also FIELD_LOC_KIND_ENUMVAL.
	* stabsread.c (read_enum_type): Use SET_FIELD_ENUMVAL.
	* typepint.c (print_type_scalar): Use TYPE_FIELD_ENUMVAL for
	TYPE_CODE_ENUM.
	* valprint.c (generic_val_print): Likewise.

gdb/testsuite/
	PR symtab/7259:
	* gdb.base/enumval.c: New test case.
	* gdb.base/enumval.exp: New test case.
	* gdb.python/py-type.exp (test_enums): Use field.enumval instead of
	field.bitpos.
2012-04-18 06:46:47 +00:00
Doug Evans dcc0705263 * dwarf2read.c (lookup_signatured_type): Return NULL instead of 0. 2012-04-18 06:24:48 +00:00
Doug Evans 380bca9753 * dwarf2read.c: Whitespace fixes.
(lookup_signatured_type): Tweak comment.
	(get_die_type_at_offset): Fix comment.
2012-04-18 06:21:09 +00:00
Pedro Alves f41f5e616a 2012-04-17 Pedro Alves <palves@redhat.com>
* gdbtypes.h (FIELD_BITPOS): Rename to ...
	(FIELD_BITPOS_LVAL): ... this.
	(FIELD_BITPOS): New.
	(SET_FIELD_BITPOS): Adjust to use FIELD_BITPOS_LVAL.
	* dwarf2read.c (dwarf2_add_field): Use SET_FIELD_BITPOS.
	* gdbtypes.c (append_composite_type_field_aligned): Adjust to use
	SET_FIELD_BITPOS.
	* gnu-v3-abi.c (build_gdb_vtable_type): Adjust to use
	SET_FIELD_BITPOS.
	* stabsread.c (read_cpp_abbrev, read_one_struct_field)
	(read_baseclasses): Adjust to use SET_FIELD_BITPOS.
	* target-descriptions.c (tdesc_gdb_type): Adjust to use
	SET_FIELD_BITPOS.
2012-04-17 13:55:32 +00:00
Doug Evans e319fa28f9 * dwarf2read.c (lookup_signatured_type): Remove arg "objfile", unused.
All callers updated.
2012-04-13 02:03:21 +00:00
Doug Evans 0e50663e56 * dwarf2read.c (create_all_type_units): Renamed from
create_debug_types_hash_table.  All callers updated.
2012-04-12 02:09:14 +00:00
Doug Evans 52dc124a4d * dwarf2read.c (create_signatured_type_table_from_index): Rename
local type_sig to sig_type, type_offset to type_offset_in_tu.
	(hash_signatured_type): Renamed from hash_type_signature,
	all callers updated.
	(eq_signatured_type): Renamed from eq_type_signature,
	all callers updated.
	(create_debug_types_hash_table): Rename local type_sig to sig_type.
	(process_enumeration_scope): Ditto.
	(lookup_signatured_type_at_offset): Ditto.
	(load_full_type_unit, read_signatured_type): Ditto.
2012-04-12 01:39:22 +00:00
Doug Evans 0d99eb771c * dwarf2read.c (dwarf2_per_cu_data). Clarify comment.
(load_partial_dies): Clarify comment.
	(find_partial_die): Support rereading type units.
	Clarify CU handling, if we know offset is in CU, don't search for the
	containing CU.  Add comment regarding memory waste.
2012-04-10 18:56:31 +00:00
Doug Evans 7adf1e79ca * dwarf2read.c (load_partial_dies): Change condition to assert. 2012-04-07 19:35:17 +00:00
Jan Kratochvil b64f50a1ae gdb/
Code cleanupp: Use cu_offset and sect_offset compile time type checking.
	* dwarf2expr.c (add_piece, dwarf_get_base_type, execute_stack_op)
	(ctx_no_dwarf_call, ctx_no_get_base_type): Use cu_offset and
	sect_offset.
	* dwarf2expr.h (cu_offset, sect_offset): New types.
	(struct dwarf_expr_context_funcs) <dwarf_call>
	(struct dwarf_expr_context_funcs) <get_base_type>: Use cu_offset and
	sect_offset.
	(struct dwarf_expr_context) <len>: Improve the comment.
	(struct dwarf_expr_piece, ctx_no_dwarf_call, ctx_no_get_base_type): Use
	cu_offset and sect_offset.
	* dwarf2loc.c (per_cu_dwarf_call, dwarf_expr_dwarf_call)
	(dwarf_expr_get_base_type, needs_frame_dwarf_call)
	(dwarf2_compile_expr_to_ax, disassemble_dwarf_expression): Likewise.
	* dwarf2loc.h: Include dwarf2expr.h.
	(dwarf2_fetch_die_location_block, dwarf2_get_die_type): Use cu_offset
	and sect_offset.
	* dwarf2read.c (struct dwarf2_per_objfile) <debug_types_type_hash>:
	Improve the comment.
	(struct comp_unit_head, struct dwarf2_cu, struct dwarf2_per_cu_data)
	(struct signatured_type, struct line_header, struct partial_die_info)
	(struct die_info, find_partial_die, dwarf2_get_ref_die_offset)
	(lookup_signatured_type_at_offset, dwarf2_find_containing_comp_unit)
	(get_die_type_at_offset, create_cus_from_index)
	(create_signatured_type_table_from_index, dw2_get_file_names)
	(offset_in_cu_p, read_comp_unit_head, error_check_comp_unit_head)
	(read_and_check_comp_unit_head, read_and_check_type_unit_head)
	(create_debug_types_hash_table, process_psymtab_comp_unit)
	(load_partial_comp_unit, create_all_comp_units)
	(partial_die_parent_scope, partial_die_full_name, skip_one_die)
	(load_full_comp_unit, dwarf2_physname, read_import_statement)
	(inherit_abstract_dies, read_func_scope, read_call_site_scope)
	(dwarf2_add_member_fn, process_enumeration_scope, read_module_type)
	(read_typedef, die_hash, die_eq, read_full_die, dwarf2_read_abbrevs)
	(load_partial_dies, read_partial_die, find_partial_die_in_comp_unit)
	(find_partial_die, read_attribute_value, lookup_die_type)
	(dump_die_shallow, store_in_ref_table): Use cu_offset and sect_offset.
	(is_ref_attr): New function comment.
	(dwarf2_get_ref_die_offset): New function comment, new variable retval.
	Use cu_offset and sect_offset.
	(follow_die_offset, follow_die_ref, dwarf2_fetch_die_location_block)
	(dwarf2_get_die_type, follow_die_sig, lookup_signatured_type_at_offset)
	(load_full_type_unit, read_signatured_type, per_cu_header_read_in)
	(dwarf2_find_containing_comp_unit, struct dwarf2_offset_and_type)
	(offset_and_type_hash, offset_and_type_eq, set_die_type)
	(get_die_type_at_offset, partial_die_hash, partial_die_eq)
	(write_one_signatured_type, write_psymtabs_to_index): Use cu_offset and
	sect_offset.
2012-03-19 19:59:19 +00:00
Jan Kratochvil ab260dad39 gdb/
PR symtab/13777
	* dwarf2read.c (process_full_comp_unit): Set LOCATIONS_VALID only for
	GCC >=4.5.

gdb/testsuite/
	PR symtab/13777
	* gdb.dwarf2/dw2-skip-prologue.S (DW_AT_producer): Set it to 4.5.0.
2012-03-16 18:26:02 +00:00
Gary Benson 481860b396 gdb:
PR breakpoints/10738
	* dwarf2read.c (use_deprecated_index_sections): New global.
	(struct partial_die_info): New member may_be_inlined.
	(read_partial_die): Set may_be_inlined where appropriate.
	(add_partial_subprogram): Add partial symbols for partial
	DIEs that may be inlined.
	(new_symbol_full): Add inlined subroutines to the current
	scope.
	(write_psymtabs_to_index): Bump version number.
	(dwarf2_read_index): Read only version 6 indices unless
	use_deprecated_index_sections is set.
	* linespec.c (symbol_and_data_callback): New structure.
	(iterate_inline_only): New function.
	(iterate_over_all_matching_symtabs): New argument
	"include_inline".  If nonzero, also call the callback for
	symbols representing inlined subroutines.
	(lookup_prefix_sym): Pass extra argument to the above.
	(find_function_symbols): Likewise.
	(add_matching_symbols_to_info): Likewise.
	* NEWS: Mention that GDB can now set breakpoints on inlined
	functions.

gdb/doc:
	PR breakpoints/10738
	* gdb.texinfo (Inline Functions): Remove the now-unnecessary @item
	stating that GDB cannot set breakpoints on inlined functions.
	(Mode Options): Document --use-deprecated-index-sections.
	(Index Section Format): Document new index section version format.

gdb/testsuite:
	PR breakpoints/10738
	* gdb.opt/inline-break.exp: New file.
	* gdb.opt/inline-break.c: Likewise.
	* gdb.dwarf2/inline-break.exp: Likewise.
	* gdb.dwarf2/inline-break.S: Likewise.
	* gdb.base/annota1.exp: Cope with old .gdb_index warnings.
	* gdb.base/async-shell.exp: Likewise.
	* lib/mi-support.exp (library_loaded_re): Likewise.
2012-03-16 16:47:34 +00:00
Doug Evans 589b4a3225 * dwarf2read.c (dwarf_stack_op_name): Add DW_OP_GNU_encoded_addr,
DW_OP_GNU_parameter_ref.
2012-03-15 02:34:49 +00:00
Doug Evans c5b7e1cbc5 * dwarf2read.c (load_partial_comp_unit): Defer adding cu to
read_in_chain until we have successfully read it in.
	(load_full_comp_unit): Ditto.
	(read_signatured_type): Add comment.
2012-03-13 17:16:18 +00:00
Tom Tromey ba919b5861 * dwarf2read.c (struct dwarf2_cu) <checked_producer,
producer_is_gxx_lt_4_6>: New fields.
	(producer_is_gxx_lt_4_6): Use and update producer cache fields.
2012-03-09 20:17:32 +00:00
Tom Tromey a48e046c37 * dwarf2read.c (dwarf2_attr): Avoid tail-recursive call. 2012-03-09 20:06:18 +00:00
Jan Kratochvil 7fe25d9bd2 gdb/
Fix CU relative vs. absolute DIE offsets.
	* dwarf2loc.h (dwarf2_fetch_die_location_block): Rename parameter
	offset to offset_in_cu.
	* dwarf2read.c (process_enumeration_scope): Add CU offset to
	TYPE_OFFSET.
	(dwarf2_fetch_die_location_block): Rename parameter offset to
	offset_in_cu.  New variable offset, add CU offset to OFFSET_IN_CU.

gdb/testsuite/
	Fix CU relative vs. absolute DIE offsets.
	* gdb.dwarf2/dw2-op-call.S: New compilation unit preceding the existing
	one.
2012-03-08 19:37:08 +00:00
Joel Brobecker 1281d2a30a Pass absolute die offset in call to get_die_type_at_offset
gdb/ChangeLog:

        * dwarf2read.c (dwarf2_get_die_type): Pass absolute offset
        in call to get_die_type_at_offset.
2012-03-06 23:41:50 +00:00
Doug Evans 7fb3ad1f9f * dwarf2read.c (load_full_comp_unit): Remove unnecessary reading of
abbrev table, read_comp_unit will do it.
2012-03-02 01:55:15 +00:00
Pedro Alves 70221824e3 2012-03-01 Pedro Alves <palves@redhat.com>
* amd64-linux-tdep.c (amd64_linux_record_signal): Make static.
	* breakpoint.c (create_exception_master_breakpoint, trace_command)
	(ftrace_command, strace_command): Make static.
	* d-lang.c (_initialize_d_language): Declare.
	* dwarf2expr.c (_initialize_dwarf2expr): Declare.
	* dwarf2loc.c (_initialize_dwarf2loc):
	* dwarf2read.c (process_psymtab_comp_unit): Make static.
	* exec.c (exec_get_section_table): Make static.
	* i386-linux-tdep.c (i386_linux_record_signal): Make static.
	* infcmd.c (ensure_valid_thread, ensure_not_tfind_mode): Make static.
	* inferior.c (remove_inferior_command, add_inferior_command)
	(clone_inferior_command): Make static.
	* linux-nat.c (linux_nat_thread_address_space)
	(linux_nat_core_of_thread): Make static.
	* linux-tdep.c (_initialize_linux_tdep): Declare.
	* objc-lang.c (_initialize_objc_lang): Declare.
	* opencl-lang.c (builtin_opencl_type, opencl_language_arch_info):
	Make static.
	(_initialize_opencl_language): Declare.
	* record.c (_initialize_record): Declare.
	* remote.c (demand_private_info, remote_get_tib_address)
	(remote_supports_cond_tracepoints)
	(remote_supports_fast_tracepoints, remote_get_tracepoint_status):
	Make static.
	* skip.c (_initialize_step_skip): Declare.
	* symtab.c (skip_prologue_using_lineinfo): Make static.
	* tracepoint.c (delete_trace_state_variable)
	(trace_variable_command, delete_trace_variable_command)
	(get_uploaded_tsv, find_matching_tracepoint_location)
	(find_matching_tsv, create_tsv_from_upload, get_traceframe_info):
	Make static.
	* value.c (pack_unsigned_long): Make static.
	* varobj.c (varobj_ensure_python_env): Make static.
	* windows-tdep.c (_initialize_windows_tdep): Declare.
	* xml-syscall.c (make_cleanup_free_syscalls_info): Make static.
2012-03-01 21:14:00 +00:00
Doug Evans 122d194084 * dwarf2read.c (dwarf2_cu): Remove unused members has_form_ref_addr,
has_namespace_info.
	(dwarf2_read_abbrevs): Remove corresponding initialization.
2012-03-01 19:55:35 +00:00
Gary Benson feea76c262 2012-02-22 Gary Benson <gbenson@redhat.com>
* dwarf2read.c (dwarf2_read_index): Correct misspelling.
	(find_slot_in_mapped_hash): Likewise.
2012-02-22 14:55:25 +00:00
Tom Tromey 24c79950cf PR gdb/13498:
* dwarf2read.c (dw2_expand_symtabs_matching): Only visit a
	particular set of file names once.
	(dw2_map_symbol_filenames): Likewise.
2012-02-20 20:56:12 +00:00
Tom Tromey 4d0795ca68 * dwarf2read.c (dw2_map_symtabs_matching_filename): Remove
extraneous block.
2012-02-20 19:24:39 +00:00
Doug Evans 0d5cff5020 * gdbtypes.h (struct main_type): Change type of name,tag_name,
and fields.name members from char * to const char *.  All uses updated.
	(struct cplus_struct_type): Change type of fn_fieldlists.name member
	from char * to const char *.  All uses updated.
	(type_name_no_tag): Update.
	(lookup_unsigned_typename, lookup_signed_typename): Update.
	* gdbtypes.c (type_name_no_tag): Change result type
	from char * to const char *.  All callers updated.
	(lookup_unsigned_typename, lookup_signed_typename): Change type of
	name parameter from char * to const char *.
	* symtab.h (struct cplus_specific): Change type of demangled_name
	member from char * to const char *.  All uses updated.
	(struct general_symbol_info): Change type of name and
	mangled_lang.demangled_name members from char * to const char *.
	All uses updated.
	(symbol_get_demangled_name, symbol_natural_name): Update.
	(symbol_demangled_name, symbol_search_name): Update.
	* symtab.c (symbol_get_demangled_name): Change result type
	from char * to const char *.  All callers updated.
	(symbol_natural_name, symbol_demangled_name): Ditto.
	(symbol_search_name): Ditto.
	(completion_list_add_name): Change type of symname,sym_text,
	text,word parameters from char * to const char *.
	(completion_list_objc_symbol): Change type of sym_text,
	text,word parameters from char * to const char *.
	* ada-lang.c (find_struct_field): Change type of name parameter
	from char * to const char *.
	(encoded_ordered_before): Similarly for N0,N1 parameters.
	(old_renaming_is_invisible): Similarly for function_name parameter.
	(ada_type_name): Change result type from char * to const char *.
	All callers updated.
	* ada-lang.h (ada_type_name): Update.
	* buildsym.c (hashname): Change type of name parameter
	from char * to const char *.
	* buildsym.h (hashname): Update.
	* dbxread.c (end_psymtab): Change type of include_list parameter
	from char ** to const char **.
	* dwarf2read.c (determine_prefix): Change result type
	from char * to const char *.  All callers updated.
	* f-lang.c (find_common_for_function): Change type of name, funcname
	parameters from char * to const char *.
	* f-lang.c (find_common_for_function): Update.
	* f-valprint.c (list_all_visible_commons): Change type of funcname
	parameters from char * to const char *.
	* gdbarch.sh (static_transform_name): Change type of name parameter
	and result from char * to const char *.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.
	* i386-sol2-tdep.c (i386_sol2_static_transform_name): Change type
	of name parameter from char * to const char *.
	* jv-lang.c (java_primitive_type_from_name): Ditto.
	(java_demangled_signature_length): Similarly for signature parameter.
	(java_demangled_signature_copy): Ditto.
	(java_demangle_type_signature): Ditto.
	* jv-lang.h (java_primitive_type_from_name): Update.
	(java_demangle_type_signature): Update.
	* objc-lang.c (specialcmp): Change type of a,b parameters
	from char * to const char *.
	* p-lang.c (is_pascal_string_type): Change type of arrayname parameter
	from char * to const char *.  All callers updated.
	* p-lang.h (is_pascal_string_type): Update.
	* solib-frv.c (find_canonical_descriptor_in_load_object): Change type
	of name parameter from char * to const char *.
	* sparc-sol2-tdep.c (sparc_sol2_static_transform_name): Ditto.
	* utils.c (fprintf_symbol_filtered): Ditto.
	* defs.h (fprintf_symbol_filtered): Update.
	* sparc-tdep.h (sparc_sol2_static_transform_name): Update.
	* stabsread.h (end_psymtab): Update.
	* stack.c (find_frame_funname): Change type of funname parameter
	from char ** to const char **.
	* stack.h (find_frame_funname): Update.
	* typeprint.c (type_print): Change type of varstring parameter
	from char * to const char *.
	* value.h (type_print): Update.
	* xcoffread.c (xcoff_start_psymtab): Change type of filename parameter
	from char * to const char *.  All callers updated.
	(xcoff_end_psymtab): Change type of include_list parameter
	from char ** to const char **.  All callers updated.
	(swap_sym): Similarly for name parameter.  All callers updated.
	* coffread.c (patch_type): Add (char*) cast to xfree parameter.
	Use xstrdup.
	(process_coff_symbol): Use xstrdup.
	* stabsread.c (stabs_method_name_from_physname): Renamed from
	update_method_name_from_physname.  Change result type from void
	to char *.  All callers updated.
	(read_member_functions): In has_destructor case, store name in objfile
	obstack instead of malloc space.  In !has_stub case, fix mem leak.
2012-02-07 04:48:23 +00:00