Commit Graph

70053 Commits

Author SHA1 Message Date
Jan Kratochvil 70c622a3d2 gdb/
Code cleanup.
	* cp-namespace.c (cp_add_using_directive): Turn positive comparison to
	negative comparisons.
2011-06-29 22:02:58 +00:00
Ian Lance Taylor 37e41b0352 * script.cc (Token::integer_value): Accept trailing M/m/K/k
modifier.
	(Lex::gather_token): Accept trailing M/m/K/k for integers.
2011-06-29 21:57:51 +00:00
Ian Lance Taylor 6c21fce1cc * script.cc (Token::integer_value): Accept trailing M/m/K/k
modifier.
	(Lex::gather_token): Accept trailing M/m/K/k for integers.
2011-06-29 21:57:13 +00:00
Ian Lance Taylor 4d5e4e62e1 PR gold/12675
* object.cc (Sized_relobj_file::check_eh_frame_flags): Check for
	SHT_X86_64_UNWIND.
	* layout.cc (Layout::layout_eh_frame): Likewise.
2011-06-29 21:39:19 +00:00
Ian Lance Taylor 886f533ada PR gold/12695
* layout.cc (Layout::symtab_section_shndx): New function.
	* layout.h (class Layout): Declare symtab_section_shndx.
	* output.cc (Output_section::write_header): Call it.
2011-06-29 21:26:40 +00:00
Richard Sandiford a4e064680b gas/
* config/tc-mips.c (append_method): New enum.
	(can_swap_branch_p, get_append_method): New functions.
	(append_insn): Use get_append_method to decide how the instruction
	should be added.
2011-06-29 21:05:29 +00:00
Jan Kratochvil 0d1b033387 readline/
Avoid free from a signal handler.
	* Makefile.in (xfree.o): Add readline.h.
	* xfree.c: Include stdio.h and readline.h.
	(xfree): Return on RL_STATE_SIGHANDLER.
	* xmalloc.h (xfree): New definition.
2011-06-29 20:51:10 +00:00
Richard Sandiford 9fe77896a7 gas/
* config/tc-mips.c (append_insn): Remove bogus goto.
2011-06-29 20:48:10 +00:00
H.J. Lu 906efcbc31 Replace "index" with "i".
2011-06-29  H.J. Lu  <hongjiu.lu@intel.com>

	* tilegx-opc.c (find_opcode): Replace "index" with "i".
	* tilepro-opc.c (find_opcode): Likewise.
2011-06-29 20:46:11 +00:00
Richard Sandiford 13408f1edd gas/
* config/tc-mips.c (append_insn): Always clear the history after an
	unconditional branch.
2011-06-29 20:46:10 +00:00
Richard Sandiford ceb94aa50d gas/
* config/tc-mips.c (find_altered_mips16_opcode): New function.
	(append_insn): Use it.

opcodes/
	* mips16-opc.c (jalrc, jrc): Move earlier in file.
2011-06-29 20:42:48 +00:00
Richard Sandiford 4c26037942 gas/
* config/tc-mips.c (insn_uses_reg): Delete.
	(gpr_read_mask, gpr_write_mask): New functions.
	(fpr_read_mask, fpr_write_mask): Likewise.
	(insns_between, nops_for_vr4130, append_insn): Use them.

gas/testsuite/
	* gas/mips/mips16-e.d, gas/mips/mips16-f.d,
	gas/mips/mipsel16-e.d, gas/mips/mipsel16-f.d,
	gas/mips/tmips16-e.d, gas/mips/tmips16-f.d,
	gas/mips/tmipsel16-e.d, gas/mips/tmipsel16-f.d: Fix GPR mask.
	* gas/mips/reginfo-1.s, gas/mips/reginfo-1a.d,
	gas/mips/reginfo-1b.d: New tests.
	* gas/mips/mips.exp: Run them.
2011-06-29 20:39:00 +00:00
Richard Sandiford 02b1ab82d7 gas/
* config/tc-mips.c (md_mips_end): Call mips_emit_delays.

gas/testsuite/
	* gas/mips/24k-triple-stores-9.d: Add -z to dump options and
	explicitly match one nop.
	* gas/mips/24k-triple-stores-10.d: Likewise.
	* gas/mips/24k-triple-stores-11.d: Likewise.
	* gas/mips/lifloat.d: Likewise.
	* gas/mips/trunc.d: Likewise 1 extra nop.
	* gas/mips/vr4111.d: Likewise 2 nops.
