Commit Graph

30942 Commits

Author SHA1 Message Date
gdbadmin 0da59bf18e *** empty log message *** 2012-07-21 00:00:03 +00:00
Pedro Alves 3def0b3660 2012-07-20 Jeff Kenton <jkenton@tilera.com>
* tilegx-linux-tdep.c (tilegx_linux_sigframe_init): Fix
	SIGTRAMP_FRAME unwinding.
2012-07-20 17:54:06 +00:00
Doug Evans e615022aba * NEWS: Document new options "set/show use-deprecated-index-sections",
and delete reference to --use-deprecated-index-sections.
	* symfile.h (use_deprecated_index_sections): Delete.
	* dwarf2read.c (use_deprecated_index_sections): Make static.
	(read_index_from_section): Update wording of how to load
	deprecated index sections.
	(_initialize_dwarf2_read): New options
	"set/show use-deprecated-index-sections".
	* main.c (captured_main): Delete --use-deprecated-index-sections.

	doc/
	* gdb.texinfo (Mode Options): Delete --use-deprecated-index-sections.
	(Index Files): Document how to control the use of deprecated index
	sections.
	(Index Section Format): Replace --use-deprecated-index-sections with
	"set use-deprecated-index-sections on".
2012-07-20 17:38:05 +00:00
Pedro Alves 64776a0b2d 2012-07-20 Pedro Alves <palves@redhat.com>
PR threads/11692
	PR gdb/12203

	gdb/
	* infrun.c (handle_inferior_event) <new thread>: Don't special
	case minus_one_ptid.
	<TARGET_WAITKIND_SPURIOUS>: Ditto.
	* linux-thread-db.c (thread_get_info_callback): Don't return early
	if the thread is zombie.
	(thread_from_lwp): Change return type to void.  Rewrite stale
	comment.
	(attach_thread): Don't return early if the thread is zombie,
	instead set its "dying" flag.
	(thread_db_wait): Don't return TARGET_WAITKIND_SPURIOUS anymore.
	(find_new_threads_callback): Don't return early if the thread is
	zombie.

	gdb/testsuite/
	* gdb.threads/create-fail.c: New file.
	* gdb.threads/create-fail.exp: New file.
2012-07-20 17:27:29 +00:00
Pedro Alves 09826ec59d 2012-07-20 Pedro Alves <palves@redhat.com>
* linux-nat.c (linux_nat_wait): Dump the passed in target options.
	* target.c (target_wait): Likewise.
	(str_comma_list_concat_elem, do_option, target_options_to_string):
	New functions.
	* target.h (target_options_to_string): Declare.
2012-07-20 16:57:32 +00:00
Tom Tromey f7a35f025b 2012-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
Tom Tromey  <tromey@redhat.com>

	* dwarf2read.c (dwarf_decode_macros)
	<DW_MACRO_GNU_define_indirect_alt, DW_MACRO_GNU_undef_indirect_alt,
	DW_MACRO_GNU_transparent_include_alt>: New cases.
	(dwarf_decode_macro_bytes) <DW_MACRO_GNU_define_indirect,
	DW_MACRO_GNU_undef_indirect>: Examine 'section_is_dwz'.
2012-07-20 16:51:51 +00:00
Tom Tromey b81e1ee05c * dwarf2read.c (try_open_dwo_file): Don't call
gdb_bfd_stash_filename.
2012-07-20 16:12:44 +00:00
Pedro Alves 99c1624c13 2012-07-20 Pedro Alves <palves@redhat.com>
* i386-tdep.c (i386_record_modrm, i386_record_lea_modrm_addr)
	(i386_record_lea_modrm, i386_record_push, i386_record_floats)
	(i386_process_record): Tweak description comments.
2012-07-20 11:48:18 +00:00
Pedro Alves 4ffa4fc748 2012-07-20 Pedro Alves <palves@redhat.com>
* i386-tdep.c (i386_record_modrm, i386_record_lea_modrm_addr)
	(i386_process_record): Use record_read_memory.
	* record.c (record_read_memory): New function.
	(record_arch_list_add_mem, record_exec_insn): Use
	record_read_memory.
	* record.h (record_read_memory): Declare.
2012-07-20 11:22:32 +00:00
Yao Qi c24343e289 gdb/
* cli/cli-setshow.c (do_setshow_command): Don't check pointer is
	NULL for xfree.
2012-07-20 08:59:32 +00:00
gdbadmin a8f301aa99 *** empty log message *** 2012-07-20 00:00:32 +00:00
Pedro Alves 13e4e967fc 2012-07-19 Pedro Alves <palves@redhat.com>
* config/monitor.exp (gdb_load): Remove redundant ';' in for loop.
	* config/vx.exp (gdb_start): Likewise.
	* gdb.base/printcmds.exp (test_print_repeats_10): Likewise.
	* gdb.base/setvar.exp (test_set): Likewise.
	* gdb.base/sigall.exp: Use foreach+lrange instead of for+continue.
	* gdb.reverse/sigall-precsave.exp: Likewise.
	* gdb.reverse/sigall-reverse.exp: Likewise.
2012-07-19 20:00:59 +00:00
Michael Eager 961bd387ba 2012-07-19 Michael Eager <eager@eagercon.com>
* i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
	to hw_execute.
	* linux-x86-low.c (x86_insert_point, x86_remove_point):
	Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
	hardware breakpoint.
2012-07-19 18:27:17 +00:00
Pedro Alves 90f47860e1 2012-07-19 Pedro Alves <palves@redhat.com>
* record.c (record_resume): Ask the target beneath to report all
	signals.
2012-07-19 17:53:00 +00:00
Pedro Alves b7aefa4d2e 2012-07-19 Pedro Alves <palves@redhat.com>
* gdb.reverse/sigall-precsave.exp: Set a breakpoint at each signal
	handler before recording.
2012-07-19 17:05:49 +00:00
Doug Evans 0109304504 * dwarf2read.c (dwarf2_ranges_read): Ignore ranges starting at zero if
there's no section at address zero.
	(dwarf2_record_block_ranges): Ditto.
2012-07-19 16:35:48 +00:00
Yao Qi a7c3d16228 gdb/
* command.h, remote.c: Fix a typo in comment.
2012-07-19 16:01:13 +00:00
Tom Tromey 608b49672e PR exp/13206:
* ax-gdb.c (gen_expr) <OP_TYPEOF, OP_DECLTYPE>: New cases.
	* breakpoint.c (watchpoint_exp_is_const) <OP_TYPEOF,
	OP_DECLTYPE>: New cases.
	* c-exp.y (TYPEOF, DECLTYPE): New tokens.
	(type_exp): Add new productions.
	(ident_tokens): Add __typeof__, typeof, __typeof, __decltype,
	and decltype.
	* eval.c (evaluate_subexp_standard) <OP_TYPEOF, OP_DECLTYPE>:
	New case.
	* expprint.c (dump_subexp_body_standard) <OP_TYPEOF,
	OP_DECLTYPE>: New case.
	* parse.c (operator_length_standard) <OP_TYPEOF, OP_DECLTYPE>:
	New case.
	* std-operator.def (OP_TYPEOF, OP_DECLTYPE): New constants.
	* varobj.c (varobj_create): Handle OP_TYPEOF, OP_DECLTYPE.
gdb/testsuite
	* gdb.cp/casts.exp: Add tests for typeof and decltype.
	* gdb.cp/casts.cc (decltype): New function.
	(main): Use it.
2012-07-19 15:38:18 +00:00
Tom Tromey 274b54d7e2 * c-exp.y (enum token_flags): New.
(struct token) <cxx_only>: Remove.
	<flags>: New field.
	(tokentab3, tokentab2, ident_tokens): Update.
	(lex_one_token): Update.  Handle FLAG_SHADOW.
