Commit Graph

30583 Commits

Author SHA1 Message Date
Siva Chandra Reddy 56af09aac9 2012-05-02 Siva Chandra Reddy <sivachandra@google.com>
* doc/gdb.texinfo (Blocks In Python): Add a note saying that
	future improvements to GDB and its infrastructure can move
	symbols across blocks within a symbol table.
2012-05-02 17:27:50 +00:00
Eli Zaretskii b31b86a798 gdb_curses.h: Undefine KEY_EVENT before including curses
headers.  Move "#undef MOUSE_MOVED" before any curses header
 inclusion.
2012-05-02 17:13:39 +00:00
Sergio Durigan Junior 777532fcfb 2012-05-02 Sergio Durigan Junior <sergiodj@gmail.com>
* features/i386/i386-mmx-linux.c: Regenerate.
	* features/rs6000/powerpc-32.c: Likewise.
	* features/rs6000/powerpc-32l.c: Likewise.
	* features/rs6000/powerpc-403.c: Likewise.
	* features/rs6000/powerpc-403gc.c: Likewise.
	* features/rs6000/powerpc-405.c: Likewise.
	* features/rs6000/powerpc-505.c: Likewise.
	* features/rs6000/powerpc-601.c: Likewise.
	* features/rs6000/powerpc-602.c: Likewise.
	* features/rs6000/powerpc-603.c: Likewise.
	* features/rs6000/powerpc-604.c: Likewise.
	* features/rs6000/powerpc-64.c: Likewise.
	* features/rs6000/powerpc-64l.c: Likewise.
	* features/rs6000/powerpc-750.c: Likewise.
	* features/rs6000/powerpc-860.c: Likewise.
	* features/rs6000/powerpc-e500.c: Likewise.
	* features/rs6000/powerpc-e500l.c: Likewise.
	* features/rs6000/powerpc-isa205-32l.c: Likewise.
	* features/rs6000/powerpc-isa205-64l.c: Likewise.
	* features/rs6000/rs6000.c: Likewise.
2012-05-02 04:59:34 +00:00
Sergio Durigan Junior d71871bcbc 2012-05-02 Sergio Durigan Junior <sergiodj@gmail.com>
* i386-tdep.c (i386_stap_parse_special_token) <s>: Remove unused
	variable.
	* stap-probe.c (stap_parse_single_operand) <reg_suffix,
	reg_ind_suffix, reg_suffix_len, reg_ind_suffix_len>: Likewise.
	(stap_parse_argument) <e>: Likewise.
	(handle_stap_probe) <byte_order>: Likewise.
2012-05-02 04:40:25 +00:00
gdbadmin d61a2b6f2a *** empty log message *** 2012-05-02 00:00:33 +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 ec3f619d0a Fix bug in date in previous entry. 2012-05-01 02:55:33 +00:00
gdbadmin fb46ef56ba *** empty log message *** 2012-05-01 00:00:33 +00:00
Sterling Augustine be36f02d8a 2012-04-26 Sterling Augustine <saugustine@google.com>
* contrib: New directory.
	* contrib/test_pubnames_and_indexes.py: New file.
2012-04-30 18:06:50 +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
gdbadmin 45162986de *** empty log message *** 2012-04-30 00:00:33 +00:00
Sergio Durigan Junior 311fe7e108 2012-04-29 Sergio Durigan Junior <sergiodj@redhat.com>
* tracepoint.c (start_tracing, stop_tracing): Checking for NULL
	probes.
2012-04-29 15:14:31 +00:00
Yao Qi 5977971a97 gdb:
* gdb-code-style.el: New hook gdb-markup-hook
	and gdb-comment-hook.
2012-04-29 07:20:43 +00:00
Yao Qi 2746b0ef8d gdb/doc:
* gdb.texinfo (Architectures): Remove menu entry `A29K'.
	(A29K): Remove.
2012-04-29 06:45:02 +00:00
Yao Qi b9e219b912 gdb/testsuite:
* gdb.dwarf2/dw2-ifort-parameter.exp: Use proc `dwarf2_support'.
2012-04-29 06:40:02 +00:00
Yao Qi 623b6bdf12 gdb/gdbserver:
* server.h: Move some code to ...
	* gdbthread.h: ... here.  New.
	* Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
	(remote-utils.o, server.o, target.o tracepoint.o): Likewise.
	(nto-low.o, win32-low.o): Likewise.
	* inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
	* regcache.c, remote-utils.c, server.c: Likewise.
	* target.c, tracepoint.c, win32-low.c: Likewise.
2012-04-29 06:28:30 +00:00
gdbadmin 5ca6f161fa *** empty log message *** 2012-04-29 00:00:32 +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
Sergio Durigan Junior 72d59e0d89 2012-04-28 Sergio Durigan Junior <sergiodj@redhat.com>
* probe.c (compile_rx_or_error): Silence ARI warning about missing
	 gettext function on `error'.
2012-04-28 04:52:33 +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
gdbadmin 8051dfdfcd *** empty log message *** 2012-04-28 00:00:03 +00:00
Sergio Durigan Junior 62e5f89c34 gdb/doc/ChangeLog:
2012-04-27  Sergio Durigan Junior  <sergiodj@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Static Probe Points): New entry, explaining SystemTap
	and generic static probe support on GDB.

gdb/testsuite/ChangeLog:
2012-04-27  Sergio Durigan Junior  <sergiodj@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* gdb.base/default.exp: Add `$_probe_arg*' convenience
	variables.
	* gdb.base/stap-probe.c: New file.
	* gdb.base/stap-probe.exp: New file.
	* gdb.trace/stap-trace.c: New file.
	* gdb.trace/stap-trace.exp: New file.
	* gdb.cp/nextoverthrow.exp: Add check for SystemTap probe in
	libgcc's unwinder.
2012-04-27 20:52:06 +00:00
Sergio Durigan Junior 28106bc2fe 2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com>
Tom Tromey  <tromey@redhat.com>

	* breakpoint.c (struct breakpoint_objfile_data)
	<longjmp_searched>,<longjmp_probes>,<exception_searched>,
	<exception_probes>: New fields.
	(free_breakpoint_probes): New function.
	(create_longjmp_master_breakpoint): Prefer SystemTap probe over
	`_Unwind_DebugHook'.
	(create_exception_master_breakpoint): Likewise.
	(_initialize_breakpoint): Registering cleanup for SystemTap probes.
	* infrun.c: Including necessary header files for handling SystemTap
	probes.
	(handle_inferior_event): Handling longjmp breakpoint and exceptions
	via SystemTap probes.
	(check_exception_resume): Remove `func' argument.  Handle exception
	unwinding breakpoint set via a SystemTap probe.
	(insert_exception_resume_from_probe): New function.
2012-04-27 20:48:57 +00:00
Sergio Durigan Junior 55aa24fb2e 2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com>
Tom Tromey  <tromey@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	* Makefile.in (SFILES): Add `probe' and `stap-probe'.
	(COMMON_OBS): Likewise.
	(HFILES_NO_SRCDIR): Add `probe'.
	* NEWS: Mention support for static and SystemTap probes.
	* amd64-tdep.c (amd64_init_abi): Initializing proper fields used by
	SystemTap probes' arguments parser.
	* arm-linux-tdep.c: Including headers needed to perform the parsing
	of SystemTap probes' arguments.
	(arm_stap_is_single_operand): New function.
	(arm_stap_parse_special_token): Likewise.
	(arm_linux_init_abi): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* ax-gdb.c (require_rvalue): Removing static declaration.
	(gen_expr): Likewise.
	* ax-gdb.h (gen_expr): Declaring function.
	(require_rvalue): Likewise.
	* breakpoint.c: Include `gdb_regex.h' and `probe.h'.
	(bkpt_probe_breakpoint_ops): New variable.
	(momentary_breakpoint_from_master): Set the `probe' value.
	(add_location_to_breakpoint): Likewise.
	(break_command_1): Using proper breakpoint_ops according to the
	argument passed by the user in the command line.
	(bkpt_probe_insert_location): New function.
	(bkpt_probe_remove_location): Likewise.
	(bkpt_probe_create_sals_from_address): Likewise.
	(bkpt_probe_decode_linespec): Likewise.
	(tracepoint_probe_create_sals_from_address): Likewise.
	(tracepoint_probe_decode_linespec): Likewise.
	(tracepoint_probe_breakpoint_ops): New variable.
	(trace_command): Using proper breakpoint_ops according to the
	argument passed by the user in the command line.
	(initialize_breakpoint_ops): Initializing breakpoint_ops for
	static probes on breakpoints and tracepoints.
	* breakpoint.h (struct bp_location) <probe>: New field.
	* cli-utils.c (skip_spaces_const): New function.
	(extract_arg): Likewise.
	* cli-utils.h (skip_spaces_const): Likewise.
	(extract_arg): Likewise.
	* coffread.c (coff_sym_fns): Add `sym_probe_fns' value.
	* configure.ac: Append `stap-probe.o' to be generated when ELF
	support is present.
	* configure: Regenerate.
	* dbxread.c (aout_sym_fns): Add `sym_probe_fns' value.
	* elfread.c: Include `probe.h' and `arch-utils.h'.
	(probe_key): New variable.
	(elf_get_probes): New function.
	(elf_get_probe_argument_count): Likewise.
	(elf_evaluate_probe_argument): Likewise.
	(elf_compile_to_ax): Likewise.
	(elf_symfile_relocate_probe): Likewise.
	(stap_probe_key_free): Likewise.
	(elf_probe_fns): New variable.
	(elf_sym_fns): Add `sym_probe_fns' value.
	(elf_sym_fns_lazy_psyms): Likewise.
	(elf_sym_fns_gdb_index): Likewise.
	(_initialize_elfread): Initialize objfile cache for static
	probes.
	* gdb_vecs.h (struct probe): New forward declaration.
	(probe_p): New VEC declaration.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.
	* gdbarch.sh (stap_integer_prefix): New variable.
	(stap_integer_suffix): Likewise.
	(stap_register_prefix): Likewise.
	(stap_register_suffix): Likewise.
	(stap_register_indirection_prefix): Likewise.
	(stap_register_indirection_suffix): Likewise.
	(stap_gdb_register_prefix): Likewise.
	(stap_gdb_register_suffix): Likewise.
	(stap_is_single_operand): New function.
	(stap_parse_special_token): Likewise.
	(struct stap_parse_info): Forward declaration.
	* i386-tdep.c: Including headers needed to perform the parsing
	of SystemTap probes' arguments.
	(i386_stap_is_single_operand): New function.
	(i386_stap_parse_special_token): Likewise.
	(i386_elf_init_abi): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* i386-tdep.h (i386_stap_is_single_operand): New function.
	(i386_stap_parse_special_token): Likewise.
	* machoread.c (macho_sym_fns): Add `sym_probe_fns' value.
	* mipsread.c (ecoff_sym_fns): Likewise.
	* objfiles.c (objfile_relocate1): Support relocation for static
	probes.
	* parse.c (prefixify_expression): Remove static declaration.
	(initialize_expout): Likewise.
	(reallocate_expout): Likewise.
	* parser-defs.h (initialize_expout): Declare function.
	(reallocate_expout): Likewise.
	(prefixify_expression): Likewise.
	* ppc-linux-tdep.c: Including headers needed to perform the parsing
	of SystemTap probes' arguments.
	(ppc_stap_is_single_operand): New function.
	(ppc_stap_parse_special_token): Likewise.
	(ppc_linux_init_abi): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* probe.c: New file, for generic statically defined probe support.
	* probe.h: Likewise.
	* s390-tdep.c: Including headers needed to perform the parsing of
	SystemTap probes' arguments.
	(s390_stap_is_single_operand): New function.
	(s390_gdbarch_init): Initializing proper fields used by SystemTap
	probes' arguments parser.
	* somread.c (som_sym_fns): Add `sym_probe_fns' value.
	* stap-probe.c: New file, for SystemTap probe support.
	* stap-probe.h: Likewise.
	* symfile.h: Include `gdb_vecs.h'.
	(struct sym_probe_fns): New struct.
	(struct sym_fns) <sym_probe_fns>: New field.
	* symtab.c (init_sal): Initialize `probe' field.
	* symtab.h (struct probe): Forward declaration.
	(struct symtab_and_line) <probe>: New field.
	* tracepoint.c (start_tracing): Adjust semaphore on breakpoints
	locations.
	(stop_tracing): Likewise.
	* xcoffread.c (xcoff_sym_fns): Add `sym_probe_fns' value.