2011-06-29 20:35:05 +00:00
Tom Tromey 0ecee54cfd PR testsuite/12040:
* gdb.fortran/array-element.exp: Use f90, not f77.
	* gdb.fortran/complex.exp: Use f90, not f77.
	* gdb.fortran/derived-type.exp: Use f90, not f77.
	* gdb.fortran/library-module.exp: Use f90, not f77.
	* gdb.fortran/logical.exp: Use f90, not f77.
	* gdb.fortran/module.exp: Use f90, not f77.
	* gdb.fortran/multi-dim.exp: Use f90, not f77.
	* gdb.fortran/subarray.exp: Use f90, not f77.
2011-06-29 17:50:47 +00:00
Tom Tromey 39c4d40aa5 gdb
2011-06-29  André Pönitz  <andre.poenitz@nokia.com>

	* mi/mi-main.c (mi_cmd_list_features): Emit
	breakpoint-notifications.
gdb/doc
	* gdb.texinfo (GDB/MI Miscellaneous Commands): Document
	breakpoint-notifications feature.
2011-06-29 17:30:01 +00:00
Nick Clifton a7dbfd1c34 * readelf.c (get_section_type_name): When displaying an unknown
section type display the hex value first on the assumption that
	the full message will probably be truncated into a 15 character
	field.
2011-06-29 16:51:37 +00:00
Nick Clifton 49c62a3353 PR gas/12931
* config/tc-arm.c (mapping_state): When changing to ARM or THUMB
	state set the minimum required alignment of the section.
2011-06-29 16:29:38 +00:00
Ulrich Weigand 6f5def7d9e * gdb.texinfo (Target Description): Remove warning about
possibly unstable format.
2011-06-29 16:28:22 +00:00
Tom Tromey 3b2b8feaf4 gdb
PR fortran/10036:
	* valprint.h (generic_emit_char, generic_printstr): Declare.
	* valprint.c (wchar_printable, append_string_as_wide)
	(print_wchar): Move from c-lang.c.
	(generic_emit_char): New function; mostly taken from c_emit_char.
	(generic_printstr): New function; mostly taken from c_printstr.
	* f-valprint.c (f_val_print) <TYPE_CODE_ARRAY>: Handle strings
	represented as arrays.
	<TYPE_CODE_CHAR>: Treat as TYPE_CODE_INT; recognize as character
	type.
	* f-typeprint.c (f_type_print_base) <TYPE_CODE_CHAR>: Treat
	identically to TYPE_CODE_INT.
	* f-lang.c (f_get_encoding): New function.
	(f_emit_char): Use generic_emit_char.
	(f_printchar): Replace comment.
	(f_printstr): Use generic_printstr.
	* dwarf2read.c (read_base_type) <DW_ATE_unsigned>: Handle Fortran
	"character" types specially.
	<DW_ATE_signed_char, DW_ATE_unsigned_char>: Make TYPE_CODE_CHAR
	for Fortran.
	* c-lang.c (wchar_printable, append_string_as_wide, print_wchar):
	Move to valprint.c
	(c_emit_char): Call generic_emit_char.
	(c_printstr): Call generic_printstr.
gdb/testsuite
	* gdb.fortran/charset.exp: New file.
	* gdb.fortran/charset.f90: New file.
2011-06-29 15:32:40 +00:00
Gary Benson 168e6d4402 gdb/
* breakpoint.c (bpstat_what): Removed duplicated case.
2011-06-29 15:20:34 +00:00
Tom Tromey 42159ca500 PR testsuite/12040:
* lib/future.exp: New file, mostly extracted from ada.exp.
	Rewrote compatibility code to use rename.
	(gdb_find_gfortran): New proc.
	(gdb_default_target_compile): Refresh from dejagnu; plus a pending
	gfortran patch.
	* lib/ada.exp (gdb_find_gnatmake, gdb_default_target_compile):
	Move to future.exp.
	* lib/gdb.exp: Always load future.exp.
2011-06-29 14:44:45 +00:00
Ian Lance Taylor f3ae1b28a2 PR gold/12818
* symtab.cc (Symbol::should_add_dynsym_entry): Don't add undefined
	symbols which are not used in a relocation.
2011-06-29 14:43:08 +00:00
Tristan Gingold 7016a5d53d 2011-06-29 Tristan Gingold <gingold@adacore.com>
* config/tc-i386.c (i386_mach): Convert to ISO-C.
	(md_begin, pe_directive_secrel, md_estimate_size_before_relax): Ditto.
	(md_convert_frag, md_apply_fix, md_undefined_symbol): Ditto.
	(md_section_align, tc_gen_reloc): Ditto.