2012-07-19 15:34:38 +00:00
Tom Tromey 9eaf670568 * ax-gdb.c (gen_expr): Handle UNOP_CAST_TYPE, UNOP_MEMVAL_TYPE.
* breakpoint.c (watchpoint_exp_is_const): Handle UNOP_CAST_TYPE,
	UNOP_REINTERPRET_CAST, UNOP_DYNAMIC_CAST.
	* c-exp.y (exp): Emit UNOP_MEMVAL_TYPE, UNOP_CAST_TYPE.  Update
	for changes to UNOP_REINTERPRET_CAST, UNOP_DYNAMIC_CAST.  Use
	type_exp production where appropriate.
	* eval.c (evaluate_subexp_standard) <UNOP_CAST_TYPE>: New case.
	<UNOP_DYNAMIC_CAST, UNOP_REINTERPRET_CAST>: Update.
	<UNOP_MEMVAL_TYPE>: New case.
	(evaluate_subexp_for_address) <UNOP_MEMVAL_TYPE>: New case.
	(evaluate_subexp_for_sizeof) <UNOP_MEMVAL_TYPE>: New case.
	* expprint.c (print_subexp_standard) <UNOP_CAST_TYPE>: New case.
	<UNOP_MEMVAL_TYPE>: New case.
	(dump_subexp_body_standard) <UNOP_DYNAMIC_CAST,
	UNOP_REINTERPRET_CAST>: Update.
	<UNOP_CAST_TYPE, UNOP_MEMVAL_TYPE>: New cases.
	* parse.c (operator_length_standard) <UNOP_DYNAMIC_CAST,
	UNOP_REINTERPRET_CAST>: Update.
	<UNOP_CAST_TYPE, UNOP_MEMVAL_TYPE>: New cases.
	* stack.c (return_command): Also check for UNOP_CAST_TYPE.
	* std-operator.def (UNOP_CAST_TYPE, UNOP_MEMVAL_TYPE): New
	constants.
2012-07-19 15:33:25 +00:00
Pedro Alves b1e0c0fa45 2012-07-19 Pedro Alves <palves@redhat.com>
* gdb.base/sigall.exp (signals): New list.
	<top level>: Loop over signals in the $signals list instead of
	calling a test function once per signal.
	* gdb.reverse/sigall-precsave.exp (signals): New list.
	<top level>: Loop over signals in the $signals list instead of
	calling a test function once per signal.
	* gdb.reverse/sigall-reverse.exp (signals): New list.
	<top level>: Loop over signals in the $signals list instead of
	calling a test function once per signal.
2012-07-19 14:33:19 +00:00
Yao Qi 6ace3df1ec * cli/cli-setshow.c (do_setshow_command): Handle case 'var_filename'
and case 'var_optional_filename' together.
	* infcmd.c (_initialize_infcmd): Call add_setshow_string_noescape_cmd
	instead of add_setshow_optional_filename_cmd for setshow command
	'args'.  Set completer for 'set args'.

gdb/testsuite:

	* gdb.base/setshow.exp: Test 'set args ~'.
2012-07-19 12:48:17 +00:00
gdbadmin fd9c9d327b *** empty log message *** 2012-07-19 00:00:03 +00:00
Doug Evans 48faced0e5 * common/gdb_vecs.h: Moved here from ./gdb_vecs.h.
* common/gdb_vecs.c: New file, contents from utils.c.
	* common/host-defs.h: New file, contents from defs.h.
	* utils.h: New file, contents from defs.h.
	* defs.h: Move all declarations of objects defined in utils.c
	to utils.h (except QUIT() and related).
	#include "utils.h", "host-defs.h".
	* probe.h (probe_p): Move here from gdb_vecs.h.
	* symfile.c: #include "probe.h" instead of "gdb_vecs.h".
	* utils.c (free_char_ptr_vec): Moved to common/gdb_vecs.c.
	(dirnames_to_char_ptr_vec_append, dirnames_to_char_ptr_vec): Ditto.
	* Makefile.in (SFILES): Add common/gdb_vecs.c.
	(HFILES_NO_SRCDIR): Add common/gdb_vecs.h, common/host-defs.h, utils.h.
	(COMMON_OBS): Add gdb_vecs.o.
	(gdb_vecs.o): New rule.
2012-07-18 23:37:58 +00:00
Keith Seitz 66f1999bd8 * linespec.c (add_sal_to_sals): Add LITERAL_CANONICAL
parameter.  If non-zero, use SYMNAME as the canonical name
	for the SaL.
	Update all callers.
	(convert_linespec_to_sals): Use add_sal_to_sals for
	expressions, too.
	(decode_line_full): No need to "fill in missing canonical names"
	anymore. Simply make cleanups for the allocated names.
2012-07-18 20:38:18 +00:00
Keith Seitz 5d94e27bfd * linespec.c (struct linespec): Constify expression,
source_filename, function_name, and label_name.
	(symbol_not_found_error): Make all parameters const.
	(linespec_parser_delete): No need to check for NULL
	when using xfree. Cast const char * to char * for xfree.
2012-07-18 20:30:01 +00:00
Keith Seitz af4908ba36 * breakpoint.c (invalid_thread_id_error): New function.
(find_condition_and_thread): Use invalid_thread_id_error.
	(watch_command_1): Likewise.
2012-07-18 20:20:51 +00:00
Tom Tromey 853254db41 * cc-with-index.sh, cc-with-dwz.sh: Remove.
* contrib/cc-with-tweaks.sh: New file.
2012-07-18 20:04:44 +00:00
Tom Tromey 2ec9a5e0e2 * dwarf2read.c (struct dwz_file) <gdb_index>: New field.
(locate_dwz_sections): Recognize .gdb_index.
	(create_cus_from_index_list): New function.
	(create_cus_from_index): Use it.  Handle .dwz data.
	(read_index_from_section): New function, extracted from
	dwarf2_read_index.
	(dwarf2_read_index): Use it.  Read .gdb_index from dwz file,
	if needed.
2012-07-18 20:01:27 +00:00
Tom Tromey 3658672899 * dwarf2read.c (struct dwarf2_per_objfile) <dwz_file>: New field.
(struct dwarf2_per_cu_data) <length>: No longer bitfield.
	<is_dwz>: New field.
	(struct dwz_file): New.
	(struct partial_die_info) <is_dwz, spec_is_dwz>: New fields.
	(locate_dwz_sections, dwarf2_get_dwz_file)
	(get_abbrev_section_for_cu): New functions.
	(error_check_comp_unit_head, read_and_check_comp_unit_head)
	(read_and_check_type_unit_head): Add abbrev_section argument.
	(create_debug_types_hash_table): Update.
	(init_cutu_and_read_dies): Use proper abbrev section.
	(init_cutu_and_read_dies_no_follow): Likewise.
	(set_partial_user): Do nothing if PST==NULL.
	(read_comp_units_from_section): New function.
	(create_all_comp_units): Use it.
	(scan_partial_symbols, partial_die_parent_scope): Update.
	(skip_one_die): Handle DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt.
	(process_imported_unit_die, read_partial_die): Handle .dwz files.
	(find_partial_die): Add offset_in_dwz argument.  Update.
	(guess_partial_die_structure_name, fixup_partial_die): Update.
	(read_attribute_value): Handle DW_FORM_GNU_ref_alt,
	DW_FORM_GNU_strp_alt.
	(read_indirect_string_from_dwz): New function.
	(dwarf2_const_value_attr): Handle DW_FORM_GNU_strp_alt.
	(dump_die_shallow): Handle DW_FORM_GNU_ref_alt, DW_FORM_GNU_strp_alt.
	(is_ref_attr): Handle DW_FORM_GNU_ref_alt.
	(follow_die_offset): Add offset_in_dwz argument.
	(follow_die_ref, dwarf2_fetch_die_location_block): Update.
	(skip_form_bytes): Handle DW_FORM_GNU_strp_alt.
	(dwarf_decode_macro_bytes): Add section_is_dwz argument.
	Handle new macro forms.
	(dwarf_decode_macros): Update.
	(dwarf2_find_containing_comp_unit): Add offset_in_dwz argument.
	(dwarf2_per_objfile_free): Unref dwz_bfd, if it exists
	(lookup_die_type): Handle DW_FORM_GNU_ref_alt.
	(create_debug_types_hash_table): Use correct abbrev section.
	(get_debug_line_section): New function.
	(dwarf_decode_line_header, dwarf_decode_lines_1): Use it.
	(process_full_comp_unit): Pass 'required' argument to
	end_symtab_get_static_block.
	* buildsym.h (end_symtab_get_static_block): Update.
	* buildsym.c (end_symtab_get_static_block): Add 'required'
	argument.
	(end_symtab, end_expandable_symtab): Update.
