Commit Graph

66645 Commits

Author SHA1 Message Date
Tom Tromey c92817ce8d gdb
PR symtab/11919:
	* gdbtypes.c (lookup_struct_elt_type): Clean up error emission.
	* parse.c (parse_field_expression): Use RETURN_MASK_ERROR.  Move
	name-copying lower.  Document exception behavior.
	* completer.c (expression_completer): Catch exceptions from
	parse_field_expression.
gdb/testsuite
	PR symtab/11919:
	* gdb.base/completion.exp: Add test.
2010-08-18 19:02:34 +00:00
Cary Coutant 55455f8927 * common.cc (Sort_commons::operator()): Remove unnecessary code. 2010-08-18 18:33:05 +00:00
Thiago Jung Bauermann 66b73624e8 * gdb.texinfo (PowerPC Embedded): Mention support for the DVC register. 2010-08-18 17:58:48 +00:00
Doug Evans f1208f9e0a * gdb.base/call-ar-st.exp (set_lang_c): Delete, unused.
* gdb.base/callfuncs.exp (set_lang_c): Delete, set c language directly.
	* gdb.base/printcmds.exp (set_lang_c): Delete, set c language directly.
	Simplify, early exit if runto_main fails.
	* gdb.fortran/exprs.exp: load_lib fortran.exp.
	(set_lang_fortran): Moved to lib/fortran.exp.
	* gdb.fortran/types.exp: load_lib fortran.exp.
	(set_lang_fortran): Moved to lib/fortran.exp.
	* gdb.java/jmisc.exp (set_lang_java): Moved to lib/java.exp.
	* gdb.java/jprint.exp (set_lang_java): Ditto.
	* gdb.java/jv-exp.exp: load_lib java.exp.
	If set_lang_java fails, issue a warning instead of failure to be
	consistent with other set_lang_foo uses.
	(set_lang_java): Moved to lib/java.exp.
	* gdb.java/jv-print.exp (set_lang_java): Moved to lib/java.exp.
	If set_lang_java fails, issue a warning instead of failure to be
	consistent with other set_lang_foo uses.
	* gdb.pascal/types.exp: load_lib pascal.exp.
	(set_lang_pascal): Moved to lib/pascal.exp.
	* lib/fortran.exp: New file.
	* lib/java.exp (set_lang_java): New function.
	* lib/pascal.exp (set_lang_pascal): New function.
2010-08-18 16:37:22 +00:00
Pedro Alves 856d6f99ff PR corefile/8210
* linux-thread-db.c (add_thread_db_info): Skip glibc/BZ5983
	workaround on core files.
	(try_thread_db_load_1): Don't try enabling thread event reporting
	on core files.
	(thread_db_load): Allow thread_db on core files.
	(attach_thread): Don't check thread signals on core files, nor try
	really attaching to the thread, nor enabling thread event event
	reporting.
	(thread_db_detach): Don't try disabing thread event reporting or
	removing thread event breakpoints when debugging a core file.
	(find_new_threads_callback): Don't try enabling thread event
	reporting on core files.
	(thread_db_find_new_threads_2): Don't look for a stopped lwp when
	debugging a core file.
	(thread_db_find_new_threads): Don't update thread
	cores (processors) when debugging a core (dump).