2011-06-29 11:12:25 +00:00
Ian Lance Taylor aecf301fb9 PR gold/12898
* layout.cc (Layout::segment_precedes): Don't crash if a linker
	script create indistinguishable segments.
	(Layout::set_segment_offsets): Use stable_sort when sorting
	segments.  Pass this to Compare_segments constructor.
	* layout.h (class Layout): Make segment_precedes non-static.
	(class Compare_segments): Change from struct to class.  Add
	layout_ field.  Add constructor.
	* script-sections.cc
	(Script_sections::attach_sections_using_phdrs_clause): Rename
	local orphan to is_orphan.  Don't report failure to put empty
	section in segment.  On attachment failure, report name of
	section, and attach to first PT_LOAD segment.
2011-06-29 00:39:54 +00:00
gdbadmin d555a4fbf3 *** empty log message *** 2011-06-29 00:00:33 +00:00
Alan Modra 4cc0d02fc3 daily update 2011-06-29 00:00:05 +00:00
Ian Lance Taylor 03ef7571fc PR gold/12934
* target-select.cc (Target_selector::Target_selector): Add
	emulation parameter.  Change all callers.
	(select_target_by_bfd_name): Rename from select_target_by_name.
	Change all callers.
	(select_target_by_emulation): New function.
	(supported_emulation_names): New function.
	* target-select.h (class Target_selector): Add emulation_ field.
	Update declarations.
	(Target_selector::recognize_by_bfd_name): Rename from
	recognize_by_name.  Change all callers.
	(Target_selector::supported_bfd_names): Rename from
	supported_names.  Change all callers.
	(Target_selector::recognize_by_emulation): New function.
	(Target_selector::supported_emulations): New function.
	(Target_selector::emulation): New function.
	(Target_selector::do_recognize_by_bfd_name): Rename from
	do_recognize_by_name.  Change all callers.
	(Target_selector::do_supported_bfd_names): Rename from
	do_supported_names.  Change all callers.
	(Target_selector::do_recognize_by_emulation): New function.
	(Target_selector::do_supported_emulations): New function.
	(select_target_by_bfd_name): Change name in declaration.
	(select_target_by_emulation): Declare.
	(supported_emulation_names): Declare.
	* parameters.cc (parameters_force_valid_target): Try to find
	target based on emulation from -m option.
	* options.h (class General_options): Change doc string for -m.
	* options.cc (help): Print emulations.
	(General_options::parse_V): Likewise.
	* freebsd.h (Target_selector_freebsd::Target_selector_freebsd):
	Add emulation parameter.  Change all callers.
2011-06-28 23:12:31 +00:00
Ian Lance Taylor 200b2bb9e8 * target.h (class Target): Add osabi_ field.
(Target::osabi): New function.
	(Target::set_osabi): New function.
	(Target::Target): Initialize osabi_.
	(Target::do_adjust_elf_header): Make pure virtual.
	(Sized_target::do_adjust_elf_header): Declare.
	* target.cc (Sized_target::do_adjust_elf_header): New function.
	(class Sized_target): Instantiate all versions.
	* freebsd.h (class Target_freebsd): Remove.
	(Target_selector_freebsd::do_recognize): Call set_osabi on
	Target.
	(Target_selector_freebsd::do_recognize_by_name): Likewise.
	(Target_selector_freebsd::set_osabi): Remove.
	* i386.cc (class Target_i386): Inherit from Sized_target rather
	than Target_freebsd.
	* x86_64.cc (class Target_x86_64): Likewise.
2011-06-28 22:25:14 +00:00
Ian Lance Taylor b3ce541e97 * target.h (Target::can_check_for_function_pointers): Rewrite.
Make non-virtual.
	(Target::can_icf_inline_merge_sections): Likewise.
	(Target::section_may_have_icf_unsafe_poineters): Likewise.
	(Target::Target_info): Add can_icf_inline_merge_sections field.
	(Target::do_can_check_for_function_pointers): New virtual
	function.
	(Target::do_section_may_have_icf_unsafe_pointers): Likewise.
	* arm.cc (Target_arm::do_can_check_for_function_pointers): Rename
	from can_check_for_function_pointers, move in file.
	(Target_arm::do_section_may_have_icf_unsafe_pointers): Rename from
	section_may_have_icf_unsafe_poineters, move in file.
	(Target_arm::arm_info): Initialize can_icf_inline_merge_sections.
	* i386.cc (Target_i386::do_can_check_for_function_pointers):
	Rename from can_check_for_function_pointers, move in file.
	(Target_i386::can_icf_inline_merge_sections): Remove.
	(Target_i386::i386_info): Initialize
	can_icf_inline_merge_sections.
	* powerpc.cc (Target_powerpc::powerpc_info) [all versions]:
	Initialize can_icf_inline_merge_sections.
	* sparc.cc (Target_sparc::sparc_info) [both version]: Likewise.
	* x86_64.cc (Target_x86_64::do_can_check_for_function_pointers):
	Rename from can_check_for_function_pointers, move in file.
	(Target_x86_64::can_icf_inline_merge_sections): Remove.
	(Target_x86_64::x86_64_info): Initialize
	can_icf_inline_merge_sections.
	* testsuite/testfile.cc (Target_test::test_target_info):
	Likewise.
	* icf.cc (get_section_contents): Correct formatting.