2012-07-18 19:59:35 +00:00
Tom Tromey 4bf44c1cf1 * dwarf2read.c: Don't include zlib.h or sys/mman.h.
(pagesize): Remove.
	(struct dwarf2_section_info) <map_addr, map_len>: Remove.
	(zlib_decompress_section): Remove.
	(dwarf2_read_section): Use gdb_bfd_map_section.
	(munmap_section_buffer): Remove.
	(free_dwo_file, dwarf2_per_objfile_free): Don't use
	munmap_section_buffer.
	* gdb_bfd.c: Include zlib.h, sys/mman.h.
	(struct gdb_bfd_section_data): New.
	(free_one_bfd_section): New function.
	(gdb_bfd_close_or_warn): Use free_one_bfd_section.
	(get_section_descriptor, zlib_decompress_section)
	(gdb_bfd_map_section): New functions.
	* gdb_bfd.h (gdb_bfd_map_section): Declare.
2012-07-18 19:57:21 +00:00
Tom Tromey bb39779773 * dwarf2read.c (try_open_dwo_file): use gdb_bfd_open. 2012-07-18 19:53:05 +00:00
Tom Tromey 6ec53d052b * gdb_bfd.c (struct gdb_bfd_data): New.
(gdb_bfd_cache): New global.
	(struct gdb_bfd_cache_search): New.
	(hash_bfd, eq_bfd, gdb_bfd_open): New functions.
	(gdb_bfd_ref, gdb_bfd_unref): Use gdb_bfd_data.
	* gdb_bfd.h (gdb_bfd_open): Declare.
2012-07-18 19:49:33 +00:00
Tom Tromey f9a062ffb5 * utils.c (make_cleanup_bfd_unref): Rename from
make_cleanup_bfd_close.
	* defs.h (make_cleanup_bfd_unref): Rename from
	make_cleanup_bfd_close.
	* cli/cli-dump.c (bfd_openr_with_cleanup): Update.
	(bfd_openw_with_cleanup): Update.
	* corelow.c (core_open): Update.
	* dsrec.c (load_srec): Update.
	* m32r-rom.c (m32r_load, m32r_upload_command): Update.
	* remote-m32r-sdi.c (m32r_load): Update.
	* remote-mips.c (mips_load_srec): Update.
	(pmon_load_fast): Update.
	* solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init):
	Update.
	(darwin_bfd_open): Update.
	* solib.c (solib_bfd_fopen): Update.
	* symfile-mem.c (symbol_file_add_from_memory): Update.
	* symfile.c (symbol_file_add_with_addrs_or_offsets): Update.
	(symfile_bfd_open): Update.
	(generic_load): Update.
2012-07-18 19:42:26 +00:00
Tom Tromey d6ad71ba41 * remote-mips.c (mips_load_srec): Use make_cleanup_bfd_close.
(pmon_load_fast): Likewise.
	* m32r-rom.c (m32r_load): Use make_cleanup_bfd_close.
	(m32r_upload_command): Likewise.
	* dsrec.c (load_srec): Use make_cleanup_bfd_close.
	* solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init):
	Use make_cleanup_bfd_close.
2012-07-18 19:38:39 +00:00
Tom Tromey a4453b7e0b * symfile.c (symfile_bfd_open): Don't copy name. Call
gdb_bfd_stash_filename.
	(load_command): Open the new BFD before freeing the old.
	(bfd_open_maybe_remote): Call gdb_bfd_stash_filename.
	* symfile-mem.c (symbol_file_add_from_memory): Don't copy name.
	Call gdb_bfd_stash_filename.
	* spu-linux-nat.c (spu_bfd_open): Don't copy name.
	* solib-spu.c (spu_bfd_fopen): Don't copy name.  Call
	gdb_bfd_stash_filename.
	* solib-darwin.c (darwin_solib_get_all_image_info_addr_at_init):
	Free found_pathname.
	* rs6000-nat.c (add_vmap): Don't copy filename.  Call
	gdb_bfd_stash_filename.
	* remote.c (remote_bfd_open): Call gdb_bfd_stash_filename.
	* machoread.c (macho_add_oso_symfile): Call
	gdb_bfd_stash_filename.
	(macho_symfile_read_all_oso): Arrange to free archive_name.  Call
	gdb_bfd_stash_filename.
	(macho_check_dsym): Don't copy filename.  Call
	gdb_bfd_stash_filename.
	* jit.c (bfd_open_from_target_memory): Don't copy the filename.
	* gdb_bfd.c (gdb_bfd_stash_filename): New function.
	* gdb_bfd.h (gdb_bfd_stash_filename): Declare.
	* gcore.c (create_gcore_bfd): Call gdb_bfd_stash_filename.
	* exec.c (exec_close): Don't free the BFD's filename.
	(exec_file_attach): Don't copy the filename.  Call
	gdb_bfd_stash_filename.
	* corelow.c (core_close): Don't free the BFD's filename.
	(core_open): Call gdb_bfd_stash_filename.
	* corefile.c (reopen_exec_file): Remove #if 0 code.
	* solib.c (solib_bfd_fopen): Call gdb_bfd_stash_filename.  Free
	pathname.
	* dwarf2read.c (try_open_dwo_file): Call gdb_bfd_stash_filename.
2012-07-18 19:34:57 +00:00
Tom Tromey cbb099e886 * dwarf2read.c (try_open_dwo_file): Use gdb_bfd_ref and
gdb_bfd_unref.
	(free_dwo_file): Use gdb_bfd_unref.
	* cli/cli-dump.c: Include gdb_bfd.h.
	(bfd_openw_with_cleanup): Use gdb_bfd_ref.
	(bfd_openr_with_cleanup): Likewise.
	* windows-nat.c (windows_make_so): Use gdb_bfd_ref,
	gdb_bfd_unref.
	* utils.c: Include gdb_bfd.h.
	(do_bfd_close_cleanup): Use gdb_bfd_unref.
	* symfile.c: Include gdb_bfd.h.
	(separate_debug_file_exists): Use gdb_bfd_unref.
	(bfd_open_maybe_remote): Use gdb_bfd_ref.
	(symfile_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref.
	(generic_load): Use gdb_bfd_ref.
	(reread_symbols): Use gdb_bfd_unref.
	* symfile-mem.c: Include gdb_bfd.h.
	(symbol_file_add_from_memory): Use make_cleanup_bfd_close.
	* spu-linux-nat.c (spu_bfd_open): Use gdb_bfd_ref, gdb_bfd_unref.
	* solib.c: Include gdb_bfd.h.
	(solib_bfd_fopen): Use gdb_bfd_ref.
	(solib_bfd_open): Use gdb_bfd_unref.
	(free_so_symbols): Use gdb_bfd_unref.
	(reload_shared_libraries_1): Use gdb_bfd_unref.
	* solib-spu.c: Include gdb_bfd.h.
	(spu_bfd_fopen): Use gdb_bfd_ref, gdb_bfd_unref.
	* solib-pa64.c (pa64_solib_create_inferior_hook): Use gdb_bfd_ref,
	gdb_bfd_unref.
	* solib-frv.c: Include gdb_bfd.h.
	(enable_break2): Use gdb_bfd_unref.
	* solib-dsbt.c: Include gdb_bfd.h.
	(enable_break2): Use gdb_bfd_unref.
	* solib-darwin.c: Include gdb_bfd.h.
	(darwin_solib_get_all_image_info_addr_at_init): Use gdb_bfd_ref,
	gdb_bfd_unref.
	(darwin_bfd_open): Use gdb_bfd_unref.
	* rs6000-nat.c (add_vmap): Use gdb_bfd_ref, gdb_bfd_unref.
	* remote-mips.c: Include gdb_bfd.h.
	(mips_load_srec): Use gdb_bfd_ref.
	(pmon_load_fast): Use gdb_bfd_ref.
	* remote-m32r-sdi.c: Include gdb_bfd.h.
	(m32r_load): Use gdb_bfd_ref.
	* record.c: Include gdb_bfd.h.
	(record_save_cleanups): Use gdb_bfd_unref.
	(cmd_record_save): Use gdb_bfd_unref.
	* procfs.c (insert_dbx_link_bpt_in_file): Use gdb_bfd_ref,
	gdb_bfd_unref.
	* objfiles.h (gdb_bfd_close_or_warn): Remove.
	(gdb_bfd_ref, gdb_bfd_unref): Move to gdb_bfd.h.
	* objfiles.c: Include gdb_bfd.h.
	(free_objfile): Use gdb_bfd_unref.
	(gdb_bfd_close_or_warn, gdb_bfd_ref, gdb_bfd_unref): Move to
	gdb_bfd.c.
	* machoread.c (macho_add_oso_symfile): Use gdb_bfd_unref.
	(macho_symfile_read_all_oso): Use gdb_bfd_ref, gdb_bfd_unref.
	(macho_check_dsym): Likewise.
	* m32r-rom.c: Include gdb_bfd.h.
	(m32r_load): Use gdb_bfd_ref.
	(m32r_upload_command): Use gdb_bfd_ref.
	* jit.c: Include gdb_bfd.h.
	(jit_bfd_try_read_symtab): Use gdb_bfd_ref, gdb_bfd_unref.
	* gdb_bfd.h: New file.
	* gdb_bfd.c: New file.
	* gcore.c: Include gdb_bfd.h.
	(create_gcore_bfd): Use gdb_bfd_ref.
	(do_bfd_delete_cleanup): Use gdb_bfd_unref.
	(gcore_command): Use gdb_bfd_unref.
	* exec.c: Include gdb_bfd.h.
	(exec_close): Use gdb_bfd_unref.
	(exec_close_1): Use gdb_bfd_unref.
	(exec_file_attach): Use gdb_bfd_ref.
	* elfread.c: Include gdb_bfd.h.
	(build_id_verify): Use gdb_bfd_unref.
	* dsrec.c: Include gdb_bfd.h.
	(load_srec): Use gdb_bfd_ref.
	* corelow.c: Include gdb_bfd.h.
	(core_close): Use gdb_bfd_unref.
	(core_open): Use gdb_bfd_ref.
	* bfd-target.c: Include gdb_bfd.h.
	(target_bfd_xclose): Use gdb_bfd_unref.
	(target_bfd_reopen): Use gdb_bfd_ref.
	* Makefile.in (SFILES): Add gdb_bfd.c.
	(HFILES_NO_SRCDIR): Add gdb_bfd.h.
	(COMMON_OBS): Add gdb_bfd.o.
2012-07-18 19:33:34 +00:00
Keith Seitz ed1d1739a1 * breakpoint.c (find_condition_and_thread): Initialize
TASK and REST.
	(create_breakpiont): find_condition_and_thread will now
	initialize COND_STRING, THREAD, and REST (and TASK).
	(addr_string_to_sals): Likewise.
2012-07-18 19:30:20 +00:00
Pedro Alves eab402dfcc 2012-07-18 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event) <TARGET_WAITKIND_NO_HISTORY>:
	Pull the single step breakpoints out of the target.