2012-04-27 20:47:57 +00:00
Sergio Durigan Junior 22d2b532b8 2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com>
Tom Tromey  <tromey@redhat.com>

	* ax-gdb.c (gen_expr): Clean up code to handle internal variables
	and to compile agent expressions.
	* infrun.c (siginfo_make_value): New argument `ignore'.
	(siginfo_funcs): New struct.
	(_initialize_infrun): New argument when calling
	`create_internalvar_type_lazy'.
	* thread.c (thread_id_make_value): New argument `ignore'.
	(thread_funcs): New struct.
	(_initialize_thread): New argument when calling
	`create_internalvar_type_lazy'.
	* tracepoint.c (sdata_make_value): New argument `ignore'.
	(sdata_funcs): New struct.
	(_initialize_tracepoint): New argument when calling
	`create_internalvar_type_lazy'.
	* value.c (make_value): New struct.
	(create_internalvar_type_lazy): New argument `data'.
	(compile_internalvar_to_ax): New function.
	(value_of_internalvar): Properly handling `make_value' case.
	(clear_internalvar): Likewise.
	(show_convenience): Adding `TRY_CATCH' block.
	* value.h (internalvar_make_value): Delete, replace by...
	(struct internalvar_funcs): ... this.
	(create_internalvar_type_lazy) <fun>: Delete argument.
	(create_internalvar_type_lazy) <funcs>, <data>: New arguments.
	(compile_internalvar_to_ax): New function.
	* windows-tdep.c (tlb_make_value): New argument `ignore'.
	(tlb_funcs): New struct.
	(_initialize_windows_tdep): New argument when calling
	`create_internalvar_type_lazy'.
2012-04-27 20:38:39 +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
Mark Wielaard 4ab9d8ec07 * MAINTAINERS (Write After Approval): Add myself to the list. 2012-04-27 18:50:35 +00:00
Maciej W. Rozycki a0911fd020 * proc-utils.h (proc_prettyprint_signalset): New prototype.
(proc_prettyprint_signal): Likewise.
	(proc_prettyprint_faultset): Likewise.
	(proc_prettyprint_fault): Likewise.
	(proc_prettyprint_actionset): Likewise.
	(proc_prettyprint_flags): Move to new proc-flags.c section.
	(proc_prettyfprint_flags): New prototype.
	* procfs.c (proc_nsysarg, proc_sysargs): Add prototypes.
	(proc_syscall, proc_cursig): Likewise.
	(proc_set_kill_on_last_close): Likewise.
	(proc_unset_kill_on_last_close): Likewise.
	(proc_set_watchpoint): Make static.
	(proc_delete_dead_threads): Likewise.
	(procfs_set_watchpoint): Likewise.
	(_initialize_procfs): Add prototype.
	* proc-events.c: Include proc-utils.h.
	(init_syscall_table): Make static.
	* proc-api.c (_initialize_proc_api): Add prototype.
	* proc-flags.c: Include proc-utils.h.
2012-04-27 18:32:33 +00:00
Maciej W. Rozycki 9009e1ae5f * configure.ac: Add AC_ARG_PROGRAM.
* configure: Regenerate.
2012-04-27 18:30:20 +00:00
gdbadmin 557865dd95 *** empty log message *** 2012-04-27 00:00:33 +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
Maciej W. Rozycki 14132e8924 gdb/
* infrun.c (handle_inferior_event): Move the check for return
	trampolines ahead of the check for function trampolines.
	* mips-tdep.h (MIPS_S2_REGNUM, MIPS_GP_REGNUM): New macros.
	* mips-tdep.c (mips_str_mips16_call_stub): New variable.
	(mips_str_mips16_ret_stub): Likewise.
	(mips_str_call_fp_stub): Likewise.
	(mips_str_call_stub): Likewise.
	(mips_str_fn_stub): Likewise.
	(mips_str_pic): Likewise.
	(mips_in_frame_stub): New function.
	(mips_unwind_pc): Return the return address rather than the PC
	if the PC of an intermediate frame is inside a call thunk.
	(mips_is_stub_suffix): New function.
	(mips_is_stub_mode): Likewise.
	(mips_get_mips16_fn_stub_pc): Likewise.
	(mips_skip_mips16_trampoline_code): Update to handle all the
	currently generated stub types.  Don't recurse into __fn_stub
	thunks.  Remove heuristics to handle stubs beyond etext/_etext.
	Use cooked register accesses.
	(mips_in_return_stub): Reintroduce function.
	(mips_skip_trampoline_code): Traverse trampolines recursively.
	(mips_gdbarch_init): Handle MIPS16 return trampolines.

	gdb/testsuite/
	* gdb.arch/mips16-thunks-inmain.c: New file.
	* gdb.arch/mips16-thunks-main.c: New file.
	* gdb.arch/mips16-thunks-sin.c: New file.
	* gdb.arch/mips16-thunks-sinfrob.c: New file.
	* gdb.arch/mips16-thunks-sinfrob16.c: New file.
	* gdb.arch/mips16-thunks-sinmain.c: New file.
	* gdb.arch/mips16-thunks-sinmips16.c: New file.
	* gdb.arch/mips16-thunks.exp: New file.
2012-04-26 16:56:18 +00:00
gdbadmin 518f0db5cf Mention GDB 7.4.1 release in CL. 2012-04-26 16:25:55 +00:00
Jonathan Larmour 3184d3f9a5 * arm-tdep.h (VFP_REGISTER_SIZE): Define.
* features/arm-with-m-vfp-d16.xml: New file. Describes
	Cortex-M with VFPv4-sp-d16 FPU register layout.
	* features/Makefile (WHICH): Add arm-with-m-vfp-d16.
	* features/arm-with-m-vfp-d16.c: New. Generated from above.
	* arm-tdep.c: Include arm-with-m-vfp-d16.c.
	(arm-register_g_packet_guesses): Add vfp-d16 guess.
	(_initialise_arm_tdep): Initialize arm-with-m-vfp-d16 tdesc.
2012-04-26 15:20:14 +00:00
gdbadmin 74e4e5f0d8 *** empty log message *** 2012-04-26 00:00:03 +00:00
Doug Evans b6201d445c * cli/cli-decode.c (print_doc_line): Use stream instead of
current_uiout.
2012-04-25 21:56:01 +00:00
Doug Evans cf53da4b63 back out previous change 2012-04-25 20:55:47 +00:00
Doug Evans ee4d97bc8b * cli/cli-decode.c (print_doc_line): Use stream instead of
current_uiout.
2012-04-25 18:58:57 +00:00
Sergio Durigan Junior 4e2f8df673 2012-04-25 Sergio Durigan Junior <sergiodj@redhat.com>
* features/arm-with-iwmmxt.c: Regenerate.
	* features/arm-with-m-fpa-layout.c: Likewise.
	* features/arm-with-m.c: Likewise.
	* features/arm-with-neon.c: Likewise.
	* features/arm-with-vfpv2.c: Likewise.
	* features/arm-with-vfpv3.c: Likewise.
	* features/mips-dsp-linux.c: Likewise.
	* features/mips-linux.c: Likewise.
	* features/mips64-dsp-linux.c: Likewise.
	* features/mips64-linux.c: Likewise.
	* features/s390-linux32.c: Likewise.
	* features/s390-linux32v1.c: Likewise.
	* features/s390-linux32v2.c: Likewise.
	* features/s390-linux64.c: Likewise.
	* features/s390-linux64v1.c: Likewise.
	* features/s390-linux64v2.c: Likewise.
	* features/s390x-linux64.c: Likewise.
	* features/s390x-linux64v1.c: Likewise.
	* features/s390x-linux64v2.c: Likewise.
	* features/tic6x-c62x-linux.c: Likewise.
	* features/tic6x-c62x.c: Likewise.
	* features/tic6x-c64x-linux.c: Likewise.
	* features/tic6x-c64x.c: Likewise.
	* features/tic6x-c64xp-linux.c: Likewise.
	* features/tic6x-c64xp.c: Likewise.
	* target-descriptions.c: Only generate `field_type' and `type'
	variables when needed.
2012-04-25 18:36:05 +00:00
Doug Evans 50f042b9a1 * gdb.texinfo (Go): Fix thinko. 2012-04-25 16:13:17 +00:00
Joel Brobecker 2def3e664d Fix location of entry added last. 2012-04-25 15:16:29 +00:00
Joel Brobecker b2a3b50908 Corrupted path caused by "cd" command.
gdb/ChangeLog:

	* cli/cli-cmds.c (cd_command): Use memmove instead of strcpy.
2012-04-25 15:14:59 +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
Tom Tromey e65f9ffb8e * gdb.threads/linux-dp.exp: Unset 'seen' before 'array set'. 2012-04-25 13:54:00 +00:00
Yao Qi f02e2b19dd gdb/doc
* gdbint.texinfo (Testsuite): New section `Board settings'.
2012-04-25 10:59:10 +00:00
Jim Meyering 4e2af517f1 avoid a few strncpy-induced buffer overruns
* procfs.c (procfs_make_note_section): Be sure to NUL-terminate
fname and psargs before trying to concatenate.
* tui/tui-stack.c (tui_get_function_from_frame): NUL-terminate
"name" before applying strchr.
2012-04-25 08:16:43 +00:00
Siva Chandra Reddy b77b7f52b8 2012-04-25 Siva Chandra Reddy <sivachandra@google.com>
* CONTRIBUTE: Use unified diff instead of context diff when
	generating patches.
2012-04-25 07:08:07 +00:00
gdbadmin 566ce71f9c *** empty log message *** 2012-04-25 00:00:03 +00:00
Maciej W. Rozycki 6321c22a8c * mips-tdep.c (mips_about_to_return): Remove dead MIPS16 support
code.  Handle JR.HB correctly.
2012-04-24 19:56:02 +00:00
Maciej W. Rozycki 742c84f629 * mips-tdep.c
(is_mips16_addr, unmake_mips16_addr, make_mips16_addr): Group
	with the other MIPS16 helpers.
2012-04-24 19:44:16 +00:00
Sergio Durigan Junior 7fc7e0c328 2012-04-24 Sergio Durigan Junior <sergiodj@redhat.com>
* observer.sh: Conditionally declare `args', thus cleaning up
	unused instances of this variable.
2012-04-24 18:10:31 +00:00
Thiago Jung Bauermann f15f99484e * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
(PTRACE_ARG4_TYPE): Likewise.
	(PTRACE_XFER_TYPE): Likewise.
	* linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
	ptrace to PTRACE_ARG3_TYPE.
	* linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
	(PTRACE_ARG4_TYPE): Likewise.
	(PTRACE_XFER_TYPE): Likewise.
	(linux_detach_one_lwp): Cast fourth argument of
	ptrace to long then PTRACE_ARG4_TYPE.
	(regsets_fetch_inferior_registers): Cast third argument of
	ptrace to long then PTRACE_ARG3_TYPE.
	(regsets_store_inferior_registers): Likewise.
2012-04-24 15:03:43 +00:00
Yao Qi 20388dd6b6 gdb:
Revert this patch to allow breakpoint always-inserted
	in record target.
	2011-12-05  Pedro Alves  <pedro@codesourcery.com>
        * breakpoint.c: Include record.h.
        (breakpoints_always_inserted_mode): Return false when the record
        target is in use.

	* breakpoint.c (iterate_over_bp_locations): New.
	* breakpoint.h: Declare.
	New typedef walk_bp_location_callback.
	* record.c (record_open): Call record_init_record_breakpoints.
	(record_sync_record_breakpoints): New.
	(record_init_record_breakpoints): New.
	* NEWS: Mention supporting breakpoint always-inserted mode in
	record target.
2012-04-24 14:33:12 +00:00
Marc Khouzam 4734f50e63 2012-04-24 Marc Khouzam <marc.khouzam@ericsson.com>
* mi/mi-main.c (mi_cmd_execute): Choose a live thread not just
	any thread.
2012-04-24 14:26:22 +00:00
Yao Qi c326b90eb9 gdb/
* breakpoint.c (ep_is_catchpoint): Renamed to ...
	(is_catchpoint): ... it.
	(print_one_breakpoint_location): Caller update.
	* breakpoint.h: Update declaration.
2012-04-24 13:20:16 +00:00
David S. Miller d8fb5a1e65 gdb: Enable gdbserver by default on sparc-*-linux*
This appears to be an oversight, since this is done already for
sparc64-*-linux*, and essentially every other linux target.

gdb/

	* configure.tgt (sparc-*-linux*): Set build_gdbserver to yes.
2012-04-24 03:33:16 +00:00
gdbadmin 45a263927b *** empty log message *** 2012-04-24 00:00:33 +00:00
Tom Tromey 34431a2aa1 * buildsym.c (add_free_pendings): Remove.
* buildsym.h (add_free_pendings): Remove.
2012-04-23 18:53:16 +00:00
Jan Kratochvil 174bb630b6 gdb/doc/
* gdb.texinfo (Auto-loading safe path): Add trailing @dots{}.
	Three times.
2012-04-23 17:26:01 +00:00
Jan Kratochvil 68d41a48a4 gdb/doc/
* gdb.texinfo (Auto-loading safe path): Remove trailing [@dots{}].
	Three times.
2012-04-23 17:20:56 +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
Maciej W. Rozycki dca9aa3ad4 * mips-tdep.c (mips_n32n64_return_value): Fix coding style.
(mips_o32_return_value): Likewise.
	(mips_o64_return_value): Likewise.
2012-04-23 16:00:19 +00:00
gdbadmin ca0421429c *** empty log message *** 2012-04-23 00:00:32 +00:00
Jan Kratochvil 0511cc75f8 gdb/doc/
* gdb.texinfo (Auto-loading safe path): Replace @itemize @bullet
	by @table @asis.  Fix formatting of one item.
2012-04-22 15:49:21 +00:00
gdbadmin 4ff4b0eb41 *** empty log message *** 2012-04-22 00:00:32 +00:00
Paul N. Hilfinger c8ea197278 Add proper handling for internal functions and STT_GNU_IFUNC symbols in Ada mode.
The code for handling calls to internal functions (esp., Python
functions) and for handling STT_GNU_IFUNC had not been added to the Ada
expression evaluator.  This change adapts them from eval.c.

gdb/Changelog:

        * ada-lang.c (ada_evaluate_subexp): Add cases for
          TYPE_CODE_INTERNAL_FUNCTION and for TYPE_GNU_IFUNC, following
          their treatment in eval.c.
2012-04-21 22:12:59 +00:00
David S. Miller 8d1b3521db Handle sparc compare-and-branch
SPARC-T4 adds a "compare and branch" instruction which fuses
a compare and a branch instruction into one.  The branch
is non-delayed, there are no anulling facilities, and the
displacement is 10-bits.

This also corrects the existing bit test for Branch on
Integer Register.  The distinguising characteristic between
Branch on Integer Register and Compare-and-Branch is bit
28.  The existing code was checking bit 24 for zero, but
that's pointless because bit 24 is already covered by
the "X_OP2 (insn) == 3" test.

gdb/

	* sparc-tdep.c (X_DISP10): Define.
	(sparc_analyze_control_transfer): Handle compare-and-branch.