2011-06-28 21:15:42 +00:00
Tristan Gingold af24f60c6d 2011-06-28 Tristan Gingold <gingold@adacore.com>
* config/tc-alpha.c (s_alpha_pdesc): Fix indentation. Do not
	generate dummy fix.
2011-06-28 13:33:33 +00:00
Tom Tromey 1c033f8c71 * python/python-internal.h (PY_SSIZE_T_CLEAN): Define. 2011-06-28 13:09:12 +00:00
Tristan Gingold e1f4d6bd07 2011-06-28 Tristan Gingold <gingold@adacore.com>
* config/tc-alpha.c (load_expression): Use alloca instead of xmalloc.
	(emit_jsrjmp): Ditto.
	(tc_gen_reloc): Ditto.
2011-06-28 09:23:53 +00:00
Tristan Gingold 25d41743dc 2011-06-28 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (vms_private_data_struct): Make vms_linkage_index
	unsigned int.
	(_bfd_vms_write_etir): Write linkage index from reloc.
2011-06-28 08:39:39 +00:00
Yao Qi af69a5cef7 2011-06-28 Yao Qi <yao@codesourcery.com>
* gdb.cp/exception.cc: Don't include iostream.
	(bar): Remove print statement.
	(catcher): New.
	(main): Remove print statements.  Call function catcher.
	* gdb.cp/exception.exp : Don't match inferior's output in regexp.
	Set breakpoint on catcher, and check the value of parameter.
2011-06-28 08:36:18 +00:00
Tristan Gingold 9b02d21241 2011-06-28 Fawzi Mohamed <fawzi.mohamed@nokia.com>
* mach-o.c (bfd_mach_o_read_command): Also ignore
	BFD_MACH_O_LC_ROUTINES_64.
2011-06-28 07:45:53 +00:00
Tristan Gingold 4b1c4d2b62 2011-06-28 Tristan Gingold <gingold@adacore.com>
* config/tc-alpha.c (alpha_evax_proc_hash): Remove.
	(alpha_evax_proc_data): New variable.
	(s_alpha_ent): Prevent nested function.  Remove has_insert call.
	(s_alpha_pdesc): Do not call demand_empty_rest_of_line in case of
	error.  Do not search in the hash table.  Check if match with .ent.
	(s_alpha_name): Remove unused variable.
	(md_begin): Remove initialization of alpha_evax_proc_hash.
2011-06-28 07:40:16 +00:00
Ian Lance Taylor 6d1c4efb9c * symtab.cc (Symbol::versioned_name): New function.
(Symbol_table::add_to_final_symtab): Use versioned_name when
	appropriate.
	(Symbol_table::sized_write_symbol): Likewise.
	* symtab.h (class Symbol): Declare versioned_name.
	* stringpool.h (class Stringpool_template): Add variant of add
	which takes a std::basic_string.
	* testsuite/Makefile.am (check_PROGRAMS): Add ver_test_12.
	(ver_test_12_SOURCES, ver_test_12_DEPENDENCIES): New variables.
	(ver_test_12_LDFLAGS, ver_test_12_LDADD): New variables.
	(ver_test_12.o): New target.
	* testsuite/Makefile.in: Rebuild.
2011-06-28 05:39:45 +00:00
Alan Modra 0f4e53222c daily update 2011-06-28 00:00:06 +00:00
gdbadmin 50673a5a82 *** empty log message *** 2011-06-28 00:00:03 +00:00
Tom Tromey 5fe41fbfa2 * valops.c (find_overload_match): Call do_cleanups before early
return.
	* top.c (execute_command): Call do_cleanups before early return.
	(command_loop): Likewise.
	* stack.c (backtrace_command): Make a null cleanup early.  Don't
	conditionally call do_cleanups.
	* python/py-value.c (TRY_CATCH): Move cleanup handling into
	TRY_CATCH.
	* python/py-breakpoint.c (gdbpy_breakpoint_has_py_cond): Rearrange
	so cleanups are always run.
	* mi/mi-cmd-var.c (mi_cmd_var_delete): Reset old_cleanups.
	* findcmd.c (parse_find_args): Call do_cleanups on early return
	path.
	* dbxread.c (elfstab_build_psymtabs): Make a null cleanup early.
	Don't conditionally call do_cleanups.
	* cli/cli-script.c (execute_user_command): Initialize 'old_chain'
	later.
