Commit Graph

70697 Commits

Author SHA1 Message Date
Pedro Alves 15148d6a1d 2011-09-14 Pedro Alves <pedro@codesourcery.com>
* infrun.c (prepare_for_detach, wait_for_inferior)
	(fetch_inferior_event): Don't flush the register cache.
	* remote.c (struct stop_reply) <regcache>: Add comment.
2011-09-14 12:26:29 +00:00
Cary Coutant ebb300b244 * configure.ac: Check for glibc support for gnu_indirect_function
support with static linking, setting automake conditional
	IFUNC_STATIC.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

	* testsuite/Makefile.am (ifuncmain1static, ifuncmain2static)
	(ifuncmain4static, ifuncmain5static, ifuncmain7static): Add check
	for IFUNC_STATIC.
	* testsuite/Makefile.in: Regenerate.
2011-09-14 01:29:01 +00:00
Cary Coutant 1206d0d514 * incremental.cc (Sized_relobj_incr::do_layout): Call
report_comdat_group for kept comdat sections.
	* testsuite/Makefile.am (incremental_comdat_test_1): New test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/incr_comdat_test_1.cc: New source file.
	* testsuite/incr_comdat_test_2_v1.cc: New source file.
	* testsuite/incr_comdat_test_2_v2.cc: New source file.
	* testsuite/incr_comdat_test_2_v3.cc: New source file.
2011-09-14 01:10:43 +00:00
gdbadmin bc99db5140 *** empty log message *** 2011-09-14 00:00:33 +00:00
Alan Modra e3ae1ce459 daily update 2011-09-14 00:00:06 +00:00
Jan Kratochvil d83e736b11 gdb/
Remove excessive DWARF expressions memory duplication.
	* dwarf2loc.c (per_cu_dwarf_call): Remove variable back_to and its use
	for block.data.
	(indirect_pieced_value): Remove variable result.  Remove variable
	back_to and its use for baton.data.
	(dwarf2_compile_expr_to_ax): Remove variable back_to and its use for
	block.data.
	* dwarf2read.c (dwarf2_fetch_die_location_block): Remove xmemdup.
	Update the function comment.
2011-09-13 21:44:27 +00:00
Jan Kratochvil 0935723e5e gdb/testsuite/
* gdb.python/py-events.exp: Remove pretty printing comment.
	* gdb.python/py-evsignal.exp: New file.
	* gdb.python/py-evthreads.c: Include signal.h.
	(thread3): Remove variable count3.  Remove variable bad and use raise
	instead.
	(thread2): Remove variable count2.  Move thread3 pthread_create here,
	merge pthread_join to a single line.
	(main): Remove variable count1.  Merge pthread_join with pthread_create
	to a single line.
	* gdb.python/py-evthreads.exp: Remove pretty printing comment.  New
	KFAIL python/12966 for gdbserver.  Test return value of
	gdb_compile_pthreads.  Use gdb_run_cmd.  Replace send_gdb and
	gdb_expect by gdb_test and gdb_test_multiple.
	(thread 2, thread 3): New tests.
2011-09-13 21:39:59 +00:00
Pedro Alves c65b3e0d43 2011-09-13 Pedro Alves <pedro@codesourcery.com>
* inferior.h (ALL_INFERIORS): New.
	* linux-thread-db.c (thread_db_find_new_threads_2): Remove check
	for a stopped thread.
	(thread_db_find_new_threads): Look for threads in all inferiors.
2011-09-13 19:27:01 +00:00
Pedro Alves a1398e0c56 2011-09-13 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c (update_watchpoint): Handle the case of the
	watchpoint to update not being in the breakpoint list yet.
	(hw_watchpoint_use_count): New, factored out from
	hw_watchpoint_used_count.
	(hw_watchpoint_used_count): Rename to ...
	(hw_watchpoint_used_count_others): ... this.  Add `except'
	parameter.  Don't count resources of `except'.  Use
	hw_watchpoint_use_count.