2012-04-21 19:03:52 +00:00
gdbadmin 4272ccafdd *** empty log message *** 2012-04-21 00:00:34 +00:00
Jonathan Larmour 03145bf42d * features/Makefile (WHICH): Add arm-with-m and arm-with-m-fpa-layout.
* arm-tdep.c (arm_register_g_packet_guesses): Fix comment.
2012-04-20 23:39:58 +00:00
Maciej W. Rozycki 004159a2dc * mips-tdep.c (mips_float_register_p): New function.
(mips_convert_register_float_case_p): Use mips_float_register_p.
	(mips_register_type): Likewise.
	(mips_print_register): Likewise.
	(print_gp_register_row): Likewise.
	(mips_print_registers_info): Likewise.
2012-04-20 23:31:39 +00:00
Maciej W. Rozycki 7f0e6aaed2 * mips-tdep.c (mips_elf_make_msymbol_special): Fix identification
of mips16 symbols.
2012-04-20 23:01:51 +00:00
Andrew Pinski bc17beea2d 2012-04-20 Andrew Pinski <apinski@cavium.com>
* MAINTAINERS (Write After Approval): Add myself to the list.
2012-04-20 22:59:48 +00:00
Sergio Durigan Junior 1730a5a56b 2012-04-20 Sergio Durigan Junior <sergiodj@redhat.com>
* MAINTAINERS: Update my e-mail address.
2012-04-20 22:56:45 +00:00
Pedro Alves 38ea300a20 2012-04-20 Pedro Alves <palves@redhat.com>
gdb/
	* acx_configure_dir.m4 (ACX_CONFIGURE_DIR): Handle absolute
	$srcdir.
	* configure: Regenerate.

	gdb/gdbserver/
	* configure: Regenerate.
2012-04-20 17:58:49 +00:00
Sergio Durigan Junior 111dfaae04 2012-04-20 Sergio Durigan Junior <sergiodj@redhat.com>
* cp-support.h: Include `gdb_vecs.h'.  Delete `const_char_ptr' VEC
	declaration.
	* gdb_vecs.h: Declare `const_char_ptr' VEC.
2012-04-20 16:57:17 +00:00
Pedro Alves a09130f92f whitespace/tabify 2012-04-20 16:36:24 +00:00
Jan Kratochvil 4fb2c64af1 gdb/
Fix compilation compatibility with python-2.4
	* python/py-type.c (convert_field): Cast ADDRSTRING for
	PyObject_SetAttrString as non-const.  New comment.
2012-04-20 07:17:58 +00:00
gdbadmin d5003ebff0 *** empty log message *** 2012-04-20 00:00:33 +00:00
Tom Tromey 6328eb3805 * top.c (quit_target): Use all_cleanups.
* main.c (captured_command_loop): Use all_cleanups.
	* exceptions.c (throw_exception): Use all_cleanups.
2012-04-19 20:18:26 +00:00
Pedro Alves c971b7fa72 2012-04-19 Pedro Alves <palves@redhat.com>
gdb/
	* Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
	(SUBDIRS): Add $(GNULIB_BUILDDIR).
	(CLEANDIRS). Remove gnulib/import.
	(REQUIRED_SUBDIRS): Replace gnulib/import with $(GNULIB_BUILDDIR).
	(all-lib): Ditto.
	(distclean): Remove the $(GNULIB_BUILDDIR) directory.
	(gnulib/import/Makefile): Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Set CONFIG_FILES to just Makefile.
	(ACLOCAL_AMFLAGS): Remove '-I gnulib/import/m4'.
	(aclocal_m4_deps): Remove the gnulib dependencies.  Add
	acx_configure_dir.m4.
	* acinclude.m4: Include acx_configure_dir.m4.
	* acx_configure_dir.m4: New file.
	* aclocal.m4: Regenerate.
        * configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE
        calls.  Configure gnulib using ACX_CONFIGURE_DIR.
        (GNULIB): New variable.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile.
        * gdb/defs.h: Include build-gnulib/config.h.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.

        * gnulib/Makefile.in: New file.
        * gnulib/configure.ac: New file.
        * gnulib/aclocal.m4: New file.
        * gnulib/config.in: New file.
        * gnulib/configure: New file.
	* gnulib/: Re-run gnulib-tool to adjust.

        gdb/gdbserver/
        * Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
        (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
        (all, install-only, uninstall, clean-info, all-lib, clean): No
        longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
        (maintainer-clean realclean distclean): Use subdir_do.
        (subdir_do): New.
        (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Don't pass argument to config.status.
        * acinclude.m4: Include acx_configure_dir.m4.
        * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
        calls.  Call AC_PROG_RANLIB.  Configure gnulib using
        ACX_CONFIGURE_DIR.
        (GNULIB): New.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile anymore.
        * gdbreplay.c: Include build-gnulib/config.h.
        * server.h: Likewise.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.
2012-04-19 19:34:52 +00:00
Pedro Alves 9d28a8c73b Revert commit that should not have gone in. 2012-04-19 19:32:15 +00:00
Doug Evans b10faa68a4 * cleanups.h (struct cleanup): Move to cleanups.c.
(make_cleanup_dtor_ftype): New typedef.
	(make_cleanup_dtor): Use it.
	(ALL_CLEANUPS): Replace with ...
	(all_cleanups): ... this.  Declare.  All uses updated.
	* cleanups.c: #include "gdb_assert.h".
	(sentinel_cleanup): New static global.
	(SENTINEL_CLEANUP): Define.
	(cleanup_chain, final_cleanup_chain): Initialize to SENTINEL_CLEANUP.
	(make_my_cleanup2): Assert result is non-NULL.
	(all_cleanups): New function.
	(save_my_cleanups): Initialize new chain to SENTINEL_CLEANUP instead
	of NULL.
2012-04-19 19:11:02 +00:00
Pedro Alves ff188ee48b 2012-04-19 Pedro Alves <palves@redhat.com>
* Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
	(SUBDIRS): Add $(GNULIB_BUILDDIR).
	(CLEANDIRS). Remove gnulib/import.
	(REQUIRED_SUBDIRS): Replace gnulib/import with $(GNULIB_BUILDDIR).
	(all-lib): Ditto.
	(distclean): Remove the $(GNULIB_BUILDDIR) directory.
	(gnulib/import/Makefile): Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Set CONFIG_FILES to just Makefile.
	(ACLOCAL_AMFLAGS): Remove '-I gnulib/import/m4'.
	(aclocal_m4_deps): Remove the gnulib dependencies.  Add
	acx_configure_dir.m4.
	* acinclude.m4: Include acx_configure_dir.m4.
	* acx_configure_dir.m4: New file.
	* aclocal.m4: Regenerate.
        * configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE
        calls.  Configure gnulib using ACX_CONFIGURE_DIR.
        (GNULIB): New variable.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile.
        * gdb/defs.h: Include build-gnulib/config.h.
        * acx_configure_dir.m4: New file.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.

        * gnulib/Makefile.in: New file.
        * gnulib/configure.ac: New file.
        * gnulib/aclocal.m4: New file.
        * gnulib/config.in: New file.
        * gnulib/configure: New file.
	* gnulib/: Re-run gnulib-tool to adjust.

        gdbserver/
        * Makefile.in (GNULIB_BUILDDIR): New.
	(LIBGNU, INCGNU, GNULIB_H): Adjust.
        (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
        (all, install-only, uninstall, clean-info, all-lib, clean): No
        longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
        (maintainer-clean realclean distclean): Use subdir_do.
        (subdir_do): New.
        (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
	$(GNULIB_BUILDDIR).  Don't pass argument to config.status.
        * acinclude.m4: Include acx_configure_dir.m4.
        * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
        calls.  Call AC_PROG_RANLIB.  Configure gnulib using
        ACX_CONFIGURE_DIR.
        (GNULIB): New.
        (GNULIB_STDINT_H): Adjust.
        (AC_OUTPUT): Don't output gnulib/Makefile anymore.
        * gdbreplay.c: Include build-gnulib/config.h.
        * server.h: Likewise.
        * aclocal.m4: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.
2012-04-19 17:18:18 +00:00
Pedro Alves e22314be6a 2012-04-19 Pedro Alves <palves@redhat.com>
* Makefile.in (HFILES_NO_SRCDIR): Remove gnulib/wchar.in.h.
	Adjust paths to gnulib imported files.
C
2012-04-19 17:15:07 +00:00
Pedro Alves d8c267cc74 2012-04-19 Pedro Alves <palves@redhat.com>
* Makefile.in (HFILES_NO_SRCDIR): Remove gnulib/wchar.in.h.
	Adjust paths to gnulib imported files.
2012-04-19 16:55:28 +00:00
Pedro Alves 809277f8ce 2012-04-19 Pedro Alves <palves@redhat.com>
gdb/
	* gnulib/: Move whole directory ...
	* gnulib/import/: ... here, and re-rerun gnulib-tool to adjust.
	* Makefile.in (LIBGNU, INCGNU, GNULIB_H, CLEANDIRS)
	(REQUIRED_SUBDIRS, all-lib, gnulib/Makefile, ACLOCAL_AMFLAGS)
	(aclocal_m4_deps): Adjust.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* configure.ac: Adjust AC_OUTPUT output.

	gdbserver/
	* Makefile.in (LIBGNU, INCGNU): Adjust.
	(GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
	(all, install-only, uninstall, clean-info, all-lib, clean)
	(maintainer-clean, Makefile, gnulib/Makefile): Adjust.
	* configure.ac: Adjust AC_OUTPUT output.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2012-04-19 15:27:52 +00:00
Pedro Alves fd9bb8b878 2012-04-19 Pedro Alves <palves@redhat.com>
* Makefile.in (generated_files): New.
	(server_h): Remove the explicit dependency on config.h, and depend
	on $generated_files.
2012-04-19 13:26:25 +00:00
Pedro Alves 1c298c6671 2012-04-19 Pedro Alves <palves@redhat.com>
* Makefile.in (INCGNU): Add -Ignulib.
2012-04-19 12:10:06 +00:00
Pedro Alves 57c4b50b88 2012-04-19 Pedro Alves <palves@redhat.com>
* Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
	(INCGNU): ... this, and spell out -I here.
	(GNULIB_LIB): Rename to ...
	(LIBGNU): ... this.
	(INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
2012-04-19 12:02:56 +00:00
Pedro Alves 1030e047aa 2012-04-19 Pedro Alves <palves@redhat.com>
* config.in: Regenerate.
2012-04-19 11:58:57 +00:00
Pedro Alves 71622373ce Move entries to right place. Drop config.in entry, as I forgot to
actually do what it says.
2012-04-19 11:57:39 +00:00
Pedro Alves 447d431953 2012-04-19 Pedro Alves <palves@redhat.com>
* configure.ac: Remove AC_CHECK_DECLS check for memmem.
	* server.h (memmem): Remove declaration.
	* config.in: Regenerate.
	* configure: Regenerate.
2012-04-19 10:23:03 +00:00
Yao Qi aad9eab9f2 gdb:
* Makefile.in (SFILES): Add common/vec.c and remove vec.c.
        (vec.o): New rule.
        * vec.c: Move it ...
        * common/vec.c: ... here.
        * vec.h: Move it ...
        * common/vec.h: ... here.

gdb/gdbserver:

        * Makefile.in (SFILES): Add common/vec.c.
        (OBS): Add vec.o.
        (vec.o): New rule.
2012-04-19 05:58:52 +00:00
Yao Qi 3e10640f3c gdb/gdbserver/
* remote-utils.c (prepare_resume_reply): Replace with macro
	target_core_of_thread.
	* server.c (handle_qxfer_threads_proper): Likewise.
	* target.h (traget_core_of_thread): New macro.
2012-04-19 05:05:11 +00:00
Yao Qi 48fe46695a gdb/
* gdb-code-style.el: New.
2012-04-19 01:58:07 +00:00
gdbadmin 9f910cf7b3 *** empty log message *** 2012-04-19 00:00:33 +00:00
Pedro Alves 770d76d7b2 2012-04-18 Pedro Alves <palves@redhat.com>
Update gnulib from latest git.
	(639ea5ae15e39fe48d43e04864b2997301e4b969)

	* gnulib/Makefile.am: Update.
	* gnulib/dummy.c: Update.
	* gnulib/extra/arg-nonnull.h: Update.
	* gnulib/extra/c++defs.h: Update.
	* gnulib/extra/update-copyright: Update.
	* gnulib/extra/warn-on-use.h: Update.
	* gnulib/inttypes.in.h: Update.
	* gnulib/m4/00gnulib.m4: Update.
	* gnulib/m4/extensions.m4: Update.
	* gnulib/m4/gnulib-cache.m4: Update.
	* gnulib/m4/gnulib-common.m4: Update.
	* gnulib/m4/gnulib-comp.m4: Update.
	* gnulib/m4/gnulib-tool.m4: Update.
	* gnulib/m4/include_next.m4: Update.
	* gnulib/m4/inttypes-pri.m4: Update.
	* gnulib/m4/inttypes.m4: Update.
	* gnulib/m4/longlong.m4: Update.
	* gnulib/m4/memchr.m4: Update.
	* gnulib/m4/memmem.m4: Update.
	* gnulib/m4/mmap-anon.m4: Update.
	* gnulib/m4/multiarch.m4: Update.
	* gnulib/m4/onceonly.m4: Update.
	* gnulib/m4/stddef_h.m4: Update.
	* gnulib/m4/stdint.m4: Update.
	* gnulib/m4/string_h.m4: Update.
	* gnulib/m4/warn-on-use.m4: Update.
	* gnulib/m4/wchar_h.m4: Update.
	* gnulib/m4/wchar_t.m4: Update.
	* gnulib/m4/wint_t.m4: Update.
	* gnulib/memchr.c: Update.
	* gnulib/memmem.c: Update.
	* gnulib/stddef.in.h: Update.
	* gnulib/stdint.in.h: Update.
	* gnulib/str-two-way.h: Update.
	* gnulib/string.in.h: Update.
	* gnulib/wchar.in.h: Update.

	* gnulib/extra/arg-nonnull.h: Delete.
	* gnulib/extra/c++defs.h: Delete.
	* gnulib/extra/warn-on-use.h: Delete.
	* gnulib/m4/wchar_h.m4: Delete.
	* gnulib/m4/wint_t.m4: Delete.
	* gnulib/wchar.in.h: Delete.

	* gnulib/extra/snippets/arg-nonnull.h: New.
	* gnulib/extra/snippets/c++defs.h: New.
	* gnulib/extra/snippets/warn-on-use.h: New.

	* aclocal.m4: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.
	* gnulib/Makefile.in: Regenerate.

	* gdbserver/aclocal.m4: Regenerate.
	* gdbserver/config.in: Regenerate.
	* gdbserver/configure: Regenerate.
2012-04-18 20:45:25 +00:00
Pedro Alves 174e088e25 2012-04-18 Pedro Alves <palves@redhat.com>
Reimport the update-copyright module from gnulib
	(250b80067c1e1d8faa0c42fb572f721975b929c5).

	* configure: Regenerate.
	* gnulib/Makefile.am: Update.
	* gnulib/Makefile.in: Regenerate.
	* gnulib/extra/update-copyright: Update.
	* gnulib/m4/gnulib-cache.m4: Update.
	* gnulib/m4/gnulib-comp.m4: Update.
2012-04-18 20:06:39 +00:00
Joel Brobecker 7f53314238 put -lpthread into LIBS instead of CONFIG_LDFLAGS.
The problem showed up on AIX when we switched from the system linker
to GNU ld. What happens is that configure is adding -lpthdebug to
CONFIG_LDFLAGS when AIX thread debugging support is detected.  But
this causes the "-lpthread" switch to be placed at the _before_
GDB's .o files (see Makefile.in):

    INTERNAL_LDFLAGS = [...] $(CONFIG_LDFLAGS)
    [...]
    gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
            rm -f gdb$(EXEEXT)
            $(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
                    -o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
                    $(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)

And as a result of this, the linker reports an error due to some
symbols in aix-thread.o not being satisfied.

This patch adds the "-lpthread" switch to LIBS instead, which should
be the right place to add it.

gdb/ChangeLog (Tristan Gingold):

	* configure.ac (aix): Put -lpthread into libs.
	* configure: Regenerate.
2012-04-18 15:11:59 +00:00
Tom Tromey 001822aa58 * linespec.c (convert_linespec_to_sals): Don't use
SYMBOL_OBJ_SECTION.
	(compare_msymbols): Arguments are minsym_and_objfile, not
	minimal_symbol*.  Don't use SYMBOL_OBJ_SECTION.
2012-04-18 14:56:59 +00:00
Pedro Alves db026a31e6 2012-04-18 Pedro Alves <palves@redhat.com>
Revert gnulib/ part of:
	2011-01-01  Joel Brobecker  <brobecker@adacore.com>
	Copyright year update in most files (performed by copyright.sh).
2012-04-18 12:09:39 +00:00
Jan Kratochvil 0070f25af7 gdb/doc/
* gdb.texinfo (Auto-loading verbose mode): Fix smallexample typo.
2012-04-18 07:03:58 +00:00
Jan Kratochvil ac4ea3c206 Fix up comment to match reality. 2012-04-18 07:00:24 +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 efd4ebc341 Forgotten commit for:
gdb/testsuite/
	PR symtab/7259:
	* gdb.base/enumval.c: New test case.
	* gdb.base/enumval.exp: New test case.
2012-04-18 06:51:05 +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
Joel Brobecker ec92004f95 pspace != NULL failed assertion on ppc-aix
This patch fixes the following problem:

    % gdb foo
    (gdb) b main
    /[...]/progspace.c:216: internal-error: set_current_program_space: Assertion `pspace != NULL' failed.
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    Quit this debugging session? (y or n)