2010-08-18 12:25:49 +00:00
Pedro Alves 261b8d0859 2010-08-18 Pedro Alves <pedro@codesourcery.com>
PR corefile/8210

	bfd/
	* bfd-in2.h: Regenerate.
	* corefile.c (bfd_core_file_pid): New.

	* targets.c (BFD_JUMP_TABLE_CORE): Add NAME##_core_file_pid.
	(struct bfd_target) <_core_file_pid>: New.

	* libbfd-in.h (_bfd_nocore_core_file_pid): Declare.
	* libbfd.c (_bfd_nocore_core_file_pid): New.

	* elf-bfd.h (bfd_elf32_core_file_pid, bfd_elf64_core_file_pid):
	Declare.
	* elfcode.h (elf_core_file_pid): New define.
	* elfcore.h (elf_core_file_pid): New function.

	* elf.c (elfcore_make_pid): Rewrite.
	(elfcore_grok_prstatus): Only set core_pid if not set yet.
	(elfcore_grok_prstatus) [!HAVE_PRSTATUS_T_PR_WHO]: Fallback to
	getting the lwpid from prstat.pr_pid.

	* elf64-x86-64.c (elf64_x86_64_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	(elf64_x86_64_grok_psinfo): Extract the the main process's PID,
	and store it in elf_tdata's core_pid field.
	* elf32-i386.c (elf_i386_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	(elf_i386_grok_psinfo): Extract the the main process's PID, and
	store it in elf_tdata's core_pid field.

	* elf32-am33lin.c (elf32_am33lin_grok_prstatus): Write the LWPID
	to elf_tdata's core_lwpid instead of to core_pid.
	* elf32-arm.c (elf32_arm_nabi_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elf32-cris.c (cris_elf_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elf32-frv.c (elf32_frv_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elf32-hppa.c (elf32_hppa_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elf32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elf32-ppc.c (ppc_elf_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elf32-s390.c (elf_s390_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elf32-score.c (s3_bfd_score_elf_grok_prstatus): Write the LWPID
	to elf_tdata's core_lwpid instead of to core_pid.
	* elf32-score7.c (s7_bfd_score_elf_grok_prstatus): Write the LWPID
	to elf_tdata's core_lwpid instead of to core_pid.
	* elf32-sh.c (elf32_shlin_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elf32-xtensa.c (elf_xtensa_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elf64-hppa.c (elf64_hppa_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elf64-mips.c (elf64_mips_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elf64-ppc.c (ppc64_elf_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.
	* elfn32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
	elf_tdata's core_lwpid instead of to core_pid.

	* plugin.c (bfd_plugin_core_file_pid): New function.
	* aout-target.h (MY_core_file_pid): Define.
	* aout-tic30.c (MY_core_file_pid, MY_core_file_p): New defines.
	* coff-rs6000.c (coff_core_file_pid): New define.
	(rs6000coff_vec, pmac_xcoff_vec): Use BFD_JUMP_TABLE_CORE.
	* coff64-rs6000.c (coff_core_file_pid): New define.
	(rs6000coff64_vec): Use BFD_JUMP_TABLE_CORE.
	(xcoff64_core_file_pid): New define.
	(aix5coff64_vec): Use BFD_JUMP_TABLE_CORE.
	* mach-o-target.c (bfd_mach_o_core_file_pid): New define.
	* aix386-core.c (aix386_core_file_pid): New define.
	* hppabsd-core.c (hppabsd_core_core_file_pid): New define.
	* hpux-core.c (hpux_core_core_file_pid): New define.
	* irix-core.c (irix_core_core_file_pid): New define.
	* lynx-core.c (lynx_core_file_pid): New define.
	* osf-core.c (osf_core_core_file_pid): New define.
	* ptrace-core.c (ptrace_unix_core_file_pid): New define.
	* sco5-core.c (sco5_core_file_pid): New define.
	* xcoff-target.h (coff_core_file_pid): New define.
	* netbsd-core.c (netbsd_core_core_file_pid): New define.

gdb/
2010-08-18  Pedro Alves  <pedro@codesourcery.com>

	PR corefile/8210

	gdb/
	* corelow.c (add_to_thread_list): Don't use
	gdbarch_core_reg_section_encodes_pid.  Use bfd_core_file_pid.
	(get_core_register_section): Don't use
	gdbarch_core_reg_section_encodes_pid.

	* gdbarch.sh (core_reg_section_encodes_pid): Delete.
	* gdbarch.h, gdbarch.c: Regenerate.
	* amd64-sol2-tdep.c (amd64_sol2_init_abi): Don't set
	gdbarch_core_reg_section_encodes_pid.
	* i386-sol2-tdep.c (i386_sol2_init_abi): Ditto.
	* sparc-sol2-tdep.c (sparc32_sol2_init_abi): Ditto.
	* sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Ditto.
2010-08-18 12:24:13 +00:00
Alan Modra d1f52f54d5 * macro.c (sub_actual): Add back ampersand suffix when no
substitution.
	(macro_expand_body): Correct comment.
2010-08-18 05:56:41 +00:00
Yao Qi 2f06b48590 Forget to check in ChangeLog in my previous commit.
http://sourceware.org/ml/gdb-cvs/2010-08/msg00098.html
2010-08-18 03:20:46 +00:00
Yao Qi 161f255e5d In order to fix a checkin mistake in dw2-ref-missing-frame-func.c:r1.2,
revert it back, and re-apply the correct patch again.

2010-08-18  Yao Qi  <yao@codesourcery.com

	* gdb.dwarf2/dw2-ref-missing-frame-func.c: Add .p2align 4 for labels
	func_nofb_start and func_loopfb_start, so that address of functions
	is equal to these labels on Thumb.
2010-08-18 03:16:05 +00:00
Yao Qi 3ea72677a8 revert back to previous revision 2010-08-18 03:06:39 +00:00
Yao Qi 5ff2d1e602 2010-08-18 Yao Qi <yao@codesourcery.com
* gdb.dwarf2/dw2-ref-missing-frame-func.c: Add .p2align 4 for labels
	func_nofb_start and func_loopfb_start, so that address of functions
	is equal to these labels on Thumb.
2010-08-18 02:44:02 +00:00
Yao Qi 96e254033d 2010-08-18 Yao Qi <yao@codesourcery.com>
* gdb.gdb/selftest.exp (do_steps_and_nexts): Update test case
	to reflect latest c source file.
2010-08-18 02:30:07 +00:00
Yao Qi f9b42018ba 2010-08-18 Yao Qi <yao@codesourcery.com>
* MAINTAINERS : Add myself under Write After Approval.
2010-08-18 02:24:47 +00:00
H.J. Lu f9818820ab Add missing files. 2010-08-18 00:43:46 +00:00
gdbadmin 5059716008 *** empty log message *** 2010-08-18 00:00:34 +00:00
Alan Modra 763bc56620 daily update 2010-08-18 00:00:06 +00:00
Tom Tromey def98928e2 * NEWS: Mention template parameter support. 2010-08-17 21:34:12 +00:00
Jan Kratochvil 36e6adc4a7 gdb/testsuite/
* gdb.cp/infcall-dlopen.exp: New file.
	* gdb.cp/infcall-dlopen.cc: New file.
	* gdb.cp/infcall-dlopen-lib.cc: New file.
2010-08-17 21:31:13 +00:00
Pedro Alves 0807b50c1a * breakpoint.c (decref_bp_location): Assert the reference count is
sane.
2010-08-17 21:12:32 +00:00
Pedro Alves f431efe540 gdb/
2010-08-17  Pedro Alves  <pedro@codesourcery.com>

	PR breakpoints/11371

	* breakpoint.c (breakpoint_init_inferior): Decrement the
	location's reference count instead of deleting right away.
	(bpstat_free): Decrement the location's reference count.  Make
	static.
	(bpstat_copy): Increment the location's reference count.
	(bpstat_find_breakpoint): Adjust.
	(bpstat_num): Adjust.
	(print_it_typical): Adjust.  Use the breakpoint pointer in the
	bpstat instead of the location's owner.
	(bpstat_alloc): Remove const qualifier from the 'bl' parameter.
	Adjust to record the location's owner in the bpstat.
	(watchpoint_check): Use the breakpoint pointer in the bpstat
	instead of the location's owner.
	(bpstat_check_breakpoint_conditions): Don't handle
	bp_watchpoint_scope here.  Use the breakpoint pointer in the
	bpstat instead of the location's owner.
	(bpstat_stop_status): Defer inferior function calls to after
	building the bpstat list.  Handle bp_watchpoint_scope here.  Use
	the breakpoint pointer in the bpstat instead of the location's
	owner.
	(bpstat_what): Use the breakpoint pointer in the bpstat instead of
	the location's owner.
	(free_bp_location): Don't walk bpstats clearing locations.
	(incref_bp_location): New.
	(decref_bp_location): New.
	(breakpoint_auto_delete): Use the breakpoint pointer in the bpstat
	instead of the location's owner.
	(update_global_location_list): Clear the location's owner, and
	decrement the location's reference count instead of deleting it
	right away.
	(breakpoint_retire_moribund): Decrement the location's reference
	count instead of deleting it right away.
	(bpstat_remove_bp_location): Delete.
	(bpstat_remove_breakpoint): New.
	(bpstat_remove_bp_location_callback): Delete.
	(bpstat_remove_breakpoint_callback): New.
	(delete_breakpoint): Iterate over all threads' stop_bpstat's
	clearing references to the breakpoint that is being deleted.

	* breakpoint.h (struct bp_location) <refc>: New field.
	<owner>: Update comments.
	(bpstat_free): Delete declaration.
	(struct bpstats): Change the type of the breakpoint_at field to
	struct breakpoint point, from struct bp_location pointer.  Add new
	field bp_location_at.

gdb/testsuite/
2010-08-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
	    Pedro Alves  <pedro@codesourcery.com>

	PR breakpoints/11371

	* gdb.base/watch-cond-infcall.exp: New file.
	* gdb.base/watch-cond-infcall.c: New file.
2010-08-17 20:59:04 +00:00
H.J. Lu 1ab03f4b26 Replace Eb with Mb on prefetch and prefetchw.
2010-08-17  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-dis.c (reg_table): Replace Eb with Mb on prefetch and
	prefetchw.
2010-08-17 20:37:26 +00:00
Roland McGrath 01642c122a Add "?" pseudo-flag to ELF .section/.pushsection directives. 2010-08-17 20:03:41 +00:00
Alan Modra ebf252ff9b daily update 2010-08-17 00:00:05 +00:00
gdbadmin 3025061652 *** empty log message *** 2010-08-17 00:00:03 +00:00
Tom Tromey 14c0d4e182 * NEWS: Fix typo. 2010-08-16 21:19:29 +00:00
Tom Tromey b56df87389 * NEWS: Mention watch -location. 2010-08-16 21:15:46 +00:00
Jan Kratochvil d63d0675b6 gdb/
* breakpoint.c (update_watchpoint): Add source empty line.  Prefer
	EXP_STRING_REPARSE to EXP_STRING.
	(watch_command_1): Set also EXP_STRING_REPARSE.
	(delete_breakpoint): Free also EXP_STRING_REPARSE.
	* breakpoint.h (struct breakpoint): New field exp_string_reparse.
	Update comment for exp_string.
2010-08-16 19:53:05 +00:00
Tom Tromey 06a64a0b78 gdb
* value.c (release_value): Clear 'next' pointer.
	* breakpoint.c (watch_command_1): Add 'just_location' argument.
	(watch_command_wrapper): Update.
	(watch_maybe_just_location): New function.
	(watch_command): Update.
	(rwatch_command_wrapper): Update.
	(rwatch_command): Update.
	(awatch_command_wrapper): Update.
	(awatch_command): Update.
	(check_for_argument): New function.
	(_initialize_breakpoint): Update help text.
gdb/testsuite
	* gdb.base/help.exp: Update.
	* gdb.base/watchpoint.exp (test_watchpoint_and_breakpoint): Delete
	watchpoint.
	(test_watch_location): New proc.
	(test_watchpoint_in_big_blob): Delete watchpoint.
	* gdb.base/watchpoint.c (func5): New function.
	(main): Call it.
gdb/doc
	* gdb.texinfo (Set Watchpoints): Document -location option.
2010-08-16 19:19:22 +00:00
Doug Evans 70ebf4ed1a * gdb.python/python.exp: Fix syntax in "post event insertion" test. 2010-08-16 18:01:40 +00:00
gdbadmin 2c1001f6e6 *** empty log message *** 2010-08-16 00:00:33 +00:00
Alan Modra 6e699ca72e daily update 2010-08-16 00:00:05 +00:00
gdbadmin 8363c56db8 *** empty log message *** 2010-08-15 00:00:33 +00:00
Alan Modra 36a05a46bf daily update 2010-08-15 00:00:05 +00:00
Ulrich Weigand f96b8fa002 * arm-tdep.c (arm_push_dummy_call): Handle pointers to
typedef'ed function types correctly.
2010-08-14 00:45:39 +00:00
Alan Modra 657fd239a4 daily update 2010-08-14 00:00:05 +00:00
gdbadmin 96e13ea4b9 *** empty log message *** 2010-08-14 00:00:04 +00:00
Tom Tromey 4eb5405278 * python/python-internal.h (gdbpy_get_hook_function): Don't
declare.
2010-08-13 20:50:47 +00:00
H.J. Lu 56d4289c6c Check if .got.plt section is discarded before using it.
bfd/

2010-08-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11913
	* elf32-i386.c (elf_i386_finish_dynamic_sections): Check if
	 .got.plt section is discarded.
	 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Likewise.

ld/testsuite/

2010-08-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11913
	* ld-i386/discarded1.d: New.
	* ld-i386/discarded1.s: Likewise.
	* ld-i386/discarded1.t: Likewise.
	* ld-x86-64/discarded1.d: Likewise.
	* ld-x86-64/discarded1.s: Likewise.
	* ld-x86-64/discarded1.t: Likewise.

	* ld-i386/i386.exp: Run discarded1.
	* ld-x86-64/x86-64.exp: Likewise.
2010-08-13 20:50:27 +00:00
Ian Lance Taylor e2054bcbe6 * testsuite/incremental_test_1.c: Add prototype to avoid warning. 2010-08-13 20:47:47 +00:00
Doug Evans a3a7127eb0 * gdb.texinfo (.debug_gdb_scripts section): Fix typo. 2010-08-13 20:39:09 +00:00
Jan Kratochvil 44be957ed6 gdb/
* cli-logging.c (logging_overwrite, logging_redirect): Make them
	static.
2010-08-13 17:35:39 +00:00
Ken Werner 76d8b686dc gdb:
* python/python.c (gdbpy_solib_name): Remove the const qualifier of
the format strings to be compatible with Python 2.4.
2010-08-13 16:19:48 +00:00
Nick Clifton dd24e3da30 PR binutils/11889
* readelf.c (get_32bit_elf_symbols): Check for a corrupt
        sh_entsize.
        (get_64bit_elf_symbols): Likewise.
        (process_symbol_table): Likewise.
        (process_section_groups): Check for corrupt headers.
        (process_version_sections): Check for corrupt indicies.
        (process_corefile_note_segment): Likewise.
2010-08-13 16:02:16 +00:00
Vladimir Prus 8dedea0203 Easier and more stubborn MI memory read commands.
* mi/mi-cmds.c (mi_cmds): Register data-read-memory-bytes
	and data-write-memory-bytes.
	* mi/mi-cmds.h (mi_cmd_data_read_memory_bytes)
	(mi_cmd_data_write_memory_bytes): New.
	* mi/mi-main.c (mi_cmd_data_read_memory): Use regular target_read.
	(mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory_bytes):
	New.
	(mi_cmd_list_features): Add "data-read-memory-bytes" feature.
	* target.c (target_read_until_error): Remove.
	(read_whatever_is_readable, free_memory_read_result_vector)
	(read_memory_robust): New.
	* target.h (target_read_until_error): Remove.
	(struct memory_read_result, free_memory_read_result_vector)
	(read_memory_robust): New.
2010-08-13 13:22:44 +00:00
Nathan Sidwell f608cd77e7 bfd/
* elf32-m69k.c (elf32_m68k_print_private_bfd_data): Detect EMAC_B
	variant.

	binutils/
	* readelf.c (get_machine_flags): Detect CF ISA C and EMAC_B
	variants.
2010-08-13 13:03:46 +00:00
Nick Clifton 9d8d6261e3 * argv.c (expandargv): Limit the number of times that response
files are opened in order to prevent infinite recursion.
2010-08-13 11:36:10 +00:00
Hui Zhu 1d9ec526ee 2010-08-13 Hui Zhu <teawater@gmail.com>
* dwarf2read.c (load_partial_comp_unit): Initialize free_cu_cleanup.
	(read_comp_unit): Initialize back_to.
2010-08-13 03:14:03 +00:00
Alan Modra 0ac6fba0ec * dwarf.c (process_debug_info): Don't subtract section address
when calculating location of cu abbrev within section.
2010-08-13 00:21:19 +00:00
Doug Kwan 74f6756095 2010-08-12 Cary Coutant <ccoutant@google.com>
Doug Kwan  <dougkwan@google.com>

	* resolve.cc (Symbol_table::should_override): When a weak dynamic
	defintion overrides non-weak undef, remember that the original undef
	is not weak.
	* symtab.cc (Symbol_table::sized_write_global): For undef without
	an original weak binding, set binding to global in output.
	* testsuite/Makefile.am: Add new test strong_ref_weak_def.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/strong_ref_weak_def.sh: New file.
	* testsuite/strong_ref_weak_def_1.c: Ditto.
	* testsuite/strong_ref_weak_def_2.c: Ditto.
2010-08-13 00:18:19 +00:00
gdbadmin e06bb621df *** empty log message *** 2010-08-13 00:00:33 +00:00