2012-07-18 18:04:39 +00:00
Sergio Durigan Junior 2b963b6863 2012-07-18 Sergio Durigan Junior <sergiodj@redhat.com>
* probe.c (probe_safe_evaluate_at_pc): Rename variable `n_probes'.
	* stap-probe.c (compile_probe_arg): Likewise.
2012-07-18 16:20:43 +00:00
Sergio Durigan Junior 6bac747387 2012-07-18 Sergio Durigan Junior <sergiodj@redhat.com>
* elfread.c (elf_get_probe_argument_count): Remove `objfile' argument.
	(elf_compile_to_ax): Likewise.
	* infrun.c (insert_exception_resume_from_probe): Likewise.
	(check_exception_resume): Remove `objfile' variable.
	* probe.c (find_probe_by_pc): Remove `objfile' argument.
	(struct probe_and_objfile, probe_and_objfile_s): Delete.
	(collect_probes): Adjust return value to `VEC (probe_p) *'.
	(compare_entries): Rename to...
	(compare_probes): ...this.  Adjust function to work with
	`struct probe *'.  Rename variables `ea' and `eb' to `pa' and `pb'
	respectively.
	(gen_ui_out_table_header_info): Adjust `probes' argument to be
	`VEC (probe_p) *'.
	(print_ui_out_info): Adjust argument to be `struct probe *'.
	(info_probes_for_ops): Adjust internal computations to use
	`VEC (probe_p) *'.
	(probe_safe_evaluate_at_pc): Refactor to not pass `objfile' anymore.
	* probe.h (struct probe_ops) <get_probe_argument_count, compile_to_ax,
	gen_info_probes_table_values>: Remove `objfile' argument.
	(struct probe) <objfile>: New field.
	(find_probe_by_pc): Remove `objfile' argument.
	* stap-probe.c (stap_parse_probe_arguments): Likewise.
	(stap_get_probe_argument_count): Likewise.
	(stap_get_arg): Likewise.
	(stap_evaluate_probe_argument): Likewise.
	(stap_compile_to_ax): Likewise.
	(compile_probe_arg): Refactor not to pass `objfile' anymore.
	(handle_stap_probe): Fill `objfile' field from `struct probe'.
	(stap_gen_info_probes_table_header): Remove `objfile' argument.
	* symfile.h (struct sym_probe_fns) <sym_evaluate_probe_argument,
	sym_compile_to_ax>: Likewise.
2012-07-18 16:12:17 +00:00
xuepeng guo 3347eb1acf 2012-07-18 Terry Guo <terry.guo@arm.com>
PR 14329
        * defs.h (GDB_MI_MSG_WIDTH): New.
        * ser_base (ser_base_read_error_fd): New function.
        (do_ser_base_readchar): Poll error file descriptor as well as
        standard output.
        (generic_readchar): Refactor error handling.
2012-07-18 04:36:24 +00:00
Joel Brobecker 80c8d3230e Update the NEWS file following the creation of the GDB 7.5 branch.
gdb/ChangeLog:

        * NEWS: Create a new section for the next release branch.
        Rename the section of the current branch, now that it has
        been cut.
2012-07-18 04:02:10 +00:00
gdbadmin b45a0664cc Record GDB 7.5 branch creation. Bump version number 2012-07-18 03:39:03 +00:00
Keith Seitz 09cf2b22ac * linespec.c (linespec_parse_line_offset): Make parameter
const.
2012-07-18 03:35:29 +00:00
gdbadmin a4e0a7a91d *** empty log message *** 2012-07-18 00:00:32 +00:00
gdbadmin b50c2f6922 *** empty log message *** 2012-07-17 00:00:02 +00:00
Jan Kratochvil 263a0f8c38 gdb/testsuite/
* gdb.base/store.exp (check_set): Import gdb_prompt.
	(continue to wack_${t}): Make it to conditional gdb_test_multiple.
	(${prefix}; next ${t}): Hide its name, handle it conditionally now.
2012-07-16 19:17:54 +00:00
Jan Kratochvil 8f04399994 gdb/
PR 11914
	* f-valprint.c (info_common_command): New variable frame_id.
	Reinitialize FI form FRAME_ID after each print_variable_and_value.
	* printcmd.c (print_variable_and_value): Extend function comment.
	Add comment for invalidated FRAME.
	* stack.c (backtrace_command_1): New variable frame_id.  Reinitialize
	FI form FRAME_ID after each print_frame_local_vars.
	(struct print_variable_and_value_data): Change frame to frame_id.
	(do_print_variable_and_value): New variable frame, initialize it from
	p->frame_id.  Add comment for invalidated FRAME.
	(print_frame_local_vars, print_frame_arg_vars): New function comment.
	Update CB_DATA.FRAME to CB_DATA.FRAME_ID initialization.  Add comment
	for invalidated FRAME.

gdb/testsuite/
	PR 11914
	* gdb.python/py-prettyprint.c (eval_func, eval_sub): New.
	(main): Call eval_sub.
	* gdb.python/py-prettyprint.exp:
	(python execfile ('py-prettyprint.py')): Move it earlier.
	New breakpoint for eval-break.
	(continue to breakpoint: eval-break, info locals): New test.
	(python execfile ('py-prettyprint.py')): Move it from here.
	* gdb.python/py-prettyprint.py (class pp_eval_type): New.
	(register_pretty_printers): Register pp_eval_type.
2012-07-16 19:15:39 +00:00
Marc Khouzam ae5e0686ee 2012-07-16 Marc Khouzam <marc.khouzam@ericsson.com>
Pedro Alves  <palves@redhat.com>

	* linux-nat.c (linux_nat_detach): Don't unregister from the event
	loop.
2012-07-16 19:07:16 +00:00
Tom Tromey 5049c5be7e * jv-typeprint.c (c_type_print_varspec_suffix): Don't declare. 2012-07-16 17:51:48 +00:00
Doug Evans 094b34ac0b * dwarf2read.c (stmt_list_hash): New struct.
(type_unit_group): Embed "per_cu" member, remove pointer.
	New union member "t", move member "tus" into it, all uses updated.
	New member "hash", replaces member "line_offset, all uses updated.
	(quick_file_names): Replace member "offset" with "hash", all uses
	updated.
	(hash_stmt_list_entry, eq_stmt_list_entry): New functions.
	(hash_file_name_entry, eq_file_name_entry): Call them.
	(hash_type_unit_group, eq_type_unit_group): Ditto.
	(dw2_get_cu, dw2_get_primary_cu): Replace assert with a better one.
	(dw2_get_file_names_reader): Fix file name table calculation for TUs.
	(dw2_get_file_names): Update.
	(create_type_unit_group): Replace "per_cu" arg with "cu".
	All callers updated.  Fix "quick" (.gdb_index) handling.
	(get_type_unit_group): Replace "per_cu" arg with "cu".
	All callers updated.
	(build_type_unit_groups): Don't reset tu_stats.
2012-07-16 03:22:40 +00:00
Doug Evans 2908cac625 * symtab.c (filename_seen_cache): Delete members "tab_alloc_size",
"tab_cur_size".  Change member "tab" to be a htab_t.
	(create_filename_seen_cache): Update.
	(clear_filename_seen_cache, delete_filename_seen_cache): Update.
	(filename_seen): Update.
2012-07-16 03:07:01 +00:00
gdbadmin e51dc8bc2a *** empty log message *** 2012-07-16 00:00:32 +00:00
Jan Kratochvil 725c7b66aa gdb/testsuite/
Fix a testcase regression by me.
	* gdb.dwarf2/fission-reread.S: Fix two DW_FORM_data8 to be
	DW_FORM_data4.
2012-07-15 08:34:55 +00:00
gdbadmin c586337c73 *** empty log message *** 2012-07-15 00:00:33 +00:00
gdbadmin ae671a7ca2 *** empty log message *** 2012-07-14 00:00:32 +00:00
Doug Evans a2b6eff5c4 * symtab.c (filename_seen): Update comment. 2012-07-13 21:50:27 +00:00
Jan Kratochvil 4359dff1c5 gdb/
* buildsym.c (end_symtab_1): Split it to ...
	(end_symtab_get_static_block): ... this ...
	(end_symtab_from_static_block): ... and this function.
	(end_symtab, end_expandable_symtab): Call them.
	* buildsym.h (end_symtab_get_static_block)
	(end_symtab_from_static_block): New declarations.
	* dwarf2read.c (process_full_comp_unit): New variable static_block.
	Set its valid CU ranges.

gdb/testsuite/
	* gdb.dwarf2/dw2-minsym-in-cu.S: New file.
	* gdb.dwarf2/dw2-minsym-in-cu.exp: New file.
2012-07-13 20:26:11 +00:00
Jan Kratochvil a24f71abb4 gdb/
* dwarf2loc.c (disassemble_dwarf_expression): Handle
	DW_OP_GNU_parameter_ref.
2012-07-13 20:15:50 +00:00
Jan Kratochvil d76b7dbc5f gdb/
* dwarf2read.c (read_call_site_scope): Do not gdb_assert for invalid
	read-in CALL_SITE_PARAMETER_PARAM_OFFSET.
2012-07-13 20:15:03 +00:00
Doug Evans 9fdc877be2 * symtab.c (output_source_filename): Delete unnecessary forward decl.
(filename_seen_cache): New struct.
	(INITIAL_FILENAME_SEEN_CACHE_SIZE): New macro.
	(create_filename_seen_cache): New function.
	(clear_filename_seen_cache, delete_filename_seen_cache): New functions.
	(filename_seen): Delete arg "first".  New arg "cache".  All callers
	updated.
	(output_source_filename_data): New struct.
	(output_source_filename): Delete arg "first".  New arg "data".
	All callers updated.
	(sources_info): Delete local "first".  New locals "data", "cleanups".
	Rewrite to use filename_seen_cache.
	(add_partial_filename_data): Delete member "first".  New member
	"filename_seen_cache".  All uses updated.
	(make_source_files_completion_list): Rewrite to use
	filename_seen_cache.
2012-07-13 18:41:21 +00:00
Jan Kratochvil 61e44cfa26 gdb/testsuite/
Fix gdbserver run regression.
	* gdb.trace/disconnected-tracing.exp (executabel): Fix typo.
2012-07-13 08:14:37 +00:00
gdbadmin eef0a02ad9 *** empty log message *** 2012-07-13 00:00:03 +00:00
Doug Evans f80c6f3fc1 * psymtab.c (map_symbol_filenames_psymtab): Skip shared psymtabs. 2012-07-12 21:16:09 +00:00
Tom Tromey 93c0ef3768 * lib/gdb.exp (standard_testfile): Don't declare objdir.
(clean_restart): Likewise.
	(core_find): Use standard_output_file.
2012-07-12 16:39:42 +00:00
Tom Tromey 76027ef599 * gdb.dwarf2/dup-psym.exp: Use prepare_for_testing_full.
* gdb.dwarf2/dw2-anonymous-func.exp: Use
	prepare_for_testing_full.
	* gdb.dwarf2/dw2-basic.exp: Use prepare_for_testing_full.
	* gdb.dwarf2/dw2-compressed.exp: Use prepare_for_testing_full.
	* gdb.dwarf2/dw2-const.exp: Use prepare_for_testing_full.
	* gdb.dwarf2/dw2-cu-size.exp: Use prepare_for_testing_full.
	* gdb.dwarf2/dw2-intercu.exp: Use prepare_for_testing_full.
	* gdb.dwarf2/dw2-intermix.exp: Use prepare_for_testing_full.
	* gdb.dwarf2/dw2-linkage-name-trust.exp: Use
	prepare_for_testing_full.
	* gdb.dwarf2/dw2-producer.exp: Use prepare_for_testing_full.
	* gdb.dwarf2/dw2-ref-missing-frame.exp: Use
	prepare_for_testing_full.
	* gdb.dwarf2/dw2-restore.exp: Use prepare_for_testing_full.
	* gdb.dwarf2/dw2-strp.exp: Use prepare_for_testing_full.
	* gdb.dwarf2/mac-fileno.exp: Use prepare_for_testing_full.
2012-07-12 15:15:07 +00:00
Tom Tromey 85b4440aee * lib/gdb.exp (build_executable_from_specs): New proc, from
build_executable.
	(build_executable): Use it.
	(prepare_for_testing_full): New proc.
2012-07-12 15:09:41 +00:00
Eli Zaretskii 055855a460 Separate the indices in gdbint.texinfo into 2 nodes, to avoid file-name clashes.
* gdbint.texinfo: Remove @syncodeindex directives that put all the
    indices into a single node "Index".  Instead, join function and
    variable indices into a single index, separate from the concept
    index.  Requested in
    http://sourceware.org/ml/gdb-patches/2012-07/msg00146.html.
    (Top): Update the top-level menu: instead of one "Index" there are
    now separate entries "Concept Index" and "Function and Variable
    Index".
    (Concept Index, Function and Variable Index): New nodes.
    (Index): Node deleted.
2012-07-12 07:56:50 +00:00
gdbadmin 6dc7426212 *** empty log message *** 2012-07-12 00:00:03 +00:00
Tom Tromey 55baab269c * gdb.reverse/break-precsave.exp: Use standard_output_file.
* gdb.reverse/consecutive-precsave.exp: Use standard_output_file.
	* gdb.reverse/finish-precsave.exp: Use standard_output_file.
	* gdb.reverse/i386-precsave.exp: Use standard_output_file.
	* gdb.reverse/machinestate-precsave.exp: Use standard_output_file.
	* gdb.reverse/sigall-precsave.exp: Use standard_output_file.
	* gdb.reverse/solib-precsave.exp: Use standard_output_file.
	* gdb.reverse/step-precsave.exp: Use standard_output_file.
	* gdb.reverse/until-precsave.exp: Use standard_output_file.
	* gdb.reverse/watch-precsave.exp: Use standard_output_file.
2012-07-11 15:21:36 +00:00
gdbadmin 3db4782ac8 *** empty log message *** 2012-07-11 00:00:33 +00:00
Doug Evans f4dc4d17b0 PR gdb/13498
* dwarf2read.c (dwarf2_per_objfile): New members n_type_unit_groups,
	all_type_unit_groups, type_unit_groups, tu_stats.
	(dwarf2_per_cu_data): Move "imported_symtabs" into new union "s".
	All uses updated.  Add type_unit_group to union "s".
	(type_unit_group): New struct.
	(IS_TYPE_UNIT_GROUP): New macro.
	(abbrev_table): Delete unused member "section".
	(dw2_do_instantiate_symtab): Early exit if type_unit_group.
	(dw2_get_cu): Assert not used with type_unit_group.
	(dw2_get_primary_cu): New function.
	(dw2_build_type_unit_groups_reader): New function.
	(dw2_build_type_unit_groups): New function.
	(dw2_get_file_names): Assert not called on type units.
	(dw2_map_symtabs_matching_filename): Call dw2_build_type_unit_groups.
	Redo loop to iterate over type unit groups instead of type units.
	(dw2_expand_symtabs_matching, dw2_map_symbol_filenames): Ditto.
	(read_abbrev_offset): New function.
	(init_cutu_and_read_dies): New arg "abbrev_table".  All callers
	updated.
	(create_partial_symtab): New function.
	(process_psymtab_comp_unit_reader): Assert not used with type units.
	Call create_partial_symtab.
	(process_psymtab_type_unit): Delete.
	(hash_type_unit_group, eq_type_unit_group): New functions.
	(allocate_type_unit_groups_table): New function.
	(NO_STMT_LIST_TYPE_UNIT_PSYMTAB): New macro.
	(NO_STMT_LIST_TYPE_UNIT_PSYMTAB_SIZE): New macro.
	(create_type_unit_group, get_type_unit_group): New functions.
	(tu_abbrev_offset): New struct.
	(sort_tu_by_abbrev_offset): New function.
	(add_type_unit_group_to_table): New function.
	(build_type_unit_groups): New function.
	(build_type_psymtabs_reader): New function.
	(build_type_psymtab_dependencies): New function.
	(build_type_psymtabs): Rewrite.
	(scan_partial_symbols): Flag an error if a DW_TAG_imported_unit
	is seen in a type unit.
	(process_queue): Move symtab expansion debugging printfs here.
	Call process_full_type_unit for type units.
	(compute_symtab_includes): Assert not called for type units.
	(process_cu_includes): Don't call compute_symtab_includes for
	type units.
	(process_full_type_unit): New function.
	(process_imported_unit_die): Flag an error if called for type units.
	(handle_DW_AT_stmt_list): Delete arg "want_line_info".  All callers
	updated.  Assert not called for type units.
	(read_file_scope): Call dwarf2_start_symtab.
	(setup_type_unit_groups): New function.
	(read_type_unit_scope): Rewrite.
	(abbrev_table_read_table): Initialize abbrev_table->offset.
	(abbrev_table_free_cleanup): New function.
	(dwarf2_start_symtab): New function.
	(load_full_type_unit): Assert not called for type unit groups.
2012-07-10 20:28:32 +00:00
Doug Evans 6d30eef8d4 * buildsym.c (finish_block_internal): New arg "expandable".
All callers updated.
	(start_symtab): Move most contents to ...
	(restart_symtab): ... here.  New function.
	(reset_symtab_globals): New function.
	(end_symtab_1): Renamed from end_symtab.  New arg "expandable".
	Call reset_symtab_globals.
	(end_symtab, end_expandable_symtab): New functions.
	(set_missing_symtab, augment_type_symtab): New functions.
	* buildsym.h (end_expandable_symtab): Declare.
	(augment_type_symtab, restart_symtab): Declare.
2012-07-10 20:20:15 +00:00
Doug Evans b4c41fc7e2 * psympriv.h (struct partial_symtab): New member "anonymous".
* psymtab.c (partial_map_symtabs_matching_filename): Ignore
	anonymous psymtabs.
	(read_psymtabs_with_filename): Ditto.
	(map_symbol_filenames_psymtab, psymtab_to_fullname): Ditto.
	(expand_symtabs_matching_via_partial): Ditto.
	(dump_psymtab): Update.
2012-07-10 20:17:30 +00:00
Doug Evans 0bfa869d53 * dictionary.c (dict_add_pending): New function.
* dictionary.h (dict_add_pending): Declare.
2012-07-10 20:12:49 +00:00
Tom Tromey 298a9cf0ef * gdb.mi/dw2-ref-missing-frame.exp: Use standard_testfile,
standard_output_file.
	* gdb.mi/gdb2549.exp: Use standard_testfile.
	* gdb.mi/gdb669.exp: Use standard_testfile.
	* gdb.mi/gdb701.exp: Use standard_testfile.
	* gdb.mi/gdb792.exp: Use standard_testfile.
	* gdb.mi/mi-async.exp: Use standard_testfile.
	* gdb.mi/mi-basics.exp: Use standard_testfile.
	* gdb.mi/mi-break.exp: Use standard_testfile.
	* gdb.mi/mi-cli.exp: Use standard_testfile.
	* gdb.mi/mi-console.exp: Use standard_testfile.
	* gdb.mi/mi-disassemble.exp: Use standard_testfile.
	* gdb.mi/mi-eval.exp: Use standard_testfile.
	* gdb.mi/mi-file-transfer.exp: Use standard_testfile.
	* gdb.mi/mi-file.exp: Use standard_testfile.
	* gdb.mi/mi-inheritance-syntax-error.exp: Use standard_testfile.
	* gdb.mi/mi-logging.exp: Use standard_testfile.
	* gdb.mi/mi-nonstop-exit.exp: Use standard_testfile.
	* gdb.mi/mi-nonstop.exp: Use standard_testfile.
	* gdb.mi/mi-ns-stale-regcache.exp: Use standard_testfile.
	* gdb.mi/mi-nsintrall.exp: Use standard_testfile.
	* gdb.mi/mi-nsmoribund.exp: Use standard_testfile.
	* gdb.mi/mi-nsthrexec.exp: Use standard_testfile.
	* gdb.mi/mi-pending.exp: Use standard_testfile,
	standard_output_file.
	* gdb.mi/mi-pthreads.exp: Use standard_testfile.
	* gdb.mi/mi-read-memory.exp: Use standard_testfile.
	* gdb.mi/mi-regs.exp: Use standard_testfile.
	* gdb.mi/mi-return.exp: Use standard_testfile.
	* gdb.mi/mi-reverse.exp: Use standard_testfile.
	* gdb.mi/mi-simplerun.exp: Use standard_testfile.
	* gdb.mi/mi-solib.exp: Use standard_testfile,
	standard_output_file.
	* gdb.mi/mi-stack.exp: Use standard_testfile.
	* gdb.mi/mi-stepi.exp: Use standard_testfile.
	* gdb.mi/mi-stepn.exp: Use standard_testfile.
	* gdb.mi/mi-syn-frame.exp: Use standard_testfile.
	* gdb.mi/mi-until.exp: Use standard_testfile.
	* gdb.mi/mi-var-block.exp: Use standard_testfile.
	* gdb.mi/mi-var-child-f.exp: Use standard_testfile.
	* gdb.mi/mi-var-child.exp: Use standard_testfile.
	* gdb.mi/mi-var-cmd.exp: Use standard_testfile.
	* gdb.mi/mi-var-cp.exp: Use standard_testfile.
	* gdb.mi/mi-var-display.exp: Use standard_testfile.
	* gdb.mi/mi-var-invalidate.exp: Use standard_testfile,
	standard_output_file.
	* gdb.mi/mi-var-rtti.exp: Use standard_testfile.
	* gdb.mi/mi-watch-nonstop.exp: Use standard_testfile.
	* gdb.mi/mi-watch.exp: Use standard_testfile.
	* gdb.mi/mi2-amd64-entry-value.exp: Use standard_testfile.
	* gdb.mi/mi2-basics.exp: Use standard_testfile.
	* gdb.mi/mi2-break.exp: Use standard_testfile.
	* gdb.mi/mi2-cli.exp: Use standard_testfile.
	* gdb.mi/mi2-console.exp: Use standard_testfile.
	* gdb.mi/mi2-disassemble.exp: Use standard_testfile.
	* gdb.mi/mi2-eval.exp: Use standard_testfile.
	* gdb.mi/mi2-file.exp: Use standard_testfile.
	* gdb.mi/mi2-pthreads.exp: Use standard_testfile.
	* gdb.mi/mi2-read-memory.exp: Use standard_testfile.
	* gdb.mi/mi2-regs.exp: Use standard_testfile.
	* gdb.mi/mi2-return.exp: Use standard_testfile.
	* gdb.mi/mi2-simplerun.exp: Use standard_testfile.
	* gdb.mi/mi2-stack.exp: Use standard_testfile.
	* gdb.mi/mi2-stepi.exp: Use standard_testfile.
	* gdb.mi/mi2-syn-frame.exp: Use standard_testfile.
	* gdb.mi/mi2-until.exp: Use standard_testfile.
	* gdb.mi/mi2-var-block.exp: Use standard_testfile.
	* gdb.mi/mi2-var-child.exp: Use standard_testfile.
	* gdb.mi/mi2-var-cmd.exp: Use standard_testfile.
	* gdb.mi/mi2-var-display.exp: Use standard_testfile.
	* gdb.mi/mi2-watch.exp: Use standard_testfile.
2012-07-10 15:32:52 +00:00
Tom Tromey f5f3a911ec * gdb.cp/abstract-origin.exp: Use standard_testfile.
* gdb.cp/ambiguous.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/annota2.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/annota3.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/anon-ns.exp: Use standard_testfile.
	* gdb.cp/anon-struct.exp: Use standard_testfile.
	* gdb.cp/anon-union.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/arg-reference.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/bool.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/breakpoint.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/bs15503.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/call-c.exp: Use standard_testfile, clean_restart,
	standard_output_file.
	* gdb.cp/casts.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/class2.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/classes.exp: Use standard_testfile, prepare_for_testing.
	(test_static_members): Update.
	* gdb.cp/cmpd-minsyms.exp: Use standard_testfile.
	* gdb.cp/converts.exp: Use standard_testfile.
	* gdb.cp/cp-relocate.exp: Use standard_testfile.
	* gdb.cp/cpcompletion.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/cpexprs.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/cplabel.exp: Use standard_testfile.
	* gdb.cp/cplusfuncs.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/ctti.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/derivation.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/destrprint.exp: Use standard_testfile.
	* gdb.cp/dispcxx.exp: Use standard_testfile.
	* gdb.cp/exception.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/expand-psymtabs-cxx.exp: Use standard_testfile.
	* gdb.cp/extern-c.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/formatted-ref.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/fpointer.exp: Use standard_testfile.
	* gdb.cp/gdb1355.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/gdb2384.exp: Use standard_testfile, clean_restart,
	standard_output_file.
	* gdb.cp/gdb2495.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/hang.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/infcall-dlopen.exp: Use standard_testfile,
	standard_output_file.
	* gdb.cp/inherit.exp: Use standard_testfile, prepare_for_testing.
	(do_tests): Update.
	* gdb.cp/koenig.exp: Use standard_testfile.
	* gdb.cp/local.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/m-data.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/m-static.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/mb-ctor.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/mb-inline.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/mb-templates.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/member-ptr.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/meth-typedefs.exp: Use standard_testfile.
	* gdb.cp/method.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/method2.exp: Use standard_testfile.
	* gdb.cp/minsym-fallback.exp: Use standard_testfile,
	standard_output_file.
	* gdb.cp/misc.exp: Use standard_testfile, prepare_for_testing.
	(do_tests): Update.
	* gdb.cp/namespace-enum.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/namespace-nested-import.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/namespace.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/nextoverthrow.exp: Use standard_testfile.
	* gdb.cp/no-dmgl-verbose.exp: Use standard_testfile.
	* gdb.cp/nsdecl.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/nsimport.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/nsnested.exp: Use standard_testfile.
	* gdb.cp/nsnoimports.exp: Use standard_testfile.
	* gdb.cp/nsrecurs.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/nsstress.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/nsusing.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/operator.exp: Use standard_testfile.
	* gdb.cp/oranking.exp: Use standard_testfile.
	* gdb.cp/overload-const.exp: Use standard_testfile.
	* gdb.cp/overload.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/ovldbreak.exp: Use standard_testfile.
	* gdb.cp/ovsrch.exp: Use standard_testfile.
	* gdb.cp/paren-type.exp: Use standard_testfile.
	* gdb.cp/pass-by-ref.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/pr-1023.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/pr-1210.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/pr-574.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/pr10687.exp: Use standard_testfile, clean_restart.
	* gdb.cp/pr10728.exp: Use standard_testfile,
	standard_output_file.
	* gdb.cp/pr12028.exp: Use standard_testfile.
	* gdb.cp/pr9067.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/pr9167.exp: Use standard_testfile.
	* gdb.cp/pr9631.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/printmethod.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/psmang.exp: Use standard_testfile, clean_restart.
	* gdb.cp/psymtab-parameter.exp: Use standard_testfile.
	* gdb.cp/ptype-cv-cp.exp: Use standard_testfile.
	* gdb.cp/re-set-overloaded.exp: Use standard_testfile,
	standard_output_file.
	* gdb.cp/readnow-language.exp: Use standard_testfile.
	* gdb.cp/ref-params.exp: Use standard_testfile, build_executable.
	(gdb_start_again): Use clean_restart.
	* gdb.cp/ref-types.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/rtti.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/shadow.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/smartp.exp: Use standard_testfile.
	* gdb.cp/static-method.exp: Use standard_testfile.
	* gdb.cp/static-print-quit.exp: Use standard_testfile.
	* gdb.cp/temargs.exp: Use standard_testfile.
	* gdb.cp/templates.exp: Use standard_testfile,
	prepare_for_testing.
	(do_tests): Update.
	* gdb.cp/try_catch.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/typedef-operator.exp: Use standard_testfile.
	* gdb.cp/userdef.exp: Use standard_testfile, prepare_for_testing.
	* gdb.cp/virtbase.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.cp/virtfunc.exp: Use standard_testfile,
	prepare_for_testing.
	(do_tests): Update.
	* gdb.cp/virtfunc2.exp: Use standard_testfile,
	prepare_for_testing.
2012-07-10 15:18:18 +00:00
Tom Tromey 686f09d021 * lib/gdb.exp (standard_testfile): Unset output variables from
earlier invocations.
2012-07-10 14:41:16 +00:00
Doug Evans b74db4368d * buildsym.c (start_subfile): Remove unnecessary check for
name == NULL.
2012-07-10 03:49:25 +00:00
Doug Evans fd55216c81 * psymtab.c (allocate_psymtab): Use host_address_to_string. 2012-07-10 01:10:25 +00:00
Doug Evans 6721b2ec99 * dwarf2read.c (load_full_type_unit): Simplify. 2012-07-10 01:05:06 +00:00
gdbadmin cf69f73f0f *** empty log message *** 2012-07-10 00:00:33 +00:00
Doug Evans b4dd56334d * dwarf2read.c (dwarf2_per_objfile): Change type of all_type_units
to struct signatured_type **.  All uses updated.
2012-07-09 20:27:53 +00:00
Yao Qi 9357e02197 gdb/testsuite:
* gdb.mi/gdb2549.exp: Remove -DFAKEARGV from compilation flags.
	* gdb.mi/mi-async.exp, gdb.mi/mi-basics.exp: Likewise.
	* gdb.mi/mi-break.exp, gdb.mi/mi-cli.exp: Likewise.
	* gdb.mi/mi-console.exp, gdb.mi/mi-disassemble.exp: Likewise.
	* gdb.mi/mi-eval.exp, gdb.mi/mi-file.exp: Likewise.
	* gdb.mi/mi-read-memory.exp, gdb.mi/mi-regs.exp: Likewise.
	* gdb.mi/mi-return.exp, gdb.mi/mi-reverse.exp: Likewise.
	* gdb.mi/mi-simplerun.exp, gdb.mi/mi-stack.exp: Likewise.
	* gdb.mi/mi-stepi.exp, gdb.mi/mi-syn-frame.exp: Likewise.
	* gdb.mi/mi-until.exp, gdb.mi/mi-var-block.exp: Likewise.
	* gdb.mi/mi-var-child.exp, gdb.mi/mi-var-cmd.exp: Likewise.
	* gdb.mi/mi-var-display.exp: Likewise.
	* gdb.mi/mi-var-invalidate.exp: Likewise.
	* gdb.mi/mi-watch.exp, gdb.mi/mi2-basics.exp: Likewise.
	* gdb.mi/mi2-break.exp, gdb.mi/mi2-cli.exp: Likewise.
	* gdb.mi/mi2-console.exp: Likewise.
	* gdb.mi/mi2-disassemble.exp: Likewise.
	* gdb.mi/mi2-eval.exp, gdb.mi/mi2-file.exp: Likewise.
	* gdb.mi/mi2-read-memory.exp: Likewise.
	* gdb.mi/mi2-regs.exp, gdb.mi/mi2-return.exp: Likewise.
	* gdb.mi/mi2-simplerun.exp: Likewise.
	* gdb.mi/mi2-stack.exp, gdb.mi/mi2-stepi.exp: Likewise.
	* gdb.mi/mi2-syn-frame.exp: Likewise.
	* gdb.mi/mi2-until.exp, gdb.mi/mi2-var-block.exp: Likewise.
	* gdb.mi/mi2-var-child.exp, gdb.mi/mi2-var-cmd.exp: Likewise.
	* gdb.mi/mi2-var-display.exp, gdb.mi/mi2-watch.exp: Likewise.
2012-07-09 18:28:17 +00:00
Doug Evans 45e58e77b7 * dwarf2read.c (dwarf2_attr_no_follow): Delete unused arg "cu".
All callers updated.
2012-07-09 18:21:31 +00:00
Tom Tromey e314d62968 * c-exp.y (check_parameter_typelist): New function.
(parameter_typelist): Call it.
	* eval.c (make_params): Handle '(void)' case.
	* gdbtypes.c (lookup_function_type_with_arguments): Handle
	'(void)' case.
testsuite
	* gdb.base/whatis.exp: Add error checks for improper 'void' uses.
	* gdb.base/callfuncs.exp: Add cast-based test.
	* gdb.base/callfuncs.c (voidfunc): New function.
2012-07-09 14:20:52 +00:00
gdbadmin a7d5c8c4fc *** empty log message *** 2012-07-09 00:00:02 +00:00
Doug Evans 06928b3f65 * gdb.dwarf2/dw4-sig-type-unused.S: Fix typo. 2012-07-08 22:34:59 +00:00
gdbadmin 5413e7225e *** empty log message *** 2012-07-08 00:00:36 +00:00
Jan Kratochvil aa7c744796 gdb/
* common/linux-ptrace.c: Include gdb_assert.h.
	<__i386__> (linux_ptrace_test_ret_to_nx_instr): New declaration.
	<__i386__>: Include sys/reg.h, sys/mman.h, signal.h, sys/wait.h and
	stdint.h.
	(linux_ptrace_test_ret_to_nx, linux_ptrace_init_warnings): New
	functions.
	* common/linux-ptrace.h (linux_ptrace_init_warnings): New declarations.
	* linux-nat.c (linux_child_post_attach)
	(linux_child_post_startup_inferior): Call linux_ptrace_init_warnings.

gdb/gdbserver/
	* gdbserver/linux-low.c (initialize_low): Call
	linux_ptrace_init_warnings.
2012-07-07 12:13:57 +00:00
Jan Kratochvil 889003ed52 gdb/
* linux-thread-db.c (thread_db_find_new_threads_silently): Do not apply
	nptl <2.7 bug workaround for core files.
2012-07-07 12:11:31 +00:00
Jan Kratochvil 32f11bad17 gdb/testsuite/
Fix XFAIL compatibility with old i386 systems.
	* gdb.base/stale-infcall.exp (test system longjmp tracking support):
	Check also 'Cannot insert breakpoint 0'.
2012-07-07 12:10:14 +00:00
gdbadmin 1ab7426b52 *** empty log message *** 2012-07-07 00:00:03 +00:00
Jan Kratochvil da559b09fd gdb/
* linux-nat.c (resume_lwp, linux_nat_resume): Remove LP->SIGINFO
	clearing.
	(save_siginfo): Remove.
	(stop_wait_callback, linux_nat_filter_event): Remove the save_siginfo
	call.
	(resume_stopped_resumed_lwps): Remove LP->SIGINFO clearing.
	(linux_nat_get_siginfo): Use PTRACE_GETSIGINFO.
	* linux-nat.h (struct lwp_info): Remove field siginfo.
2012-07-06 16:52:20 +00:00
Jan Kratochvil f865ee35b7 gdb/
Code cleanup for the next patch.
	* arm-linux-nat.c (arm_linux_stopped_data_address): Change variable
	siginfo_p to siginfo, update its users incl. the linux_nat_get_siginfo
	call for it.
	* ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise.
	(ia64_linux_stopped_data_address):
	* linux-nat.c (linux_nat_get_siginfo): Add parameter siginfo, change
	the return value.
	* linux-nat.h (linux_nat_get_siginfo): Likewise.
	* ppc-linux-nat.c (ppc_linux_stopped_data_address): Change variable
	siginfo_p to siginfo, update its users incl. the linux_nat_get_siginfo
	call for it.
2012-07-06 16:49:43 +00:00
Jan Kratochvil 76b83c514f gdb/
PR 14321
	* findcmd.c (parse_find_args): New variable pattern_buf_size_need.
	Increase buffer sizes to 2x we need, not just 2x of the previous size.

gdb/testsuite/
	PR 14321
	* gdb.base/find.exp
	(find int64_search_buf, +64/8*100, int64_search_buf): New test.
2012-07-06 15:51:40 +00:00
Tom Tromey a6fb9c08a9 * c-exp.y (DOTDOTDOT): New token.
(func_mod, exp): Use parameter_typelist.
	(parameter_typelist): New production.
	(tokentab3): Add "..." token.
	* eval.c (make_params): Handle varargs.
	* gdbtypes.c (lookup_function_type_with_arguments): Handle
	varargs.
testsuite
	* gdb.base/whatis.exp: Add test.
2012-07-06 14:48:48 +00:00
Tom Tromey 71918a863f PR exp/9608:
* c-exp.y (%union) <tvec>: Change type.
	(func_mod): Now uses <tvec> type.
	(exp): Update for tvec change.
	(direct_abs_decl): Push the typelist.
	(func_mod): Return a typelist.
	(nonempty_typelist): Update for tvec change.
	* gdbtypes.c (lookup_function_type_with_arguments): New function.
	* gdbtypes.h (lookup_function_type_with_arguments): Declare.
	* parse.c (pop_type_list): New function.
	(push_typelist): New function.
	(follow_types): Handle tp_function_with_arguments.
	* parser-defs.h (type_ptr): New typedef.  Define a VEC.
	(enum type_pieces) <tp_function_with_arguments>: New constant.
	(union type_stack_elt) <typelist_val>: New field.
	(push_typelist): Declare.
testsuite
	* gdb.base/whatis.exp: Add regression test.
2012-07-06 14:47:00 +00:00
Tom Tromey fcde5961eb * c-exp.y (%union) <type_stack>: New field.
(abs_decl, direct_abs_decl): Use <type_stack> type.  Update.
	(ptr_operator_ts): New production.
	(ptype): Update.
	* parse.c (type_stack_reserve): New function.
	(check_type_stack_depth): Use it.
	(pop_type_stack, append_type_stack, push_type_stack)
	(get_type_stack, type_stack_cleanup): New functions.
	(follow_types): Handle tp_type_stack.
	(_initialize_parse): Simplify initialization.
	* parser-defs.h (enum type_pieces) <tp_type_stack>: New
	constant.
	(union type_stack_elt) <stack_val>: New field.
	(get_type_stack, append_type_stack, push_type_stack)
	(type_stack_cleanup): Declare.
testsuite
	* gdb.base/whatis.exp: Add tests.
2012-07-06 14:44:22 +00:00