The problem happens when we try to get the program space from
a minimal symbol.  For that, we go through the minimal symbol's
obj_section->objfile->pspace.  But the minimal symbol's obj_section
is not set, and thus we somehow get a NULL program space. And
the reason why the obj_section is not set is because the XCOFF
reader did not pass the bfd_section when calling minsyms.c's
prim_record_minimal_symbol_and_info.

gdb/ChangeLog:

        * xcoffread.c (xcoff_secnum_to_sections): New function.
        (secnum_to_section, secnum_to_bfd_section): Reimplement
        using xcoff_secnum_to_sections.  Rename "secnum" parameter
        into "n_scnum".
        (RECORD_MINIMAL_SYMBOL): Delete.
        (record_minimal_symbol): New function.
        (scan_xcoff_symtab): Replace uses of RECORD_MINIMAL_SYMBOL
        by call to record_minimal_symbol and set misc_func_recorded
        to 1.  Set last_csect_sec to the XCOFF section index instead
        of GDB's section_offset index.  Update calls to
        prim_record_minimal_symbol_and_info to pass the BFD section
        as well.
2012-04-18 00:25:09 +00:00
Joel Brobecker 40301fb7ad Unused local variables in xcoffread.c:read_xcoff_symtab
gdb/ChangeLog:

        * xcoffread.c (read_xcoff_symtab): Delete variables
        last_csect_val and last_csect_sec and associated code.