2011-09-13 16:37:13 +00:00
Ian Lance Taylor 40b2987463 * object.cc (Sized_relobj_file::do_layout): Remove unused local
variable external_symbols_offset.
2011-09-13 16:16:51 +00:00
Pedro Alves 305962315a 2011-09-13 Pedro Alves <pedro@codesourcery.com>
* gdbthread.h (enum thread_state): Moved here.
	(struct thread_info): Rename `executing_' field to `executing' and
	`state_' to `state'.
	* thread.c (enum thread_state): Moved to gdbthread.h.
	(new_thread, add_thread_silent, delete_thread_1)
	(any_live_thread_of_process, thread_alive, set_running)
	(set_running, is_thread_state, any_running, is_executing)
	(set_executing, finish_thread_state, print_thread_info)
	(do_captured_thread_select): Adjust.
2011-09-13 14:48:55 +00:00
Jan Kratochvil bede5f5f81 gdb/
Fix compatibility with gcc < 4.3 and non-gcc compilers.
	* amd64-tdep.c (amd64_skip_xmm_prologue): Convert 0b constants.
2011-09-13 08:26:11 +00:00
Alan Modra 29d3e15313 daily update 2011-09-13 00:00:05 +00:00
gdbadmin 43e4b79620 *** empty log message *** 2011-09-13 00:00:02 +00:00
Pedro Alves 4801a9a356 gdb/
2011-09-12  Pedro Alves  <pedro@codesourcery.com>
	    Matt Rice  <ratmice@gmail.com>

	PR gdb/13175

	* interps.c (struct interp) <interpreter_out>: Delete field.
	(interp_new): Remove the data and uiout parameters and adjust.
	(interp_set): Only set the current_uiout from the interpreter's
	uiout after initializing the interpreter.  Adjust call to
	init_proc.
	(interp_ui_out): Adjust to call procs->ui_out_proc.
	(interp_data, interp_name): New.
	* interps.h (interp_init_ftype): Add `self' parameter.
	(interp_ui_out_ftype): New typedef.
	(struct interp_procs) <ui_out_proc>: New method pointer.
	(interp_new): Remove the data and uiout parameters.
	(interp_data, interp_name): Declare.
	* tui/tui-interp.c (tui_init): Adjust prototype.
	(tui_ui_out): New.
	(_initialize_tui_interp): Install tui_ui_out.  Don't instanciate
	tui_out here.  Adjust call to interp_new.
	* tui/tui-io.c (tui_initialize_io): Don't set current_uiout here.
	* cli/cli-interp.c (cli_interpreter_init): Adjust prototype.
	(cli_ui_out): New.
	(_initialize_cli_interp): Install it.  Adjust call to interp_new.
	* mi/mi-common.h (struct mi_interp) <uiout>: New field.
	* mi/mi-interp.c (mi_interpreter_init): Adjust prototype.
	Initialize mi->uiout depending on the mi_version as extracted from
	the interpreter's name.
	(mi_ui_out): New.
	(_initialize_mi_interp): Install mi_ui_out.  Adjust calls to
	interp_new.  Don't allocate the ui_out's of the interpreters here.

gdb/testsuite/
2011-09-12  Matt Rice  <ratmice@gmail.com>
	    Pedro Alves  <pedro@codesourcery.com>

	PR gdb/13175

	* gdb.base/interp.exp: New tests.
	* gdb.base/interp.c: New file.
2011-09-12 21:25:22 +00:00
Aleksandar Ristovski d0afda0369 * ChangeLog: Fix comment and date. 2011-09-12 19:02:01 +00:00
Aleksandar Ristovski 59145f8cfb * solib.c (solib_used): New function.
(update_solib_list, reload_shared_libraries_1): Check if objfile is used
    by another so_list object before freeing it.
2011-09-12 19:00:22 +00:00
H.J. Lu 7b5b197e80 Use .got.plt for IFUNC symbols if there are no GOT relocations.
bfd/

2011-09-12  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/13178
	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Use .got.plt
	if there are no GOT relocations.

ld/testsuite/

2011-09-12  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/13178
	* ld-ifunc/ifunc-13-i386.d: Updated.
	* ld-ifunc/ifunc-13-x86-64.d: Likewise.
	* ld-ifunc/ifunc-3a-x86.d: Likewise.
	* ld-x86-64/pr13082-5a.d: Likewise.

	* ld-ifunc/ifunc-15-i386.d: New.
	* ld-ifunc/ifunc-15-i386.s: Likewise.
	* ld-ifunc/ifunc-15-x86-64.d: Likewise.
	* ld-ifunc/ifunc-15-x86-64.s: Likewise.
2011-09-12 18:17:36 +00:00
Doug Evans 24ece742a0 * gdb.dwarf2/clztest.exp: Fix initialization of tests array.
* gdb.dwarf2/typeddwarf.exp: Ditto.
2011-09-12 18:07:22 +00:00
Ian Lance Taylor 1b045aac31 * object.cc (Sized_relobj_file::do_layout): Remove assertion which
triggered if object has no symbols.
2011-09-12 17:34:26 +00:00
gdbadmin caa900384a *** empty log message *** 2011-09-12 00:00:33 +00:00
Alan Modra 3079918dc3 daily update 2011-09-12 00:00:05 +00:00
Jan Kratochvil bdaf8d4acd gdb/
Code cleanup.
	* mi/mi-cmd-stack.c (list_args_or_locals): Use enum for the parameter
	values.
2011-09-11 09:54:18 +00:00
Alan Modra 14a65e3755 daily update 2011-09-11 00:00:06 +00:00
gdbadmin d9ff937efe *** empty log message *** 2011-09-11 00:00:05 +00:00
Andreas Schwab b2ea18299b Add PR markers 2011-09-10 08:13:45 +00:00
David S. Miller 24c6c55a13 * output.cc (Output_fill_debug_info::do_write): Use Swap_unaligned.
(Output_fill_debug_line::do_write): Likewise.
2011-09-10 05:15:43 +00:00
Alan Modra 17b03c24fb daily update 2011-09-10 00:00:05 +00:00
gdbadmin 8f00849d11 *** empty log message *** 2011-09-10 00:00:03 +00:00
Jan Kratochvil df15bd07df gdb/
Code cleanup.
	* amd64-tdep.c (amd64_skip_prologue): Move the XMM code to ...
	(amd64_skip_xmm_prologue): ... this new function.  Describe its
	parameters.  No longer use amd64_prologue_line_bug.
	* defs.h (producer_is_gcc_ge_4): New declaration.
	* dwarf2read.c (producer_is_gcc_ge_4): Move to utils.c.
	(process_full_comp_unit): Update its caller.  Remove
	amd64_prologue_line_bug initialization.
	* symtab.h (struct symtab): Remove field amd64_prologue_line_bug.
	* utils.c (producer_is_gcc_ge_4): Moved here from dwarf2read.c.
2011-09-09 19:41:14 +00:00
Pedro Alves ddf17726b2 Fixup last entry.
2011-09-09  Pedro Alves  <pedro@codesourcery.com>

	* linux-nat.h (enum resume_kind): New.
	(struct lwp_info) <last_resume_kind>: New field.
	* linux-nat.c (linux_child_follow_fork): Set last_resume_kind to
	resume_stop on the new lwp.
	(add_lwp): Set last_resume_kind as resume_continue by default.
	(lin_lwp_attach_lwp): Set last_resume_kind as resume_stop.
	(resume_lwp): New, factored out from resume_callback.  Also check
	for pending status in lp->waitstatus.
	(resume_callback): Reimplement.
	(resume_clear_callback): Set last_resume_kind as resume_stop.
	(resume_set_callback): Set last_resume_kind as resume_continue.
	(linux_nat_resume, linux_handle_extended_wait): Set
	last_resume_kind.
	(running_callback): Also check lp->waitstatus for pending events.
	(select_singlestep_lwp_callback): Check that lp->last_resume_kind
	is resume_step.
	(stop_and_resume_callback): Don't re-resume if the core wanted the
	lwp stopped.  Use resume_lwp instead of resume_callback.  Avoid
	using an invalidated pointer.
	(linux_nat_filter_event): Don't discard SIGSTOPs as delayed
	SIGSTOPs if the core wanted the LWP to stop.
	(linux_nat_wait_1) Don't consume a pending SIGSTOP if the core
	wanted the lwp to stop.  If the core wanted the lwp to stop, and
	the lwp stopped with a SIGSTOP, report a TARGET_SIGNAL_0 instead
	of TARGET_SIGNAL_STOP.
	(linux_nat_stop_lwp): Don't synchronously wait for the lwp to stop
	here.  Instead, signal the lwp, and set the last_resume_kind to
	resume_stop.
2011-09-09 19:29:51 +00:00
Pedro Alves 25289eb274 2011-09-09 Pedro Alves <pedro@codesourcery.com>
* linux-nat.h (enum resume_kind): New.
	(struct lwp_info) <last_resume_kind>: New field.
	(linux_child_follow_fork): Set last_resume_kind to resume_stop on
	the new lwp.
	(add_lwp): Set last_resume_kind as resume_continue by default.
	(lin_lwp_attach_lwp): Set last_resume_kind as resume_stop.
	(resume_lwp): New, factored out from resume_callback.  Also check
	for pending status in lp->waitstatus.
	(resume_callback): Reimplement.
	(resume_clear_callback): Set last_resume_kind as resume_stop.
	(resume_set_callback): Set last_resume_kind as resume_continue.
	(linux_nat_resume, linux_handle_extended_wait): Set
	last_resume_kind.
	(running_callback): Also check lp->waitstatus for pending events.
	(select_singlestep_lwp_callback): Check that lp->last_resume_kind
	is resume_step.
	(stop_and_resume_callback): Don't re-resume if the core wanted the
	lwp stopped.  Use resume_lwp instead of resume_callback.  Avoid
	using an invalidated pointer.
	(linux_nat_filter_event): Don't discard SIGSTOPs as delayed
	SIGSTOPs if the core wanted the LWP to stop.
	(linux_nat_wait_1) Don't consume a pending SIGSTOP if the core
	wanted the lwp to stop.  If the core wanted the lwp to stop, and
	the lwp stopped with a SIGSTOP, report a TARGET_SIGNAL_0 instead
	of TARGET_SIGNAL_STOP.
	(linux_nat_stop_lwp): Don't synchronously wait for the lwp to stop
	here.  Instead, signal the lwp, and set the last_resume_kind to
	resume_stop.
2011-09-09 19:27:50 +00:00
Pedro Alves f687d03564 2011-09-09 Pedro Alves <pedro@codesourcery.com>
* linux-nat.c (lin_lwp_attach_lwp): Return 1 (ignore) instead of
	-1 (error), if the lwp exits right after attaching.
2011-09-09 19:20:24 +00:00
Kai Tietz e777132256 2011-09-09 Kai Tietz <ktietz@redhat.com>
* peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore
        for targets without symbol_leading_char.
2011-09-09 16:28:12 +00:00
Alan Modra a301ba0b9a daily update 2011-09-09 00:00:05 +00:00
gdbadmin 5f246d3146 *** empty log message *** 2011-09-09 00:00:02 +00:00
Stan Shebs bf15cbda54 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
(i386_emit_epilogue): Restore %ebx.
2011-09-08 22:38:29 +00:00
Doug Evans 63d97a2024 * py-cmd.c: Some minor formatting fixes.
(gdbpy_parse_command_name): Rename text arg to name, make const.
	All callers updated.
	* python-internal.h (gdbpy_parse_command_name): Update.
2011-09-08 19:51:27 +00:00
David S. Miller 8dbb9eb3c6 opcodes/
* sparc-opc.c (sparc_opcodes): Add entry for 'save simm13,regrs1,regrd'
	This has been reported as being accepted by the Sun assmebler.

gas/testsuite/

	* gas/sparc/save-args.[sd]: New test.
	* gas/sparc/sparc.exp: Run new test.
2011-09-08 19:03:17 +00:00
David S. Miller 9bf29d72d4 opcodes/
The changes below bring 'mov' and 'ticc' instructions into line
	with the V8 SPARC Architecture Manual.
	* sparc-opc.c (sparc_opcodes): Add entry for 'ticc imm + regrs1'.
	* sparc-opc.c (sparc_opcodes): Add alias entries for
	'mov regrs2,%asrX'; 'mov regrs2,%y'; 'mov regrs2,%prs';
	'mov regrs2,%wim' and 'mov regrs2,%tbr'.
	* sparc-opc.c (sparc_opcodes): Move/Change entries for
	'mov imm,%asrX'; 'mov imm,%y'; 'mov imm,%prs'; 'mov imm,%wim'
	and 'mov imm,%tbr'.
	* sparc-opc.c (sparc_opcodes): Add wr alias entries to match above
	mov aliases.

gas/testsuite/

	* gas/sparc/ticc-imm-reg.[sd]: New test.
	* gas/sparc/v8-movwr-imm.[sd]: New test.
	* gas/sparc/sparc.exp: Run new tests.
2011-09-08 19:01:11 +00:00
Jan Kratochvil 7f06221767 gdb/testsuite/
Fix compatibility with x32 arch.
	* testsuite/gdb.dwarf2/typeddwarf.exp: Check also is_lp64_target.
	* testsuite/gdb.trace/backtrace.exp: Use is_amd64_regs_target and
	is_x86_like_target.
	* testsuite/gdb.trace/collection.exp: Likewise.
	* testsuite/gdb.trace/report.exp: Likewise.
	* testsuite/gdb.trace/unavailable.exp: Likewise.
	* testsuite/gdb.trace/while-dyn.exp: Likewise.
	* testsuite/lib/gdb.exp (is_amd64_regs_target): New function.
	(is_x86_like_target): Check also is_amd64_regs_target.
2011-09-08 17:40:54 +00:00
Doug Evans bc587a6bd2 * cli/cli-decode.c (add_cmd): Add comment. 2011-09-08 17:20:43 +00:00
David S. Miller f124dd4f3f gas/
* config/tc-sparc.c (sparc_ip): Handle 'i' + r<0..31>
	in addition to 'i' + [goli]<0..7>.

gas/testsuite/

	* gas/sparc/imm-plus-rreg.[sd]: New test.
	* gas/sparc/sparc.exp: Run new test.
2011-09-08 16:56:10 +00:00
David S. Miller cdf492019f opcodes/
* sparc-opc.c (pdistn): Destination is integer not float register.

gas/testsuite/

	* gas/sparc/hpcvis3.s: Correct pdistn test.
	* gas/sparc/hpcvis3.d: Likewise.
2011-09-08 16:40:47 +00:00
Nick Clifton 7b01d2c3ae * po/ja.po: Updated Japanese translation. 2011-09-08 16:09:57 +00:00
Nick Clifton 32425e36f3 * cgen.c (gas_cgen_pcrel_r_type): New function.
(gas_cgen_tc_gen_reloc): Check for GAS_CGEN_PCREL_R_TYPE.
	* cgen.h (gas_cgen_pcrel_r_type): Declare.
2011-09-08 16:07:11 +00:00
Nick Clifton 103ae312ba * bfdwin.c (bfd_get_file_window): Fix memory leak. 2011-09-08 16:06:11 +00:00
Jan Kratochvil 08711b9a36 gdb/
PR breakpoints/12435
	* amd64-tdep.c (amd64_skip_prologue): New variables start_pc_sal,
	next_sal, buf, offset and xmmreg.  Advance PC if it sees the PR.
	* dwarf2read.c (process_full_comp_unit): Initialize
	amd64_prologue_line_bug.
	* symtab.h (struct symtab): New field amd64_prologue_line_bug.

gdb/testsuite/
	PR breakpoints/12435
	* gdb.arch/amd64-prologue-xmm.c: New file.
	* gdb.arch/amd64-prologue-xmm.exp: New file.
	* gdb.arch/amd64-prologue-xmm.s: New file.
2011-09-08 15:38:16 +00:00
Jan Kratochvil b2e7f004c7 gdb/
Fix TUI screen corruption.
	* utils.c (fputs_maybe_filtered): Replace !input_from_terminal_p by
	batch_flag.
2011-09-08 15:27:46 +00:00
Jan Kratochvil 8afd712c6f gdb/
* findvar.c (read_var_value): Never return NULL, throw an error
	instead.  Update the function comment.  State symbol name in the error
	messages.
	* python/py-frame.c (frapy_read_var): Remove handling of NULL from
	read_var_value.
	* stack.c (print_frame_args): Likewise.
	* valops.c (value_of_variable): Likewise.
2011-09-08 15:26:08 +00:00