Commit Graph

64864 Commits

Author SHA1 Message Date
Ian Lance Taylor 9e9e071b2e * options.h (class General_options): Add --spare-dynamic-tags.
* output.cc (Output_data_dynamic::set_final_data_size): Implement
	--spare-dynamic-tags.
2010-03-06 02:34:13 +00:00
Pedro Alves bce522a260 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
* linux-low.c (linux_wait_for_lwp): Fetch the regcache after
	switching the current inferior, not before.
2010-03-06 00:11:42 +00:00
gdbadmin f9b023f2f6 *** empty log message *** 2010-03-06 00:00:03 +00:00
Ian Lance Taylor a81ee015bc * incremental.cc: Include "libiberty.h". 2010-03-05 22:04:48 +00:00
Rainer Orth 44ec90b93b include:
* elf/common.h (VER_FLG_*): Document.
	(VER_FLG_INFO): Define.

	gold:
	* dynobj.h (Verdef::Verdef): Add is_info arg, is_info member
	function, is_info_ member.
	* dynobj.cc (Verdef::write): Set VER_FLG_INFO if this->is_info_.
	(Versions::Versions): Update caller.
	(Versions::define_base_version): Likewise.
	(Versions::add_def): Likewise.

	elfcpp:
	* elfcpp.h (VER_FLG_INFO): Define.

	binutils:
	* readelf.c (get_ver_flags): Handle VER_FLG_INFO.
2010-03-05 21:04:59 +00:00
Tom Tromey f870a310ee gdb
2010-03-05  Corinna Vinschen  <vinschen@redhat.com>
	    Tom Tromey  <tromey@redhat.com>

	* utils.c (host_char_to_target): Add 'gdbarch' argument.
	(parse_escape): Likewise.
	* python/py-utils.c (unicode_to_target_string): Update.
	(unicode_to_target_python_string): Update.
	(target_string_to_unicode): Update.
	* printcmd.c (printf_command): Update.
	* p-exp.y (yylex): Update.
	* objc-exp.y (yylex): Update.
	* mi/mi-parse.c: Include charset.h.
	(mi_parse_escape): New function.
	(mi_parse_argv): Use it.
	* jv-exp.y (yylex): Update.
	* i386-cygwin-tdep.c (i386_cygwin_auto_wide_charset): New
	function.
	(i386_cygwin_init_abi): Call set_gdbarch_auto_wide_charset.
	* gdbarch.sh (auto_charset, auto_wide_charset): New.
	* gdbarch.c: Rebuild.
	* gdbarch.h: Rebuild.
	* defs.h (parse_escape): Update.
	* cli/cli-setshow.c: Include arch-utils.h.
	(do_setshow_command): Update.
	* cli/cli-cmds.c (echo_command): Update.
	* charset.h (target_charset, target_wide_charset): Update.
	* charset.c: Include arch-utils.h.
	(target_charset_name): Default to "auto".
	(target_wide_charset_name): Likewise.
	(show_target_charset_name): Handle "auto".
	(show_target_wide_charset_name): Likewise.
	(be_le_arch): New global.
	(set_be_le_names): Add 'gdbarch' argument.
	(validate): Likewise.  Don't call set_be_le_names.
	(set_charset_sfunc, set_host_charset_sfunc)
	(set_target_charset_sfunc, set_target_wide_charset_sfunc):
	Update.
	(target_charset): Add 'gdbarch' argument.
	(target_wide_charset): Likewise.  Remove 'byte_order' argument.
	(auto_target_charset_name): New global.
	(default_auto_charset, default_auto_wide_charset): New functions.
	(_initialize_charset): Set auto_target_charset_name.  Allow "auto"
	for target charsets.  Copy result of nl_langinfo.  Use GetACP if
	USE_WIN32API.
	* c-lang.c (charset_for_string_type): Add 'gdbarch' argument,
	remove 'byte_order' argument.  Update.
	(classify_type): Likewise.
	(c_emit_char): Update.
	(c_printchar): Update.
	(c_printstr): Update.
	(c_get_string): Update.
	(evaluate_subexp_c): Update.
	* arch-utils.h (default_auto_charset, default_auto_wide_charset):
	Declare.
	* python/python.c (gdbpy_target_charset): New function.
	(gdbpy_target_wide_charset): Likewise.
	(GdbMethods): Update.
	* NEWS: Update.