2012-04-18 00:24:57 +00:00
gdbadmin 2c089af076 *** empty log message *** 2012-04-18 00:00:02 +00:00
Doug Evans 58d5e2c3ff * cleanups.c (make_my_cleanup,make_my_cleanup2): Make static.
(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.
	* cleanups.h (make_my_cleanup,make_my_cleanup2): Delete
	(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Delete.
2012-04-17 21:24:47 +00:00
Doug Evans c27f573840 * cleanups.h: New file.
* cleanups.c: New file.
	* Makefile.in (SFILES): Add cleanups.c.
	(HFILES_NO_SRCDIR): Add cleanups.h.
	(COMMON_OBS): Add cleanups.o.
	* defs.h (struct cleanup): Moved to cleanups.h.
	(do_cleanups,do_final_cleanups): Ditto.
	(discard_cleanups,discard_final_cleanups): Ditto
	(make_cleanup,make_cleanup_dtor,make_final_cleanup): Ditto.
	(save_cleanups,save_final_cleanups): Ditto.
	(restore_cleanups,restore_final_cleanups): Ditto.
	(null_cleanup): Ditto.
	(make_my_cleanup,make_my_cleanup2): Ditto.
	(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.
	* utils.c (cleanup_chain,final_cleanup_chain): Moved to cleanups.c.
	(do_cleanups,do_final_cleanups): Ditto.
	(discard_cleanups,discard_final_cleanups): Ditto
	(make_cleanup,make_cleanup_dtor,make_final_cleanup): Ditto.
	(save_cleanups,save_final_cleanups): Ditto.
	(restore_cleanups,restore_final_cleanups): Ditto.
	(null_cleanup): Ditto.
	(make_my_cleanup,make_my_cleanup2): Ditto.
	(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.
2012-04-17 21:13:20 +00:00
Doug Evans e0088cfdc7 * utils.c (make_cleanup_freeargv): Use make_cleanup instead of
make_my_cleanup.
	(make_cleanup_dyn_string_delete): Ditto.
	(make_cleanup_ui_file_delete): Ditto.
	(make_cleanup_ui_out_redirect_pop): Ditto.
	(make_cleanup_free_section_addr_info): Ditto.
	(make_cleanup_restore_integer): Ditto.
	(make_cleanup_unpush_target): Ditto.
	(make_cleanup_value_free_to_mark): Ditto.
	(make_cleanup_value_free): Ditto.
	(make_cleanup_free_so): Ditto.
2012-04-17 20:48:20 +00:00
Pedro Alves f3525b7005 2012-04-17 Pedro Alves <palves@redhat.com>
* Makefile.in (site.exp): Make site.exp source
	$srcdir/lib/append_gdb_boards_dir.exp.
	* lib/append_gdb_boards_dir.exp: New file.
2012-04-17 17:43:11 +00:00
Jan Kratochvil 4dc84fd109 gdb/
New option "set debug auto-load".
	* NEWS: New commands "set debug auto-load" and "show debug auto-load".
	* auto-load.c (debug_auto_load, show_debug_auto_load: New.
	(auto_load_safe_path_vec_update)
	(filename_is_in_auto_load_safe_path_vec): Call fprintf_unfiltered
	if DEBUG_AUTO_LOAD.
	(file_is_auto_load_safe): New parameters debug_fmt and ....
	Call fprintf_unfiltered if DEBUG_AUTO_LOAD.
	(source_gdb_script_for_objfile): Extend the file_is_auto_load_safe
	caller by explanatory string.
	(_initialize_auto_load): Register "set debug auto-load".
	* auto-load.h (file_is_auto_load_safe): New parameters debug_fmt
	and ....
	* linux-thread-db.c (try_thread_db_load_from_pdir_1)
	(try_thread_db_load_from_dir): Extend the file_is_auto_load_safe caller
	by explanatory string.
	* main.c (captured_main): Likewise.
	* python/py-auto-load.c (gdbpy_load_auto_script_for_objfile)
	(source_section_scripts): Likewise.

gdb/doc/
	New option "set debug auto-load".
	* gdb.texinfo (Auto-loading): New menu item for auto-load verbose mode.
	(auto-load verbose mode): New node.
2012-04-17 15:56:21 +00:00
Jan Kratochvil bccbefd2aa gdb/
New option "set auto-load safe-path".
	* NEWS: New commands "set auto-load safe-path"
	and "show auto-load safe-path".
	* auto-load.c: Include gdb_vecs.h, readline/tilde.h and completer.h.
	(auto_load_safe_path, auto_load_safe_path_vec)
	(auto_load_safe_path_vec_update, set_auto_load_safe_path)
	(show_auto_load_safe_path, add_auto_load_safe_path, filename_is_in_dir)
	(filename_is_in_auto_load_safe_path_vec, file_is_auto_load_safe): New.
	(source_gdb_script_for_objfile): New variable is_safe.  Call
	file_is_auto_load_safe.  Return if it is not.
	(struct loaded_script): New field loaded.
	(maybe_add_script): Add parameter loaded.  Initialize SLOT with it.
	(print_script): Use LOADED indicator instead of FULL_PATH.  Change
	output "Missing" to "No".
	(_initialize_auto_load): New variable cmd.  Initialize
	auto_load_safe_path.  Register "set auto-load safe-path",
	"show auto-load safe-path" and "add-auto-load-safe-path".
	* auto-load.h (maybe_add_script): Add parameter loaded.
	(file_is_auto_load_safe): New declaration.
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: New parameters --with-auto-load-safe-path
	and --without-auto-load-safe-path.
	* linux-thread-db.c (try_thread_db_load_from_pdir_1)
	(try_thread_db_load_from_dir): Check file_is_auto_load_safe first.
	* main.c (captured_main): Check file_is_auto_load_safe for
	LOCAL_GDBINIT.
	* python/py-auto-load.c (gdbpy_load_auto_script_for_objfile): New
	variable is_safe.  Call file_is_auto_load_safe.  Return if it is not.
	(source_section_scripts): Call file_is_auto_load_safe.  Return if it is
	not.

gdb/doc/
	New option "set auto-load safe-path".
	* gdb.texinfo (Auto-loading): Extend the "show auto-load"
	and "info auto-load" examples for safe-path.  Put there also references
	for "set auto-load safe-path" and "show auto-load safe-path".
	New menu item for Auto-loading safe path.
	(Auto-loading safe path): New node.
	(Python Auto-loading): Update the expected output from "Missing"
	to "No".

gdb/testsuite/
	New option "set auto-load safe-path".
	* gdb.python/py-objfile-script.exp (set auto-load safe-path): New.
	* gdb.python/py-section-script.exp (set auto-load safe-path): New.
2012-04-17 15:54:35 +00:00
Jan Kratochvil bf88dd6849 gdb/
auto-load: Implementation.
	* NEWS: New descriptions for "info auto-load",
	"info auto-load gdb-scripts", "info auto-load python-scripts",
	"info auto-load local-gdbinit" and "info auto-load libthread-db".
	Deprecate "info auto-load-scripts", "set auto-load-scripts on|off"
	and "show auto-load-scripts".  New description for "set auto-load",
	"show auto-load", "set auto-load gdb-scripts",
	"show auto-load gdb-scripts", "set auto-load python-scripts",
	"show auto-load python-scripts", "set auto-load local-gdbinit",
	"show auto-load local-gdbinit", "set auto-load libthread-db" and
	"show auto-load libthread-db".
	* auto-load.c: Remove include python/python-internal.h.  Add includes
	exceptions.h, cli/cli-script.h, gdbcmd.h, cli/cli-decode.h and
	cli/cli-setshow.h.
	(GDB_AUTO_FILE_NAME, source_gdb_script_for_objfile)
	(auto_load_gdb_scripts, show_auto_load_gdb_scripts): New.
	(gdbpy_global_auto_load): Rename to ...
	(global_auto_load): ... here.
	(auto_load_local_gdbinit, auto_load_local_gdbinit_pathname)
	(auto_load_local_gdbinit_loaded, show_auto_load_local_gdbinit)
	(script_language_gdb, source_gdb_script_for_objfile): New.
	(struct loaded_script): New field language.
	(hash_loaded_script_entry, eq_loaded_script_entry): Calculate also
	LANGUAGE.
	(maybe_add_script): Add parameter language.  Drop redundant
	entry.full_path initialization.  Initialize entry.language and
	(*slot)->language.
	(auto_load_objfile_script): Change parameter suffix to language.
	Remove the call of maybe_add_script.
	Call language->source_script_for_objfile.
	(load_auto_scripts_for_objfile, struct collect_matching_scripts_data):
	New.
	(collect_matching_scripts): Adjust it for
	struct collect_matching_scripts_data.
	(auto_load_info_scripts_pattern_nl): New variable.
	(info_auto_load_scripts): Rename to ...
	(auto_load_info_scripts): ... here, add parameter language.  Adjust it
	for struct collect_matching_scripts_data.
	(info_auto_load_gdb_scripts, info_auto_load_local_gdbinit)
	(set_auto_load_cmd, auto_load_set_cmdlist_get, show_auto_load_cmd)
	(auto_load_show_cmdlist_get, info_auto_load_cmd)
	(auto_load_info_cmdlist_get): New.
	(_initialize_auto_load): Move add_info of "auto-load-scripts" to
	python/py-auto-load.c.  New installment for "set auto-load gdb-scripts",
	"info auto-load gdb-scripts", "set auto-load local-gdbinit" and
	"info auto-load local-gdbinit".
	* auto-load.h (struct script_language): New.
	(gdbpy_global_auto_load): Rename to ...
	(global_auto_load): ... here.
	(auto_load_local_gdbinit, auto_load_local_gdbinit_pathname)
	(auto_load_local_gdbinit_loaded): New declarations.
	(maybe_add_script): New parameter language.
	(auto_load_objfile_script): Change parameter suffix to language.
	(load_auto_scripts_for_objfile, auto_load_info_scripts_pattern_nl)
	(auto_load_info_scripts, auto_load_set_cmdlist_get)
	(auto_load_show_cmdlist_get, auto_load_info_cmdlist_get): New
	declarations.
	* linux-thread-db.c: Include auto-load.h and ctype.h.
	(auto_load_thread_db, show_auto_load_thread_db): New.
	(struct thread_db_info): New field filename.
	(delete_thread_db_info): Call xfree for FILENAME.
	(try_thread_db_load): Initialize FILENAME.
	(try_thread_db_load_from_pdir, try_thread_db_load_from_dir): Return
	if !AUTO_LOAD_THREAD_DB.
	(info_auto_load_libthread_db_compare, info_auto_load_libthread_db): New.
	(_initialize_thread_db): Install auto_load_thread_db
	as "set auto-load libthread-db" and install info_auto_load_libthread_db
	as "info auto-load libthread-db".
	* main.c (captured_main): Rename gdbpy_global_auto_load to
	global_auto_load.  Initialize AUTO_LOAD_LOCAL_GDBINIT_PATHNAME and
	AUTO_LOAD_LOCAL_GDBINIT_LOADED.
	(print_gdb_help): Extend the help for 'local init file'.
	* python/py-auto-load.c: Remove a comment about gdb scripts extension.
	(GDBPY_AUTO_SECTION_NAME): Extend the comment it is Python specific.
	(auto_load_scripts): Rename to ...
	(auto_load_python_scripts): ... here, update the comment.
	(gdbpy_load_auto_script_for_objfile): New declaration.
	(show_auto_load_python_scripts, script_language_python)
	(gdbpy_load_auto_script_for_objfile): New.
	(source_section_scripts): Refactor the code.
	(load_auto_scripts_for_objfile): Rename to ...
	(gdbpy_load_auto_scripts_for_objfile): ... here, update the
	auto_load_objfile_script caller, drop GDBPY_GLOBAL_AUTO_LOAD checking.
	(info_auto_load_python_scripts): New.
	(gdbpy_initialize_auto_load): New variables cmd and cmd_name.
	Rename "set auto-load-scripts" to "set auto-load python-scripts".
	Register "set auto-load-scripts" as its deprecated alias.  Register
	"info auto-load python-scripts".  Register "info auto-load-scripts" as
	its deprecated alias.
	(load_auto_scripts_for_objfile): Rename to ...
	(gdbpy_load_auto_scripts_for_objfile): ... here.
	* python/python.h (load_auto_scripts_for_objfile): Rename to ...
	(gdbpy_load_auto_scripts_for_objfile): ... here.

gdb/doc/
	auto-load: Implementation.
	* gdb.texinfo (Mode Options): New anchor for -nx.
	(Startup): New anchors for Option -init-eval-command,
	Home Directory Init File
	and Init File in the Current Directory during Startup.
	Mention set auto-load local-gdbinit with a reference.
	Change the sample code to "set auto-load python-scripts".
	(Threads): New anchor set libthread-db-search-path.
	Provide references to libthread_db.so.1 file.
	(Controlling GDB): New menu item for Auto-loading.
	(Auto-loading, Init File in the Current Directory)
	(libthread_db.so.1 file, objfile-gdb.gdb file): New nodes.
	(Python): Rename the menu item Auto-loading to Python Auto-loading.
	(Writing a Pretty-Printer, Objfiles In Python): Update the renamed
	reference.
	(Auto-loading): Rename to ...
	(Python Auto-loading): ... here.  Change "set auto-load-scripts" to
	"set auto-load python-scripts", new anchor for it.  Change
	"show auto-load-scripts" to "show auto-load python-scripts", new anchor
	for it.  Change "info auto-load-scripts"
	to "info auto-load python-scripts", new anchor for it.  Change "scripts"
	to "Python scripts".

gdb/testsuite/
	auto-load: Implementation.
	* gdb.base/help.exp (test set height): Increase the height.
	* gdb.python/py-objfile-script.exp (info auto-load-scripts): Change
	to ...
	(info auto-load python-scripts): ... here.
	* gdb.python/py-section-script.exp (info auto-load-scripts *): Change
	to ...
	(info auto-load python-scripts *): ... here.
2012-04-17 15:51:48 +00:00
Jan Kratochvil e2207b9a28 gdb/
auto-load: Move files.
	* Makefile.in (SFILES): Add auto-load.c.
	(HFILES_NO_SRCDIR): Add auto-load.h.
	(COMMON_OBS): Add auto-load.o.
	(distclean): Change .gdbinit for gdb-gdb.gdb.
	* auto-load.c: New file, with parts from python/py-auto-load.c.
	* auto-load.h: New file, with parts from python/python.h.
	* configure: Regenerate.
	* configure.ac (AC_OUTPUT): Change .gdbinit for gdb-gdb.gdb.
	* gdb-gdb.gdb.in: New file, renamed from gdbinit.in.
	* gdbinit.in: Remove file, rename it to gdb-gdb.gdb.in.
	* main.c: Include auto-load.h.
	* python/py-auto-load.c: Move include filenames.h, gdb_regex.h,
	command.h, observer.h and progspace.h to auto-load.c.  Add include
	auto-load.h.
	(gdbpy_global_auto_load, struct auto_load_pspace_info)
	(struct loaded_script, auto_load_pspace_data)
	(auto_load_pspace_data_cleanup, get_auto_load_pspace_data)
	(hash_loaded_script_entry, eq_loaded_script_entry)
	(init_loaded_scripts_info, get_auto_load_pspace_data_for_loading)
	(maybe_add_script): Move to auto-load.c.
	(source_section_scripts): Change maybe_add_script parameters passing,
	use script_not_found_warning_print.
	(clear_section_scripts, auto_load_objfile_script)
	(auto_load_new_objfile, loaded_script_ptr)
	(DEF_VEC_P (loaded_script_ptr), collect_matching_scripts, print_script)
	(sort_scripts_by_name, info_auto_load_scripts): Move to auto-load.c.
	(gdbpy_initialize_auto_load): Move auto_load_pspace_data,
	auto_load_new_objfile and info_auto_load_scripts initizations to
	auto-load.c.
	* python/python.h (gdbpy_global_auto_load): Move to auto-load.h.
2012-04-17 15:49:16 +00:00
Jan Kratochvil e4ab2fad14 gdb/
Code cleanup.
	* charset.c (find_charset_names): Remove variables ix and elt.
	Use free_char_ptr_vec.
	* elfread.c (build_id_to_debug_filename): New variables debugdir_vec,
	back_to and ix.  Use dirnames_to_char_ptr_vec.  Remove variable
	debugdir_end.  New variable debugdir_len.
	* gdb_vecs.h (free_char_ptr_vec, make_cleanup_free_char_ptr_vec)
	(dirnames_to_char_ptr_vec_append, dirnames_to_char_ptr_vec): New
	declarations.
	* progspace.c (clear_program_space_solib_cache): Remove variables ix
	and elt.  Use free_char_ptr_vec.
	* source.c (add_path): Remove variables argv, arg and argv_index.
	New variables dir_vec, back_to, ix and name.
	Use dirnames_to_char_ptr_vec_append.  Use freeargv instead of
	make_cleanup_freeargv.  Remove variable separator.  Simplify the code
	no longer expecting DIRNAME_SEPARATOR.
	(openp): Remove variable p, p1 and len.  New variables dir_vec,
	back_to, ix and dir.  Use dirnames_to_char_ptr_vec.  Simplify the code
	no longer expecting DIRNAME_SEPARATOR.
	* symfile.c (find_separate_debug_file): New variables debugdir_vec,
	back_to and ix.  Use dirnames_to_char_ptr_vec.  Remove variable
	debugdir_end.
	* utils.c (free_char_ptr_vec, do_free_char_ptr_vec)
	(make_cleanup_free_char_ptr_vec, dirnames_to_char_ptr_vec_append)
	(dirnames_to_char_ptr_vec): New functions.
2012-04-17 15:47:09 +00:00
Jan Kratochvil 5ee4ed9f2e gdb/
Code cleanup.
	* source.c (add_path): Remove always true conditional 'p == 0' and
	unindent its code block.
2012-04-17 15:45:12 +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
Jan Kratochvil 945b3a3230 gdb/
Do not rely on FIELD_LOC_KIND_BITPOS being zero.
	* ada-lang.c (ada_template_to_fixed_record_type_1): Replace
	TYPE_FIELD_BITPOS used as lvalue by SET_FIELD_BITPOS.
	* gdbtypes.c (append_flags_type_flag): Likewise, twice.
	* jv-lang.c (java_link_class_type): Likewise, once.
	* stabsread.c (read_enum_type): Likewise.
2012-04-17 12:43:20 +00:00
gdbadmin f3e8aed339 *** empty log message *** 2012-04-17 00:00:33 +00:00
Yao Qi 80d269391b gdb/gdbserver/
* tracepoint.c (cmd_qtstart): Download tracepoints even when they are
	duplicated on address.
2012-04-16 15:38:53 +00:00
Yao Qi c0d4d1c0f8 gdb/testsuite/
* lib/trace-support.exp (get_in_proc_agent): New.
	* gdb.trace/change-loc.exp: Call get_in_proc_agent to get the location
	of in process trace agent.
	* gdb.trace/ftrace.exp: Likewise.
	* gdb.trace/pending.exp: Likewise.
	* gdb.trace/trace-break.exp: Likewise.
	* gdb.trace/trace-mt.exp
	* gdb.trace/tspeed.exp: Likewise.
	* gdb.trace/tstatus.exp
	* gdb.trace/strace.exp: Likewise.
2012-04-16 11:29:08 +00:00
Yao Qi 42476b702c gdb/
* common/agent.c (agent_run_command): Add one more parameter `len'.
	Update callers.
	* common/agent.h: Update declaration.
	* linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
	Update.
	(linux_child_static_tracepoint_markers_by_strid): Ditto.

gdb/gdbserver/

	* tracepoint.c (COPY_FIELD_TO_BUF): New macro.
	(struct tracepoint_action_ops) <send>: New field.
	(m_tracepoint_action_send, r_tracepoint_action_send): New.
	(agent_expr_send, x_tracepoint_action_send): New.
	(l_tracepoint_action_send): New.
	(cmd_qtdp): Download and install tracepoint
	according to `use_agent'.
	(run_inferior_command): Add one more parameter `len'.
	Update callers.
	(tracepoint_send_agent): New.
	(cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
2012-04-16 11:24:47 +00:00
Yao Qi 7bc8363907 gdb/gdbserver/
* tracepoint.c (download_tracepoints): Moved to ...
	(cmd_qtstart): ... here.
2012-04-16 11:16:30 +00:00
Thomas Schwinge dd6d3b70d9 gdb/testsuite/
* gdb.asm/sh.inc (gdbasm_startup): Only set up the stack pointer if the
	symbol _stack is defined.  Get rid of a hard-coded constant for _stack.
2012-04-16 08:02:09 +00:00
Thomas Schwinge cbf68a605b gdb/testsuite/
* gdb.asm/sh.inc (gdbasm_end) <.size>: Refer to the function's name.
2012-04-16 07:59:51 +00:00
gdbadmin 9037154efd *** empty log message *** 2012-04-16 00:00:33 +00:00
gdbadmin 7f21a1d23d *** empty log message *** 2012-04-15 00:00:32 +00:00
Anton Gorenkov 8264ba82b7 gdb/doc/ChangeLog:
2012-04-14  Anton Gorenkov <xgsa@yandex.ru>

	PR mi/13393
	* gdb.texinfo (Print Settings): Extend the description for "set print
	object".
	(GDB/MI Variable Objects): Extend the description for -var-create and
	-var-list-children.


gdb/testsuite/ChangeLog:

2012-04-14  Anton Gorenkov <xgsa@yandex.ru>

	PR mi/13393
	* gdb.mi/mi-var-rtti.cc: New file.
	* gdb.mi/mi-var-rtti.exp: New file.
	* lib/mi-support.exp (mi_varobj_update_with_child_type_change): New
	function.
	(mi_varobj_update_with_type_change): updated to avoid code duplication.


gdb/ChangeLog:

2012-04-14  Anton Gorenkov <xgsa@yandex.ru>

	PR mi/13393
	* value.c (value_actual_type): New function.
	* value.h (value_actual_type): New declaration.
	* varobj.c (update_type_if_necessary): New function.
	(varobj_create): Call value_actual_type instead of
	value_type.
	(install_dynamic_child): distinct changed and type changed MI variable
	objects.
	(update_dynamic_varobj_children): Updated for install_dynamic_child
	change.  All callers updated.
	(varobj_update): Support for MI variable object type change if
	the value changed and RTTI is used to determine the type.
	(create_child_with_value): Call value_actual_type instead of
	value_type.
	(adjust_value_for_child_access): Extended with a new parameter which
	specify whether the given value should be casted to enclosing type.
	All callers updated.
2012-04-14 12:18:50 +00:00
Yao Qi 5f18041e78 gdb/gdbserver/
* tracepoint.c: Include inttypes.h.
	(struct collect_memory_action): Use sized types.
	(struct tracepoint): Likewise.
	(cmd_qtdp, stop_tracing): Update print specifiers.
	(cmd_qtp, response_tracepoint): Likewise.
	(collect_data_at_tracepoint): Likewise.
	(collect_data_at_step): Likewise.
2012-04-14 05:36:24 +00:00
Yao Qi 55a8c0761d gdb/
Import gnulib module inttypes from git
	(250b80067c1e1d8faa0c42fb572f721975b929c5)
	* Makefile.in (HFILES_NO_SRCDIR): Add gnulib/inttypes.in.h.
	(aclocal_m4_deps): Add gnulib/m4/inttypes.m4 and gnulib/m4/inttypes-pri.m4
	* aclocal.m4, config.in, configure: Regenerated.
	* gnulib/Makefile.am: Update.
	* gnulib/Makefile.in: Update.
	* gnulib/m4/gnulib-cache.m4: Update.
	* gnulib/m4/gnulib-comp.m4: Update.
	* gnulib/inttypes.in.h: New.
	* gnulib/m4/inttypes-pri.m4: New.
 	* gnulib/m4/inttypes.m4: New.

gdb/gdbserver/
	Import gnulib module inttypes.
	* aclocal.m4, config.in, configure: Regenerated.
2012-04-14 05:24:57 +00:00
Yao Qi dc750257de gdb/gdbserver/
* Makefile.in (maintainer-clean, realclean, distclean): Remove
	Makefile and config.status at last.
2012-04-14 04:14:04 +00:00
Yao Qi 0ab5faf998 gdb/gdbserver/
* tracepoint.c: Include stdint.h unconditionally.
2012-04-14 04:10:04 +00:00
gdbadmin 352e374d69 *** empty log message *** 2012-04-14 00:00:33 +00:00
Luis Machado ca7781d2ae 2012-04-13 Luis Machado <lgustavo@codesourcery.com>
* infrun.c (resume): Update PC address to the real PC after
	preparing to do displaced stepping.
2012-04-13 20:46:42 +00:00
Thiago Jung Bauermann 18f5fd8146 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
on BFD_HAVE_SYS_PROCFS_TYPE.
	* configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
	* configure: Regenerate.
	* config.in: Likewise.
2012-04-13 19:56:05 +00:00
H.J. Lu 4d47af5cf2 Enable x32 support in gdbserver
* Makefile.in (clean): Also remove x32.c x32-linux.c
	x32-avx.c x32-avx-linux.c.
	(x32.o): New target.
	(x32.c): Likewise.
	(x32-linux.o): Likewise.
	(x32-linux.c): Likewise.
	(x32-avx.o): Likewise.
	(x32-avx.c): Likewise.
	(x32-avx-linux.o): Likewise.
	(x32-avx-linux.c): Likewise.

	* configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
	(srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
	(srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
	(srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
	(srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
	i386/x32-avx-linux.xml.

	* linux-x86-low.c (init_registers_x32_linux): New prototype.
	(init_registers_x32_avx_linux): Likwise.
	(x86_linux_update_xmltarget): Call init_registers_x32_linux
	or init_registers_x32_avx_linux if linux_is_elf64 is false.
2012-04-13 14:39:41 +00:00
Pedro Alves ecedbe5852 2012-04-13 Pedro Alves <palves@redhat.com>
* Makefile.in (GNULIB_FLAGS_TO_PASS): New.
	(FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
	(all, uninstall, clean-info, all-lib, clean, maintainer-clean)
	(realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
	the sub-make.
2012-04-13 13:12:33 +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
gdbadmin 459a2423c9 *** empty log message *** 2012-04-13 00:00:03 +00:00
H.J. Lu c92b51775c Convert siginfo for x32 in gdbserver
* linux-x86-low.c (compat_x32_clock_t): New.
	(compat_x32_siginfo_t): Likewise.
	(compat_x32_siginfo_from_siginfo): Likewise.
	(siginfo_from_compat_x32_siginfo): Likewise.
	(linux_is_elf64): Likewise.
	(x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
	and siginfo_from_compat_x32_siginfo for x32.
	(x86_arch_setup): Set linux_is_elf64.
2012-04-12 21:06:12 +00:00
H.J. Lu 214d508ee1 Check if GDBserver is compatible with process
PR gdb/13969
	* linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
	e_machine field.
	(linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
	* linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
	* linux-x86-low.c (x86_arch_setup): Check if GDBserver is
	compatible with process.
2012-04-12 15:35:32 +00:00
Yao Qi c9a1864ab2 gdb/gdbserver/
* Makefile.in: Define abs_top_srcdir and abs_srcdir.
	(INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
	(install-only, install-info, clean): Handle sub dir gnulib.
	(all-lib, am--refresh): New targets.
	(memmem.o): Remove target.
	* configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
	Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
	(AC_REPLACE_FUNCS): Remove memmem.
	Invoke gl_INIT and AM_INIT_AUTOMAKE.
	(AC_OUTPUT): Generate Makefile in gnulib/.
	* aclocal.m4, config.in, configure: Regenerated.
2012-04-12 11:11:01 +00:00
Mark Kettenis 15add3f5e4 * i386bsd-nat.c (_initialize_i386bsd_nat): Add missing prototype. 2012-04-12 10:32:23 +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
Yao Qi 248fd3bfb3 gdb/
* remote.c (async_remote_interrupt): Correct function name in
	debug message.
	(async_remote_interrupt_twice): Ditto.
2012-04-12 00:56:05 +00:00
gdbadmin 737328011e *** empty log message *** 2012-04-12 00:00:02 +00:00
Doug Evans bc3aa6c300 * source.c (find_and_open_source): Consistently pass resulting
full path through xfullpath.
2012-04-11 18:37:14 +00:00
Jan Kratochvil 9e529e1d3d gdb/
Provide more specific displaced-stepping memory error message.
	* infrun.c (displaced_step_prepare): New variable status.  Call
	target_read_memory instead of read_memory, provide more specific
	error message.
2012-04-11 16:58:57 +00:00
Tristan Gingold 82e0cec1e5 2012-04-11 Tristan Gingold <gingold@adacore.com>
PR gdb/13901
	* darwin-nat.c (darwin_execvp): Revert previous patch.
2012-04-11 13:42:44 +00:00
Tristan Gingold d987a26657 2012-04-11 Tristan Gingold <gingold@adacore.com>
PR gdb/13901
	* darwin-nat.c (darwin_resume_thread): Call darwin_set_sstep only
	in case of change.
2012-04-11 13:17:05 +00:00
Tristan Gingold 016b743085 2012-04-11 Tristan Gingold <gingold@adacore.com>
* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Fix
	warning.
2012-04-11 09:52:12 +00:00
Siva Chandra Reddy de0919f8d1 Fixed a couple of ChangeLog entries. 2012-04-11 06:26:54 +00:00
Siva Chandra Reddy 06fc020f10 2012-04-02 Siva Chandra Reddy <sivachandra@google.com>
New command 'explore' which helps explore values and types in
	scope.
	* NEWS: Add an entry about the new 'explore' command.
	* data-directory/Makefile.in: Add gdb/command/explore.py
	* python/lib/gdb/command/explore.py: Implemention of the 'explore'
	command using the GDB Python API.

	* doc/gdb.texinfo (Examining Data): Document the 'explore'
	command.

	* testsuite/gdb.python/Makefile.in: Add py-explore to EXECUTABLES.
	* testsuite/gdb.python/py-explore.c: C program used for testing
	the new 'explore' command on C constructs.
	* testsuite/gdb.python/py-explore.cc: C++ program used for testing
	the new 'explore' command on C++ constructs.
	* testsuite/gdb-python/py-explore.exp: Tests for the new 'explore'
	command on C constructs.
	* testsuite/gdb-python/py-explore-cc.exp: Tests for the new
	'explore' command on C++ constructs.
2012-04-11 05:50:44 +00:00
gdbadmin 85be3bd58e *** empty log message *** 2012-04-11 00:00:02 +00:00
Maciej W. Rozycki 34b192ce9c * mips-tdep.c (mips_skip_pic_trampoline_code): Correct sign
extension in jump target calculation.
2012-04-10 23:06:57 +00:00
Maciej W. Rozycki 9e8da49c01 * mips-tdep.c (mips32_next_pc): Handle JALX. 2012-04-10 22:54:24 +00:00
Yao Qi 2f26ef89d8 gdb/
* Makefile.in (gnulib/Makefile): Remove duplicated dependency.
2012-04-10 22:48:41 +00:00
Yao Qi 2e505b667d gdb/
* Makefile.in (aclocal_m4_deps): Add gnulib/m4/gnulib-cache.m4
	and gnulib/m4/gnulib-tool.m4.
2012-04-10 22:46:13 +00:00
Maciej W. Rozycki 367ba2c262 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP. 2012-04-10 22:33:13 +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
H.J. Lu 9a82b8ff87 Add x32 XML files
* features/Makefile (WHICH): Add i386/x32, i386/x32-linux,
	i386/x32-avx and i386/x32-avx-linux.
	(i386/x32-expedite): New.
	(i386/x32-linux-expedite): Likewise.
	(i386/x32-avx-expedite): Likewise.
	(i386/x32-avx-linux-expedite): Likewise.
	($(outdir)/i386/x32.dat): Likewise.
	($(outdir)/i386/x32-linux.dat): Likewise.
	($(outdir)/i386/x32-avx.dat): Likewise.
	($(outdir)/i386/x32-avx-linux.dat): Likewise.

	* features/i386/x32-avx-linux.xml: New file.
	* features/i386/x32-avx.xml: Likewise.
	* features/i386/x32-core.xml: Likewise.
	* features/i386/x32-linux.xml: Likewise.
	* features/i386/x32.xml: Likewise.

	* features/i386/x32-avx-linux.c: New.  Generated.
	* features/i386/x32-avx.c: Likewise.
	* features/i386/x32-linux.c: Likewise.
	* features/i386/x32.c: Likewise.
	* regformats/i386/x32-avx-linux.dat: Likewise.
	* regformats/i386/x32-avx.dat: Likewise.
	* regformats/i386/x32-linux.dat: Likewise.
	* regformats/i386/x32.dat: Likewise.
2012-04-10 15:44:24 +00:00
Tristan Gingold ee41036f97 2012-04-10 Tristan Gingold <gingold@adacore.com>
* darwin-nat.c (darwin_kill_inferior): Always use the no ptrace
	code to kill the inferior.
2012-04-10 15:31:29 +00:00
gdbadmin eea7714332 *** empty log message *** 2012-04-10 00:00:33 +00:00
Mark Kettenis a7aa5b8aef * ada-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* c-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* cp-name-parser.y (yyss, yysslim, yyssp, yystacksize, yyvs)
(yyvsp): New defines.
* f-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* jv-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* m2-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* objc-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
* p-exp.y (yyss, yysslim, yyssp, yystacksize, yyvs, yyvsp): New
defines.
2012-04-09 17:07:43 +00:00
Mark Kettenis fb57d4525b * sparc64-tdep.c (sparc64_store_arguments)
(sparc64_store_arguments): Fix coding style.
2012-04-09 09:16:58 +00:00
gdbadmin 4f25f96698 *** empty log message *** 2012-04-09 00:00:03 +00:00
Mark Kettenis cdc7b32f78 * sparc64-tdep.c (sparc64_store_arguments): Fix handling of
complex floats, adjust some related comments and tighten a related
assertion.
(sparc64_extract_return_value): Handle complex floats.
2012-04-08 05:42:53 +00:00
gdbadmin 0428998ead *** empty log message *** 2012-04-08 00:00:32 +00:00
Mark Kettenis a82da7dde5 * gdb.base/funcargs.exp (complex_args): Fix typo. 2012-04-07 20:01:59 +00:00
Doug Evans 7adf1e79ca * dwarf2read.c (load_partial_dies): Change condition to assert. 2012-04-07 19:35:17 +00:00
gdbadmin 4b4c90f595 *** empty log message *** 2012-04-07 00:00:33 +00:00
Doug Evans 50f1ae7b0c * amd64-tdep.c (amd64_analyze_prologue): Recognize both variations of
"mov %rsp,%rbp".
2012-04-06 21:52:22 +00:00
Jan Kratochvil e127cba831 gdb/testsuite/
* gdb.trace/change-loc.exp (tracepoint_change_loc_1)
	(tracepoint_change_loc_2): Accept both orders of pending set_tracepoint.
2012-04-06 06:42:08 +00:00
gdbadmin 1acd2a3a57 *** empty log message *** 2012-04-06 00:00:02 +00:00
Kevin Buettner 55fa75c335 * v850-tdep.c (E_NUM_OF_V850_REGS, E_NUM_OF_V850E_REGS): Fix
fencepost error.
	(v850_frame_cache): Use gdbarch_num_regs() instead of E_NUM_REGS.
	(v850_gdbarch_init): Set `num_regs' as appropriate for the
	architecture.
2012-04-05 23:55:03 +00:00
Keith Seitz 40e084e177 linespec rewrite:
* linespec.c (decode_compound): Remove.
	(enum offset_relative_sign): New enum.
	(struct line_offset): New struct.
	(struct linespec): New struct.
	(struct linespec_state): Move file_symtabs,
	user_filename, and user_function into struct linespec.
	Make result an anonymous struct holding vectors of
	symbolp and minsym_and_objfile_d.
	Add language member.
	(enum ls_token_type): New enum.
	(linespec_keywords): New array.
	(struct ls_token): New struct.
	(struct ls_parser): New struct.
	(linespec_lexer_lex_number): New function.
	(linespec_lexer_lex_keyword): New function.
	(is_ada_operator): New function.
	(skip_quote_char): New function.
	(copy_token_string): New function.
	(is_closing_quote_enclosed): New function.
	(find_parameter_list_end): New function.
	(linespec_lexer_lex_string): New function.
	(linespec_lexer_lex_one): New function.
	(linespec_lexer_consume_token): New function.
	(linespec_lexer_peek_token): New function.
	(cplusplus_error): Remove unused function.
	(find_methods): Update comment.
	(find_toplevel_char): Return const.
	(is_objc_method_format): Remove unused function.
	(find_toplevel_string): New function.
	(is_linespec_boundary): Remove.
	(symbol_not_found_error): New function.
	(find_method_overload_end): Remove function.
	(unexpected_linespec_error): New function.
	(keep_name_info): Remove.
	(linespec_parse_line_offset): New function.
	(linespec_parse_basic): New function.
	(canonicalize_linespec): New function.
	(decode_line_internal): Remove.
	(create_sals_line_offset): New function adapted from
	decode_all_digits.
	(convert_linespec_to_sals): New function.
	(parse_linespec): New function.
	(linespec_parser_new): New function.
	(linespec_state_destructor): Change parameter type to
	struct linespec_state *.
	Add language parameter.
	Remove freeing of moved members.
	(linespec_parser_delete): New function.
	(decode_line_full): Use parse_linespec and linespec_parser_new.
	(decode_line_1): Likewise.
	(decode_indirect): Rename to ...
	(linespec_expression_to_pc): ... this and rewrite
	to simply find CORE_ADDR, storing this result for later
	conversion to SALs.
	(locate_first_half): Remove.
	(deocde_objc): Add parameter LS.
	Initialize new struct collect_info members.
	Handle minimal symbols, too.
	(decode_compound): Delete.
	(lookup_prefix_sym): Rewrite.
	(compare_msymbols): New function.
	(find_method): Rewrite.
	Do not call cplusplus_error.
	(symtabs_from_filename): Rewrite.
	(collect_function_symbols): Delete.
	(find_function_symbols): Rewrite without ARGPTR-style
	processing.
	(decode_all_digits): Delete. (Rewritten as create_sals_line_offset.)
	(decode_dollar): Adapted and renamed to ...
	(linespec_parse_variable): ... this.
	(find_linespec_symbols): New function.
	(decode_label): Adapted and renamed to ...
	(find_label_symbols): ... this.
	(decode_digits_list_mode): Add and use LS argument.
	(decode_digits_ordinary): Likewise.
	(collect_symbols): Do not collect SALs, just symbols and msymbols.
	If in list mode, allow any symbol class.  Otherwise, only
	permit LOC_BLOCK symbols.
	(minsym_found): Update comments.
	(search_minsyms_for_name): Do not convert the matching symbol
	into a SAL.  Simply push the symbol and objfile into the
	result vector.
	(decode_variable): Delete. Contents adapted into
	find_linespec_symbols.

	* cp-support.c (SKIP_SPACE): Remove.
	(operator_tokens): Remove unused global.
	(cp_validate_operator): Remove.
	* cp-support.h (cp_validate_operator): Remove declaration.

	* gdb.base/advance.exp: Update error message for
	"advance malformed" test.
	* gdb.base/break.exp: Likewise for "breakpoint with
	trailing garbage" test.
	* gdb.base/hbreak2.exp: Likewise for "hardware breakpoint
	with trailing garbage" test.
	* gdb.base/jump.exp: Likewise for "jump with trailing
	argument junk" test.
	* gdb.base/sepdebug.exp: Likewise for "breakpoint with
	trailng garbage" test.
	* gdb.base/until.exp: Likewise for "malformed until" test.
	* gdb.cp/ovldbreak.exp: Create the breakpoint table
	for "breakpoint info (after setting on all)".
	* gdb.cp/userdef.exp: Remove quoting for "break A2::operator+"
	tests.
	* gdb.cp/cplabel.cc: New file.
	* gdb.cp/cplabel.exp: New test.
	* gdb.linespec/ls-errs.c: New file.
	* gdb.linespec/ls-errs.exp: New test.
2012-04-05 18:50:29 +00:00
Pedro Alves 9d236627e7 2012-04-05 Pedro Alves <palves@redhat.com>
-Werror=strict-aliasing

	* spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
	pointer.
2012-04-05 11:20:50 +00:00
gdbadmin 22d7ed11a0 *** empty log message *** 2012-04-05 00:00:02 +00:00
Pedro Alves 111217b396 2012-04-04 Pedro Alves <palves@redhat.com>
* linux-sparc-low.c (sparc_fill_gregset_to_stack)
	(sparc_store_gregset_from_stack, sparc_store_gregset)
	(sparc_breakpoint_at): Fix formatting.
2012-04-04 14:42:15 +00:00
gdbadmin 6199fcc3a2 *** empty log message *** 2012-04-04 00:00:32 +00:00
Jan Kratochvil a72c8f6a29 gdb/
* cp-valprint.c (cp_print_value_fields): Check valprint_check_validity
	for TYPE_VPTR_FIELDNO.
	* valprint.c (valprint_check_validity): Make it global, move the
	function comment ...
	* value.h (valprint_check_validity): ... to this new declaration.

gdb/testsuite/
	* gdb.trace/unavailable.exp
	(collect globals: print object on: print derived_partial)
	(collect globals: print object on: print derived_whole)
	(collect globals: print object off: print derived_partial)
	(collect globals: print object off: print derived_whole): Update
	expected output.
2012-04-03 14:39:55 +00:00
gdbadmin 2d0e589624 *** empty log message *** 2012-04-03 00:00:32 +00:00
Tristan Gingold cf9bb588b3 2012-04-02 Tristan Gingold <gingold@adacore.com>
* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Use
	the STATE32 api for i386 state.
	(i386_darwin_store_inferior_registers): Likewise.
2012-04-02 13:48:49 +00:00
Tristan Gingold 170923983d 2012-04-02 Tristan Gingold <gingold@adacore.com>
* i386-darwin-tdep.c (i386_darwin_thread_state_reg_offset): Fix
	SS offset.
	* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Fix
	format_string.
2012-04-02 13:15:48 +00:00
Tristan Gingold ece0061f93 2012-04-02 Tristan Gingold <gingold@adacore.com>
PR gdb/13901
	* darwin-nat.c (darwin_execvp): Sey binary preference.
2012-04-02 11:57:30 +00:00
Jan Kratochvil cf65ecd3b9 gdb/
* NEWS (set breakpoint condition-evaluation): Use imperative mood.
2012-04-02 07:32:31 +00:00
gdbadmin 6934ecc09a *** empty log message *** 2012-04-02 00:00:33 +00:00
gdbadmin 677e6c3fef *** empty log message *** 2012-04-01 00:00:33 +00:00
gdbadmin 3685f77167 *** empty log message *** 2012-03-31 00:00:33 +00:00
Thiago Jung Bauermann 8365dcf5f8 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
are available.
	* linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
	[HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
	* config.in: Regenerate.
	* configure: Likewise.
2012-03-30 20:23:16 +00:00
Tom Tromey 9bc3523d11 * python/python.c (gdbpy_decode_line): Move cleanup creation out
of TRY_CATCH.  Fix error handling.
	* python/py-value.c (convert_value_from_python): Move 'old'
	declaration to innermost scope.
2012-03-30 20:05:55 +00:00
Keith Seitz f87a302320 * gdb.python: Add test for linespecs with commas. 2012-03-30 19:16:52 +00:00
gdbadmin 83deda5d8b *** empty log message *** 2012-03-30 00:00:02 +00:00
Joel Brobecker b1ed564ad0 Rename variables in ada-lang.c:ada_make_symbol_completion_list.
This renaming allows us to have variable names that are consistent
with the names of the parameters in the functions where these
variables are used.  This also allows us to avoid a -Wshadow warning
in the case of variable "wild_match", which is now renamed to
"wild_match_p".

gdb/ChangeLog:

        -Wshadow warning fix.
        * ada-lang.c (ada_make_symbol_completion_list): Rename parameters
        "wild_match" and "encoded" into "wild_match_p" and "encoded_p".
        Adjust code accordingly.
2012-03-29 23:30:55 +00:00
Joel Brobecker cb8e9b977e Rename "encoded" parameter in ada-lang.c:symbol_completion_add...
... This is mostly to be consistent with the style used for the other
parameter of the same kind ("wild_match_p") in that function.

gdb/ChangeLog:

        * ada-lang.c (symbol_completion_add): Rename parameter
        "encoded" into "encoded_p".  Ajust code and documentation
        accordingly.
2012-03-29 23:30:46 +00:00
Joel Brobecker c0af17067c Rename "wild_match" parameter in ada-lang.c:symbol_completion_add...
... to avoid a -Wshadow warning.

gdb/ChangeLog:

        -Wshadow warning fix.
        * ada-lang.c (symbol_completion_add): Rename parameter
        "wild_match" into wild_match_p.  Update code and documentation
        accordingly.
2012-03-29 23:30:38 +00:00
Joel Brobecker 6ea35997bf Rename "encoded" parameter in ada-lang.c:symbol_completion_match...
... This is mostly to be consistent with the style used for the other
parameter of the same kind ("wild_match_p") in that function.

gdb/ChangeLog:

        * ada-lang.c (symbol_completion_match): Rename parameter
        "encoded" into "encoded_p".  Ajust code and documentation
        accordingly.
2012-03-29 23:30:29 +00:00
Joel Brobecker e701b3c0f9 Rename "wild_match" parameter in ada-lang.c:symbol_completion_match
gdb/ChangeLog:

        -Wshadow warning fix.
        * ada-lang.c (symbol_completion_match): Rename parameter
        "wild_match" into "wild_match_p".  Adjust code and function
        documentation accordingly.
2012-03-29 23:30:21 +00:00
Joel Brobecker 5e2336be92 rename "symbol_info" to "sym_info" in ada-lang.c...
... to avoid a -Wshadow warning with a symbol exported by BFD.

gdb/ChangeLog:

        -Wshadow warning fix.
        * ada-lang.c (ada_lookup_encoded_symbol): Rename parameter
        "symbol_info" into "info".  Adjust code accordingly.
        (ada_lookup_symbol): Likewise.
2012-03-29 23:30:13 +00:00
Joel Brobecker 9f88c95977 Minor reformatting of ada_lookup_symbol_list's documentation.
This patch mostly removes a few trailing spaces.

gdb/ChangeLog:

        * ada-lang.c (ada_lookup_symbol_list): Minor reformatting
        of this function's documentation.
2012-03-29 23:30:04 +00:00
Joel Brobecker 82ccd55ec1 Rename "wild_match" variable in ada-lang.c:ada_lookup_symbol_list
... to avoid -Wshadow warning...

gdb/ChangeLog:

        -Wshadow warning fix.
        * ada-lang.c (ada_lookup_symbol_list): Rename "wild_match"
        variable into "wild_match_p".  Adjust code accordingly.
2012-03-29 23:29:56 +00:00
Joel Brobecker d0a8ab18c7 Rename "wild_match" parameter in ada-lang.c:ada_add_local_symbols
... to avoid -Wshadow warning...

gdb/ChangeLog:

        -Wshadow warning fix.
        * ada-lang.c (ada_add_local_symbols): Rename "wild_match"
        parameter into "wild_match_p".  Adjust code accordingly.
        Document this parameter in the function description.
2012-03-29 23:29:47 +00:00
Joel Brobecker 48b7833268 Rename "wild_match" parameter in add_symbols_from_enclosing_procs
gdb/ChangeLog:

        -Wshadow warning fix.
        * ada-lang.c (add_symbols_from_enclosing_procs): Rename
        "wild_match" parameter to "wild_match_p" (-Wshadow).
2012-03-29 23:29:37 +00:00
Joel Brobecker 2e6e035354 Remove trailing spaces in ada-lang.c:ada_lookup_simple_minsym doc.
gdb/ChangeLog:

        * ada-lang.c (ada_lookup_simple_minsym): Remove trailing spaces
        in function documentation.
2012-03-29 23:29:28 +00:00
Joel Brobecker dc4024cd3f Fix -Wshadow warning in ada-lang.c:ada_lookup_simple_minsym
gdb/ChangeLog:

        -Wshadow warning fix.
        * ada-lang.c (ada_lookup_simple_minsym): Rename wild_match local
        variable into wild_match_p.  Adjust code accordingly.
2012-03-29 23:29:19 +00:00
Pedro Alves 689cc2ae8d 2012-03-29 Pedro Alves <palves@redhat.com>
* linux-low.c (regsets_store_inferior_registers) [__sparc__]:
	Correct ptrace arguments.
2012-03-29 21:27:28 +00:00
Joel Brobecker 6c88661cd4 Fix -Wshadow error in ada-valprint.c
gdb/ChangeLog:

        * ada-valprint.c (ada_val_print_1): Move the code handling
        TYPE_CODE_ENUM inside its own lexical block.  Declare
        variables len and val there, instead of in the function's
        top level block.  Avoid declaring deref_val again in a way
        that shadows another variable of the same name declared
        in one of the up-level blocks.  Just re-use the up-level
        variable instead.
2012-03-29 18:50:21 +00:00
Joel Brobecker 4e5c77fe1a Make ada_lookup_encoded_symbol "return" a struct ada_symbol_info
This makes ada_lookup_encoded_symbol more consistent with other functions
such as ada_lookup_symbol_list, and also makes it clearer in the code
using that function that symbol and block are related.

gdb/ChangeLog:

        * ada-lang.c (ada_lookup_encoded_symbol): Now returns void.
        Replace block_found argument by symbol_info.  Adjust
        implementation accordingly.  Add function documentation.
        (ada_lookup_symbol): Adjust to new ada_lookup_encoded_symbol.
        Fix documentation.
        * ada-lang.h (ada_lookup_encoded_symbol): Update declaration.
        * ada-exp.y (write_object_renaming): Adjust to new
        ada_lookup_encoded_symbol API.
2012-03-29 18:23:00 +00:00
Joel Brobecker 1c0ac8c766 [Ada] struct ada_symbol_info minor reformatting & doc update.
gdb/ChangeLog:

 	* ada-lang.h (struct ada_symbol_info): Reformat.  Improve
 	documentation.
2012-03-29 18:22:51 +00:00
Kevin Buettner 2aaed97917 Commit gdb and sim support for v850e2 and v850e2v3 on behalf of
Rathish C <Rathish.C@kpitcummins.com>.
2012-03-29 00:57:19 +00:00
gdbadmin 1c1b6f059a *** empty log message *** 2012-03-29 00:00:03 +00:00
Joel Brobecker 927fbba674 [NEWS] Announce support for Ada varobj support.
gdb/ChangeLog:

        * NEWS: Add entry for Ada varobj support.
2012-03-28 21:31:56 +00:00
Joel Brobecker 7191c1399c [doco] document the "type_changed" flag further.
gdb/doc/ChangeLog:

        * gdb.texinfo (GDB/MI Variable Objects): Document what happens
        to the children of a varobj and its update range when -var-update
        returns that the varobj's type changed.
2012-03-28 21:31:46 +00:00
Joel Brobecker d32cafc7d5 New varobj language callback: value_is_changeable_p.
This patch introduces a new language-specific callback for varobj
objects, allowing us to move the language-specific bits of the
varobj_value_is_changeable_p routine to language-specific functions.
This is more elegant than testing for the varobj's language...

gdb/ChangeLog:

        * varobj.c (default_value_is_changeable_p): New function,
        extracted from varobj_value_is_changeable_p.  Add declaration.
        (ada_value_is_changeable_p): New function, extracted from
        varobj_value_is_changeable_p.  Add declaration.
        (struct language_specific): New field "value_is_changeable_p".
        (languages): Add entries for new field.
        (varobj_create): Set language before calling install_new_value.
        (varobj_value_is_changeable_p): Reimplement to call the varobj's
        "value_is_changeable_p" language callback.
2012-03-28 21:31:29 +00:00
Joel Brobecker 181875a4ab Varobj support for Ada.
This patch adds varobj support for Ada variables.  Most of the code
is implemented in a separate Ada-specific file called ada-varobj.c.
The only bits in varobj.c are the functions used as the hooks in
the language-specific varobj's vector.

gdb/ChangeLog:

        * ada-varobj.h, ada-varobj.c: New files.
        * Makefile.in (SFILES): Add ada-varobj.c.
        (HFILES_NO_SRCDIR): Add ada-varobj.h.
        (COMMON_OBS): Add ada-varobj.o.
2012-03-28 21:31:18 +00:00
Joel Brobecker 7a290c40a9 framework for varobj type mutation
This patch introduces the framework necessary to support type mutations.
The only language that currently provides a language-specific hook for
that feature is Ada, but the hook remain unimplemented for now. The
actual implementation is tied to the rest of the varobj code for Ada,
and thus will be provided then.

gdb/ChangeLog:

        * varobj.c (ada_value_has_mutated): Add declaration.  New function.
        (struct language_specific): New field "value_has_mutated".
        (languages): Set field "value_has_mutated" in each entry of array.
        (varobj_value_has_mutated): New function.
        (varobj_udpdate): Add handling of type mutation.
        (value_of_root): Add handling of type mutation.
        (ada_value_has_mutated): New function.
2012-03-28 21:31:05 +00:00
Pedro Alves c14dfd3206 2012-03-28 Pedro Alves <palves@redhat.com>
* linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
	(IA64_GR0_REGNUM, IA64_FR0_REGNUM)
	(IA64_FR1_REGNUM): New defines.
	(ia64_fetch_register): New.
	(the_low_target): Install it.
	* linux-low.h (struct linux_target_ops) <fetch_register>: New
	field.
	* linux-low.c (linux_fetch_registers): Try the
	the_low_target.fetch_register hook first.

	* linux-arm-low.c (the_low_target): Adjust.
	* linux-bfin-low.c (the_low_target): Adjust.
	* linux-cris-low.c (the_low_target): Adjust.
	* linux-crisv32-low.c (the_low_target): Adjust.
	* linux-m32r-low.c (the_low_target): Adjust.
	* linux-m68k-low.c (the_low_target): Adjust.
	* linux-mips-low.c (the_low_target): Adjust.
	* linux-ppc-low.c (the_low_target): Adjust.
	* linux-s390-low.c (the_low_target): Adjust.
	* linux-sh-low.c (the_low_target): Adjust.
	* linux-sparc-low.c (the_low_target): Adjust.
	* linux-tic6x-low.c (the_low_target): Adjust.
	* linux-x86-low.c (the_low_target): Adjust.
	* linux-xtensa-low.c (the_low_target): Adjust.
2012-03-28 18:30:01 +00:00
Pedro Alves ca9b8b9ce8 2012-03-28 Pedro Alves <palves@redhat.com>
* ia64-linux-nat.c (supply_fpregset, ia64_linux_fetch_register):
	Always supply $fr0 as 0.0 and $fr1 as 1.0.
2012-03-28 17:50:17 +00:00
Tom Tromey cc0265cdda * python/py-inferior.c (infpy_read_memory): Remove cleanups and
explicitly free 'buffer' on exit paths.  Decref 'membuf_object'
	before returning.
2012-03-28 17:38:08 +00:00
Tom Tromey 3ad2ec6f11 * .dir-locals.el: New file. 2012-03-28 17:35:38 +00:00
Keith Seitz e2171b3cd2 * gdb.linespec/ls-dollar.cc: New file.
* gdb.linespec/ls-dollar.exp: New test.
2012-03-28 17:33:33 +00:00
Pedro Alves 4a6510ba7f 2012-03-28 Pedro Alves <palves@redhat.com>
* ia64-linux-nat.c (u_offsets): Map IA64_EC_REGNUM to PT_AR_EC.
2012-03-28 17:29:54 +00:00
Keith Seitz 0e4acfccb3 * gdb.cp/namespace.exp: Add breakpoint tests for functions
starting with the global namespace.
2012-03-28 17:29:42 +00:00
Joel Brobecker 5a75128f93 [ia64-linux] Allow libunwind to fetch register 0
On ia64-linux, GDB sometimes prints the following error when trying
to switch to a different task:

    (gdb) task 3
    Register 0 is not available

This is a random failure that sometimes happens, sometimes does not.
The error comes from the fact that the libunwind library is requesting
the value of register 0 (zero): This eventually leads us to
ia64-linux-nat.c:ia64_linux_fetch_register.

This function relies on ia64_cannot_fetch_register to determine
whether or not we have access to the register's value.  The ptrace
interface does not provide the r0 value, and so we end up telling
the regcache that this register's value is not available.  And yet,
for r0, we do not need to ask ptrace for its value, since it is
always zero.

So, the fix was to add a special rule for supplying a nul value
when regnum == IA64_GR0_REGNUM.

gdb/ChangeLog:

        * ia64-linux-nat.c (ia64_linux_fetch_register): Add special
        handling for r0.
2012-03-28 17:08:48 +00:00
Pawandeep Oza 306f8a0221 Pawandeep Oza updated to write-after-apporval section at the correct order 2012-03-28 04:37:43 +00:00
gdbadmin aa731a46f8 *** empty log message *** 2012-03-28 00:00:33 +00:00
Jan Kratochvil 3708f05e58 gdb/doc/
* gdb.texinfo (Auto-loading): Move @menu to the end of @node.
	Create two new links fir 'objfile-gdb.py file'
	and 'dotdebug_gdb_scripts section'.
2012-03-27 20:44:13 +00:00
Jan Kratochvil 8e0583c837 gdb/doc/
* gdb.texinfo (Auto-loading): Rename node reference
	'.debug_gdb_scripts section' to 'dotdebug_gdb_scripts section'.
	Twice.
	(.debug_gdb_scripts section): Rename the node ...
	(dotdebug_gdb_scripts section): ... here.
	(Maintenance Commands): Also rename this node reference.
2012-03-27 20:15:20 +00:00
Pedro Alves 6350a0664a Fix formatting. 2012-03-27 19:16:23 +00:00
Pedro Alves f99d8bf46c 2012-03-27 Pedro Alves <palves@redhat.com>
Eliminate struct ui_stream.

	* ui-out.h (struct ui_stream): Delete.
	(ui_out_field_stream): Adjust prototype.
	(ui_out_stream_new, ui_out_stream_delete)
	(make_cleanup_ui_out_stream_delete): Delete declarations.
	* ui-out.c (ui_out_field_stream): Change prototype to take a
	ui_file instead of a ui_stream.  Adjust.
	(ui_out_stream_new, ui_out_stream_delete, do_stream_delete)
	(make_cleanup_ui_out_stream_delete): Delete.
	* breakpoint.c (print_breakpoint_location)
	(print_one_detail_ranged_breakpoint, print_it_watchpoint): Use
	ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new.
	* disasm.c (dump_insns): Ditto.
	(do_mixed_source_and_assembly, do_assembly_only): Adjust
	prototype.
	(gdb_disassembly): Use ui_file/mem_fileopen instead of
	ui_stream/ui_out_stream_new.
	* infcmd.c (print_return_value): Ditto.
	* osdata.c (info_osdata_command): Don't allocate a local
	ui_stream.
	* stack.c (print_frame_arg, print_frame_args, print_frame): Use
	ui_file/mem_fileopen instead of ui_stream/ui_out_stream_new.
	* tracepoint.c (print_one_static_tracepoint_marker): Don't
	allocate a local ui_stream.
	* mi/mi-cmd-stack.c (list_arg_or_local): Use ui_file/mem_fileopen
	instead of ui_stream/ui_out_stream_new.
	(list_args_or_locals): Don't allocate a local ui_stream.
	* mi/mi-main.c (get_register, mi_cmd_data_evaluate_expression)
	(mi_cmd_data_read_memory): Use ui_file/mem_fileopen instead of
	ui_stream/ui_out_stream_new.
	* cli/cli-setshow.c (do_setshow_command): Ditto.
2012-03-27 19:08:37 +00:00
Pawandeep Oza 72508ac0bf * arm-linux-tdep.c (arm_linux_init_abi): Call
set_gdbarch_process_record.
       Initialize `arm_swi_record' field.

       * arm-tdep.c (arm_process_record): New function.
       (deallocate_reg_mem): New function.
       (decode_insn): New function.
       (thumb_record_branch): New function.
       (thumb_record_ldm_stm_swi(): New function.
       (thumb_record_misc): New function.
       (thumb_record_ld_st_stack): New function.
       (thumb_record_ld_st_imm_offset): New function.
       (thumb_record_ld_st_reg_offset(): New function.
       (thumb_record_add_sub_cmp_mov): New function.
       (thumb_record_shift_add_sub): New function.
       (arm_record_coproc_data_proc): New function.
       (arm_record_coproc): New function.
       (arm_record_b_bl): New function.
       (arm_record_ld_st_multiple): New function.
       (arm_record_ld_st_reg_offset): New function.
       (arm_record_ld_st_imm_offset): New function.
       (arm_record_data_proc_imm): New function.
       (arm_record_data_proc_misc_ld_str): New function.
       (arm_record_extension_space): New function.
       (arm_record_strx): New function.
       (sbo_sbz): New function.
       (struct insn_decode_record): New structure for arm insn record.
       (REG_ALLOC): New macro for reg allocations.
       (MEM_ALLOC): New macro for memory allocations.

       * arm-tdep.h (struct gdbarch_tdep): New field 'arm_swi_record'
2012-03-27 15:46:33 +00:00
Andreas Schwab 89e028e2ef * m68klinux-nat.c (fetch_register): Fix strict-aliasing violation.
(store_register): Likewise.
2012-03-27 08:15:26 +00:00
gdbadmin fda3c10b5f *** empty log message *** 2012-03-27 00:00:32 +00:00
Pawandeep Oza 3d9a9eb0f3 MAINTAINERS (Write After Approval): Add myself to the list. 2012-03-26 18:18:40 +00:00
Pedro Alves 63c88e1312 2012-03-26 Pedro Alves <palves@redhat.com>
* server.c (handle_qxfer_libraries): Don't bail early if
	the_target->qxfer_libraries_svr4 is not NULL.
2012-03-26 13:54:57 +00:00
Pedro Alves fb723180bd 2012-03-26 Pedro Alves <palves@redhat.com>
* linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
2012-03-26 12:39:19 +00:00
gdbadmin fc72a5f0f1 *** empty log message *** 2012-03-26 00:00:03 +00:00
Jan Kratochvil 5b43fab2ea gdb/
* NEWS (set breakpoint condition-evaluation): Change "gdb" to "host".
	Describe also the option "auto".
2012-03-25 13:44:01 +00:00
gdbadmin e0645b3035 *** empty log message *** 2012-03-25 00:00:33 +00:00
gdbadmin b25d0f6e19 *** empty log message *** 2012-03-24 00:00:04 +00:00
Doug Evans 2f4e0a8013 * lib/gdb.exp (BUILD_DATA_DIRECTORY): New global. 2012-03-23 22:28:35 +00:00
Pedro Alves 0afae3cf2e 2012-03-23 Pedro Alves <palves@redhat.com>
* linux-low.c (linux_qxfer_libraries_svr4): Terminate the
	"library-list-svr4" element's start tag when the the DSO list is
	empty.
2012-03-23 20:27:08 +00:00
Pedro Alves 485f1ee4f6 2012-03-23 Pedro Alves <palves@redhat.com>
* linux-low.c (read_one_ptr): Read the inferior's pointer through
	a variable whose type size is the same as the inferior's pointer
	size.
2012-03-23 20:26:14 +00:00