2011-06-27 19:21:51 +00:00
Doug Kwan 57eb9b5086 2011-06-27 Doug Kwan <dougkwan@google.com>
* arm.cc (Arm_relocate_functions::thm_jump8,
	Arm_relocate_functions::thm_jump11): Use a wider signed
	type to compute offset.
	* testsuite/Makefile.am: Add new tests arm_thm_jump11 and
	arm_thm_jump8.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/arm_branch_in_range.sh: Check test results of
	arm_thm_jump11 and arm_thm_jump8.
	* testsuite/arm_thm_jump11.s: New test source file.
	* testsuite/arm_thm_jump11.t: New linker script.
	* testsuite/arm_thm_jump8.s: New test source file.
	* testsuite/arm_thm_jump8.t: New linker script.
2011-06-27 17:53:32 +00:00
Eric Botcazou e26bd57dea * MAINTAINERS (Write After Approval): Use default email address. 2011-06-27 17:00:39 +00:00
Joel Brobecker 6c3097fcd3 Add Eric Botcazou to the list of `Write After Approval' contributors
* MAINTAINERS (Write After Approval): Add Eric Botcazou.
2011-06-27 16:38:27 +00:00
Joel Brobecker 369c397ba4 Add support for single register window model on SPARC
2011-06-27  Eric Botcazou  <ebotcazou@adacore.com>
        * sparc-tdep.h (struct sparc_frame_cache): Add frame_offset,
        saved_regs_mask and copied_regs_mask fields.
        (sparc_record_save_insn): New prototype.
        * sparc-tdep.c (sparc_alloc_frame_cache): Initialize the new fields.
        (sparc_record_save_insn): New function.
        (sparc_analyze_prologue): Add head comment.  Recognize store insns
        of call-saved registers.  Use OFFSET consistently.  Recognize flat
        frames and cache their settings.
        (sparc32_skip_prologue): Handle flat frames.
        (sparc_frame_cache): Add frame_offset to the base address.
        (sparc32_frame_cache): Adjust to new frame description.
        (sparc32_frame_prev_register): Likewise.
        * sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
        * sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_cache): Likewise.
        * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_cache): Likewise.
        * sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_cache): Force the
        frame by calling sparc_record_save_insn.
        * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_cache): Likewise.
        * sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_cache): Likewise.
        * sparc64obsd-tdep.c (sparc64obsd_frame_cache): Likewise.
2011-06-27 16:36:00 +00:00
Nick Clifton 840c4ae927 * ld-elf/elf.exp: Exlcude all v850 targets from note-3 test. 2011-06-27 15:02:56 +00:00
Tristan Gingold 8aacb050e6 2011-06-27 Tristan Gingold <gingold@adacore.com>
* config/tc-alpha.c (add_to_link_pool): Remove basesym parameter.
	Locally declare basesym.  Add comments.  Do not set literal_pool_size.
	(load_expression): Adjust call to add_to_link_pool.
	(s_alpha_pdesc): Define pdesc symbol using dot.
	Do not set literal_pool_size.
	(s_alpha_end): Use NULL instead of 0.
2011-06-27 14:08:15 +00:00
Alan Modra daceadb849 * ld-elf/elf.exp: Exclude more targets from note-3 test. 2011-06-27 13:34:21 +00:00
Tristan Gingold a8efca921f 2011-06-27 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (_bfd_vms_write_etir): Use 'section' to get current
	section target index.
2011-06-27 13:03:15 +00:00
Nick Clifton 20ee8bc9af * cisco-core.c (cisco_core_little_vec): Add initialization of
match_priority field.
2011-06-27 10:09:00 +00:00
Tristan Gingold bb1d425616 2011-06-27 Tristan Gingold <gingold@adacore.com>
* config/obj-evax.c (evax_frob_file_before_adjust): Add comments.
	Fix style.
	* config/obj-evax.h (struct alpha_linkage_fixups): Remove seg
	field.  Add comments.
	(obj_symbol_type, object_headers, OBJ_SYMFIELD_TYPE): Remove
2011-06-27 10:03:42 +00:00