gdb/doc
	* gdb.texinfo (Basic Python): Document target_charset and
	target_wide_charset.
gdb/testsuite
	* gdb.python/py-prettyprint.py (pp_nullstr.to_string): Use
	gdb.target_charset.
	(pp_ns.to_string): Likewise.
2010-03-05 20:18:19 +00:00
Tom Tromey 78e2826bcc * gdb.texinfo (Data): Link to pretty-printing.
(Output Formats): Likewise.  Correct text.
2010-03-05 20:01:21 +00:00
Rainer Orth a6cc6b3bc4 ld:
* Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_sol2.o,
	eelf_i386_sol2.o.
	(ALL_64_EMULATIONS): Add eelf_x86_64_sol2.o, eelf64_sparc_sol2.o.
	(eelf32_sparc_sol2.c): New rule.
	(eelf64_sparc_sol2.c): Likewise.
	(eelf_x86_64_sol2.c): Likewise.
	(eelf_i386_sol2.c): Likewise.
	* Makefile.in: Regenerate.
	* configure.tgt (i[3-7]86-*-solaris2*): Change targ_emul to
	elf_i386_sol2.
	Add elf_i386_ldso, elf_x86_64_sol2 to targ_extra_emuls.
	(x86_64-*-solaris2*): Change targ_emul to elf_x86_64_sol2.
	Add elf_x86_64, elf_i386_sol2, elf_i386 to targ_extra_emuls.
	(sparc-*-solaris2.[0-6]*): Change targ_emul to elf32_sparc_sol2.
	Add target_extra_emuls.
	(sparc-*-solaris2*): Change targ_emul to elf32_sparc_sol2.
	Add elf32_sparc, elf64_sparc_sol2 to targ_extra_emuls.
	(sparcv9-*-solaris2*): Change targ_emul to elf64_sparc_sol2.
	Add elf64_sparc, elf32_sparc_sol2 to target_extra_emuls.
	* emulparams/elf32_sparc_sol2.sh: New file.
	* emulparams/elf64_sparc_sol2.sh: New file.
	* emulparams/elf_i386_sol2.sh: New file.
	* emulparams/elf_x86_64_sol2.sh: New file.
	* emultempl/solaris2.em: New file.

	bfd:
	* elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
	version twice.
	Skip it when constructing def.vd_next.

	* elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
	bfd_elf32_i386_sol2_vec.
	(TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
	(elf32_bed): Redefine to elf32_i386_sol2_bed.
	(elf_backend_want_plt_sym): Redefine to 1.

	* elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
	bfd_elf64_x86_64_sol2_vec.
	(TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
	(elf64_bed): Redefine to elf64_x86_64_sol2_bed.
	(elf_backend_want_plt_sym): Redefine to 1.

	* config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
	bfd_elf32_i386_sol2_vec.
	Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
	targ64_selvecs.
	(x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
	Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
	targ_selvecs.

	* configure.in: Handle bfd_elf32_i386_sol2_vec,
	bfd_elf64_x86_64_sol2_vec.
	* configure: Regenerate.

	* targets.c (bfd_elf32_i386_sol2_vec): Declare.
	(bfd_elf64_x86_64_sol2_vec): Declare.
	(_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
	bfd_elf64_x86_64_sol2_vec.
2010-03-05 19:49:00 +00:00
Ulrich Weigand 4e7386b0c7 * symfile.c (build_section_addr_info_from_objfile): Do not mask
off high address bits.
2010-03-05 19:32:44 +00:00
Ulrich Weigand aab48ede09 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Extract
address as UnsignedLongLong, not LongLong.
2010-03-05 19:28:13 +00:00
Kevin Buettner 8eeafb51ab * remote-mips.c (gdbthread.h): Include.
(remote_mips_ptid): Declare.
	(mips_error): Only mourn the inferior when inferior_ptid is non-null.
	(common_open): Set inferior_ptid, add it as an inferior, and
	as a thread too.  Delete FIXME comment regarding start_remote().
	(mips_close): Invoke generic_mourn_inferior().
	(mips_kill): Make sure that target_mourn_inferior is invoked.
	(mips_mourn_inferior): Don't invoke generic_mourn_inferior, as
	it's now invoked from mips_close().
	(mips_load): Don't null out inferior_ptid.  Don't call
	clear_symtab_users().
	(mips_thread_alive, mips_pid_to_str): New functions.
	(_initialize_remote_mips): Initialize remote_mips_ptid.  Initialize
	to_thread_alive and to_pid_to_str operations.
2010-03-05 16:18:54 +00:00
Paul Brook 26b6f1917c 2010-03-05 Paul Brook <paul@codesourcery.com>
gas/
	* config/tc-arm.c (arm_cpu_option_table): Add cortex-m4.
2010-03-05 10:41:04 +00:00
gdbadmin 4170a0931d *** empty log message *** 2010-03-05 00:00:03 +00:00
Alan Modra 8bec83ee65 daily update 2010-03-04 23:00:07 +00:00
Tom Tromey ae41149729 * dwarf2read.c (skip_one_die) <DW_FORM_ref_addr>: Use offset size
in DWARF 3 and later.
	(read_attribute_value) <DW_FORM_ref_addr>: Likewise.
2010-03-04 22:01:10 +00:00
Doug Evans 111f853cd1 * arm-tdep.c (arm_make_stub_cache): Delete unused locals reg,
unwound_fp.
2010-03-04 19:00:19 +00:00
Keith Seitz 0e0b460e6a * linespec.c (decode_line_1): Update comments for is_quote_enclosed.
If the filename portion of the linespec was quoted, recheck the
	remainder for additional quoting.
	(locate_first_half): Skip over completer chars, too.
2010-03-04 18:38:35 +00:00
Keith Seitz 0c199f28ac * gdb.cp/overload.exp: Test that the filename portion of a linespec
can be quoted.  Test that both the filename and function/line
	portions can be quoted at the same time.
2010-03-04 18:38:17 +00:00
Tom Tromey 1b93ff13d3 * printcmd.c (printf_command): Pass dummy argument to
printf_filtered.
2010-03-04 18:21:40 +00:00
Daniel Jacobowitz f7dd8c7963 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
sections.
2010-03-04 17:16:08 +00:00
Rainer Orth ba98da750e PR libstdc++/32499
* configure.ac (RANLIB): Default to true.
	(STRIP): Likewise.
	(RANLIB_FOR_TARGET): Remove superfluous : argument.
	* configure: Regenerate.
2010-03-04 17:12:46 +00:00
Doug Evans fc36e83962 * arm-tdep.c (arm_stub_unwind_sniffer): Add comment. 2010-03-04 16:39:57 +00:00
Pedro Alves c7437ca6e4 gdb/
* breakpoint.c (update_watchpoint): Create a sentinel location if
	the software watchpoint isn't watching any memory.
	(breakpoint_address_bits): Skip dummy software watchpoint locations.

	gdb/testsuite/
	* gdb.base/watch-non-mem.c, gdb.base/watch-non-mem.exp: New.
2010-03-04 15:37:26 +00:00
Pedro Alves 58dadb1bdf * utils.c (fputs_maybe_filtered): Check if there's already a top
level interpreter before dereferencing it.  If there isn't one,
	don't paginate either.
2010-03-04 14:58:40 +00:00
Daniel Jacobowitz 50e98be469 2010-03-04 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* arm-tdep.c (arm_pc_is_thumb): Add heuristic that tries to get
	the state right when single stepping.
	(arm_get_next_pc_raw, thumb_get_next_pc_raw): New functions.
	Get the next PC along with the instruction state.
	(thumb_get_next_pc): Remove.
	(arm_get_next_pc): Modified to use arm_get_next_pc_raw.
2010-03-04 13:42:12 +00:00
Hui Zhu 2e3ceee9bd 2010-03-04 Hui Zhu <teawater@gmail.com>
* i386-tdep.c (i386_process_record): Change "addr" to "tmpu64".
2010-03-04 07:53:20 +00:00
Alan Modra 8af6b354b4 PR 11302
* dwarf2.c (read_abbrevs): Return NULL on alloc failures.
	(read_attribute_value, decode_line_info): Likewise.
	(add_line_info, read_rangelist): Return FALSE on alloc failures.
	(arange_add, sort_line_sequences): Likewise.
	(find_abstract_instance_name): Handle failures from called funcs.
	(scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
	(find_line): Realloc to a temp, and handle alloc fail.
2010-03-04 04:01:53 +00:00
Sriraman Tallam 0897ed3bdb * i386.cc (Target_i386::can_check_for_function_pointers): New function.
(Scan::possible_function_pointer_reloc): New function.
	(Scan::local_reloc_may_be_function_pointer): Change to call
	possible_function_pointer_reloc.
	(Scan::global_reloc_may_be_function_pointer): Ditto.
	* icf.h (Icf::check_section_for_function_pointers): Change to reject
	relocations in ".data.rel.ro._ZTV" section.
	* testsuite/icf_safe_so_test.sh: Change to pass i386.
	* testsuite/icf_safe_so_test.cc: Ditto.
	* testsuite/icf_safe_test.cc: Ditto.
	* testsuite/icf_safe_test.sh: Ditto.
2010-03-04 01:33:22 +00:00
Pedro Alves 390a8acaa3 * utils.c (fputs_maybe_filtered): Always disable pagination if the
top level interpreter is MI.
2010-03-04 01:06:28 +00:00
Stan Shebs 9355b391f3 2010-03-03 Stan Shebs <stan@codesourcery.com>
* remote.c (remote_download_tracepoint): Iterate over locations.
	* tracepoint.c (validate_actionline): Ditto.
	(encode_actions): Add location argument.
	(trace_dump_command): Check all locations to see if stepping
	frame.
2010-03-04 00:32:50 +00:00
gdbadmin 3403c96dac *** empty log message *** 2010-03-04 00:00:33 +00:00
Alan Modra 693bd3b926 daily update 2010-03-03 23:00:06 +00:00
Doug Evans 24486cb784 * lib/gdb.exp (gdb_compile_pthreads): Handle case where
libc contains libpthread.
2010-03-03 22:19:05 +00:00
Doug Evans b111b80540 * gdb.threads/linux-dp.c (shared_random): Call rand instead of rand_r.
* gdb.threads/linux-dp.exp: Compile with gdb_compile_pthreads instead
	of gdb_compile.  Add another pattern to match android backtrace.
2010-03-03 22:13:51 +00:00
H.J. Lu 8685c86ff0 Mention improvement for X86 general purpose registers.
2010-03-03  H.J. Lu  <hongjiu.lu@intel.com>
	    Eli Zaretskii  <eliz@gnu.org>

	* NEWS: Add X86 general purpose registers section.
2010-03-03 20:19:50 +00:00
Ian Lance Taylor d3bbad6265 * target-reloc.h (relocate_section): Check the symbol table index
for -1U before setting the local symbol index.
	(scan_relocatable_relocs): If copying the relocation, record that
	the local symbol is required.
	* object.h (Symbol_value::is_output_symtab_index_set): New
	function.
	(Symbol_value::may_be_discarded_from_output_symtab): New
	function.
	(Symbol_value::has_output_symtab_entry): New function.
	(Symbol_value::needs_output_symtab_entry): Remove.
	(Symbol_value::output_symtab_index): Make sure the symbol index is
	set.
	(Symbol_value::set_output_symtab_index): Make sure the symbol
	index is not set.  Make sure the new index is valid.
	(Symbol_value::set_must_have_output_symtab_entry): New function.
	(Symbol_value::has_output_dynsym_entry): New function.
	(Symbol_value::set_output_dynsym_index): Make sure the new index
	is valid.
	(Sized_relobj::set_must_have_output_symtab_entry): New function.
	* object.cc (Sized_relobj::do_count_local_symbols): Only discard a
	local symbol if permitted.
	(Sized_relobj::do_finalize_local_symbols): Call
	is_output_symtab_index_set rather than needs_output_symtab_entry.
	(Sized_relobj::write_local_symbols): Call has_output_symtab_entry
	rather than needs_output_symtab_entry.  Call
	has_output_dynsym_entry rather than needs_output_dynsym_entry.
	* arm.cc (Arm_relobj::update_output_local_symbol_count): Call
	is_output_symtab_index_set rather than needs_output_symtab_entry.
	* testsuite/discard_locals_relocatable_test.c: New file.
	* testsuite/discard_locals_test.sh: Test -r.
	* testsuite/Makefile.am (check_DATA): Add
	discard_locals_relocatable_test1.syms,
	discard_local_relocatable_test2.syms.
	(MOSTLYCLEANFILES): Likewise.  Also add
	discard_locals_relocatable_test1.lout and
	discard_locals_relocatable_test2.out.
	(discard_locals_relocatable_test1.syms): New target.
	(discard_locals_relocatable_test.o): New target.
	(discard_locals_relocatable_test1.out): New target.
	(discard_locals_relocatable_test2.syms): New target.
	(discard_locals_relocatable_test2.out): New target.
	(various): Add missing ../ld-new dependencies.
	* testsuite/Makefile.in: Rebuild.
2010-03-03 19:31:54 +00:00
Tom Tromey e8f781e227 PR mi/11098:
* varobj.c (install_new_value): Handle case where new print_value
	is NULL.
2010-03-03 18:32:44 +00:00
Tom Tromey a0e0ef55c6 gdb
2010-03-03  Dainis Jonitis  <jonitis@gmail.com>
	PR gdb/11345:
	* printcmd.c (printf_command): Print end of format string using
	printf_filtered.
gdb/testsuite
2010-03-03  Tom Tromey  <tromey@redhat.com>
	PR gdb/11345:
	* gdb.base/printcmds.exp (test_printf): Add test.
2010-03-03 18:05:05 +00:00
Daniel Jacobowitz 501abfe038 * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
a mapping symbol to an empty section.
2010-03-03 17:56:24 +00:00
Nick Clifton 7e8ccf26e0 * po/fi.po: New Finnish translation. 2010-03-03 14:26:19 +00:00
gdbadmin ba32a47004 *** empty log message *** 2010-03-03 00:00:32 +00:00
Alan Modra 8b792a0a77 daily update 2010-03-02 23:00:06 +00:00
Tom Tromey a58d7472bd * mi/mi-cmd-break.c (mi_read_next_line): Add missing 'void'.
* defs.h (read_command_lines_1): Add missing 'void'.
	* cli/cli-script.c (recurse_read_control_structure): Add missing
	'void'.
	(read_next_line): Likewise.
	(read_command_lines_1): Likewise.
2010-03-02 21:46:28 +00:00
Ulrich Weigand ce50d78b10 * spu-tdep.c (spu_analyze_prologue): Track instruction to
store backchain as part of prologue.
2010-03-02 20:21:08 +00:00
Daniel Jacobowitz 7e9af34afe * progspace.c (update_address_spaces): Update inferior address spaces
also.
2010-03-02 17:55:39 +00:00
Doug Evans 01637564ba * dwarf2read.c (add_partial_subprogram): Add missing baseaddr to
lowpc,highpc args to addrmap_set_empty.
2010-03-02 17:19:58 +00:00
Daniel Jacobowitz 0b6ae52290 * NEWS: Document .ARM.exidx / .ARM.extab support.
* dwarf.c (read_leb128): Make non-static.
	* dwarf.h (read_leb128): Declare.
	* readelf.c (REMOVE_ARCH_BITS): Define.
	(find_section_by_address): New.
	(read_uleb128): Move higher.  Use read_leb128 from dwarf.c.
	(find_symbol_for_address): Handle the Thumb bit for ARM, by
	using REMOVE_ARCH_BITS.
	(struct arm_section, struct arm_unw_aux_info, arm_print_vma_and_name)
	(arm_free_section, arm_section_get_word, decode_arm_unwind)
	(dump_arm_unwind, arm_process_unwind): New.
	(process_unwind): Handle ARM.
2010-03-02 16:44:34 +00:00
H.J. Lu 1ba53b71ca Support x86 pseudo byte, word and dword registers.
gdb/

2010-03-02  H.J. Lu  <hongjiu.lu@intel.com>

	* amd64-tdep.c (amd64_byte_names): New.
	(amd64_word_names): Likewise.
	(amd64_dword_names): Likewise.
	(amd64_pseudo_register_name): Likewise.
	(amd64_pseudo_register_read): Likewise.
	(amd64_pseudo_register_write): Likewise.
	(amd64_init_abi): Set num_byte_regs, num_word_regs, num_dword_regs
	and num_mmx_regs.  Call set_gdbarch_pseudo_register_read,
	set_gdbarch_pseudo_register_write and
	set_tdesc_pseudo_register_name.  Don't call
	set_gdbarch_num_pseudo_regs.  Don't set mm0_regnum.

	* i386-tdep.c (i386_num_mmx_regs): Removed.
	(i386_num_pseudo_regs): Likewise.
	(i386_byte_names): New.
	(i386_word_names): Likewise.
	(i386_byte_regnum_p): Likewise.
	(i386_word_regnum_p): Likewise.
	(i386_mmx_regnum_p): Updated.
	(i386_pseudo_register_name): Make it global.  Handle byte and
	word pseudo-registers.
	(i386_pseudo_register_read): Likewise.
	(i386_pseudo_register_write): Likewise.
	(i386_pseudo_register_type): Handle byte, word and dword
	pseudo-registers
	(i386_register_reggroup_p): Don't include pseudo
	registers, except for MXX, in any register groups.  Don't
	include pseudo byte, word, dword registers in general_reggroup.
	(i386_gdbarch_init): Set num_byte_regs, num_word_regs,
	num_dword_regs, al_regnum, ax_regnum and eax_regnum.  Put MMX
	pseudo-registers after word pseudo-registers.  Call
	set_gdbarch_num_pseudo_regs after calling gdbarch_init_osabi.

	* i386-tdep.h (gdbarch_tdep): Add num_mmx_regs, num_byte_regs,
	al_regnum, num_word_regs, ax_regnum, num_dword_regs and
	eax_regnum.
	(i386_byte_regnum_p): New.
	(i386_word_regnum_p): Likewise.
	(i386_dword_regnum_p): Likewise.
	(i386_pseudo_register_name): Likewise.
	(i386_pseudo_register_read): Likewise.
	(i386_pseudo_register_write): Likewise.

gdb/testsuite/

2010-03-02  H.J. Lu  <hongjiu.lu@intel.com>

	* gdb.arch/amd64-byte.exp: New.
	* gdb.arch/amd64-dword.exp: Likewise.
	* gdb.arch/amd64-pseudo.c: Likewise.
	* gdb.arch/amd64-word.exp: Likewise.
	* gdb.arch/i386-byte.exp: Likewise.
	* gdb.arch/i386-pseudo.c: Likewise.
	* gdb.arch/i386-word.exp: Likewise.
2010-03-02 13:14:36 +00:00
Matthew Gretton-Dann 5488d830ec * ld/testsuite/ld-arm/arm-merge-incompatible.d: New test.
* ld/testsuite/ld-arm/arm-merge-incompatiblea.s: Likewise.
	* ld/testsuite/ld-arm/arm-merge-incompatibleb.s: Likewise.
	* ld/testsuite/ld-arm/arm-elf.exp: Run the new test.
	* bfd/elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
	return value from the call to _bfd_elf_merge_object_attributes.
2010-03-02 11:40:24 +00:00
Andrew Stubbs 772657e995 2010-03-02 Andrew Stubbs <ams@codesourcery.com>
* config/tc-sh.c (get_specific): Move overflow checking code to avoid
	reading uninitialized data.
2010-03-02 09:32:21 +00:00