Commit Graph

27120 Commits

Author SHA1 Message Date
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
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
gdbadmin 8363c56db8 *** empty log message *** 2010-08-15 00:00:33 +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
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
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
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
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
gdbadmin e06bb621df *** empty log message *** 2010-08-13 00:00:33 +00:00
Pedro Alves 98bfdba52e 2010-08-12 Daniel Jacobowitz <dan@codesourcery.com>
Pedro Alves  <pedro@codesourcery.com>

	* dwarf2read.c: Include "c-lang.h" and "valprint.h".
	(struct dwarf2_per_objfile) <reading_partial_symbols>: New field.
	(struct partial_die_info) <has_template_arguments>: New field.
	<num_attrs>: Change type to unsigned char.
	<building_fullname>: New field.
	(dwarf2_build_psymtabs_hard): Set reading_partial_symbols.  Only
	allocate a CU if we don't have one already.  Add a cleanup for the
	CU.
	(partial_die_full_name): Handle template arguments not in
	DW_AT_name.
	(dwarf2_psymtab_to_symtab): Clear reading_partial_symbols.
	(load_full_comp_unit): Only allocate a CU if we don't have one
	already.
	(do_ui_file_peek_last): New.
	(dwarf2_compute_name): Handle template parameters not in
	DW_AT_name.
	(read_comp_unit): Read and free abbrevs if not read yet.
	(load_partial_dies): Handle template arguments not in DW_AT_name.
	(find_partial_die): If we have a CU, but no a partial dies yet,
	also read in the CU.
	(dwarf2_const_value_attr): New, abstracted out from
	dwarf2_const_value.
	(dwarf2_const_value, dwarf2_const_value_data): Adjust to use
	dwarf2_const_value_attr.
	(determine_prefix): Detect and break loops created by RCVT's debug
	info.
	(maybe_queue_comp_unit): Bail out early if reading partial
	symbols.
	(follow_die_offset): Load full CU if we have no dies.
	* dwarf2loc.c (dwarf2_evaluate_loc_desc): Make public.
	* dwarf2loc.h (dwarf2_evaluate_loc_desc): Declare.
2010-08-12 19:55:38 +00:00
Pedro Alves ce1a5b52ee Really commit server.c bits of 2010-08-09's change... 2010-08-12 15:16:12 +00:00
gdbadmin 36d427c454 *** empty log message *** 2010-08-12 00:00:03 +00:00
Phil Muldoon ca5c20b6d3 2010-08-11 Tom Tromey <tromey@redhat.com>
Phil Muldoon  <pmuldoon@redhat.com>

	* python/python.c (gdbpy_run_events): New function.
	(gdbpy_post_event): Likewise.
	(gdbpy_initialize_events): Likewise.
	(_initialize_python): Call gdbpy_initialize_events.


2010-08-11  Tom Tromey  <tromey@redhat.com>
            Phil Muldoon <pmuldoon@redhat.com>

	* gdb.texinfo (Basic Python): Describe post_event API.

2010-08-11  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/python.exp (gdb_py_test_multiple): Add gdb.post_event
	tests.
2010-08-11 20:54:12 +00:00
Ken Werner 7346b668d7 gdb/ChangeLog:* gdb/valarith.c (vector_binop): New function.(scalar_binop): Likewise.(value_binop): Call scalar_binop or vector_binop depending on the types.* gdb/eval.c (ptrmath_type_p): Return 0 in case of TYPE_VECTOR.(evaluate_subexp_with_coercion): Add vector check to not convert vectorsto pointers.* gdb/value.c (coerce_array): Add vector check to not coerce vectors.testsuite/ChangeLog:* gdb.base/Makefile.in (EXECUTABLES): Add gnu_vector.* gdb.base/gnu_vector.c: New File.* gdb.base/gnu_vector.exp: Likewise. 2010-08-11 16:48:26 +00:00
Thomas Schwinge 3e4c123525 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
* linux-low.c (linux_wait_1): Correctly return the ptid of the child
	after its termination.
2010-08-11 15:53:04 +00:00
Tom Tromey 62183e15d8 2010-08-11 Brad Roberts <braddr@puremagic.com>
* d-lang.c (extract_identifiers): Handle multiple digits.
2010-08-11 15:41:37 +00:00
Jan Kratochvil 39d7b0e292 gdb/
Code cleanup.
	* dummy-frame.c (dummy_frame_unwinder): Remove its static qualifier.
	Rename to dummy_frame_unwind.
	(dummy_frame_unwind): Remove.
	* dummy-frame.h (dummy_frame_unwind): Reference directly the struct.
	* frame-unwind.c (frame_unwind_init): Use address of
	dummy_frame_unwind and inline_frame_unwind.
	* frame.c (create_sentinel_frame): Use address of
	sentinel_frame_unwind.
	* inline-frame.c (inline_frame_unwinder): Rename to
	inline_frame_unwind.
	(inline_frame_unwind): Remove.
	* inline-frame.h (inline_frame_unwind): Reference directly the struct.
	* sentinel-frame.c (sentinel_frame_unwinder): Rename to
	sentinel_frame_unwind.
	(sentinel_frame_unwind): Remove.
	* sentinel-frame.h (sentinel_frame_unwind): Reference directly the
	struct.
2010-08-11 13:24:32 +00:00
Jan Kratochvil 9f9a8002f0 gdb/
Code cleanup.
	* frame-unwind.c (frame_unwind_find_by_frame): Remove the return type
	and returned value.  New comment from frame-unwind.h.
	* frame-unwind.h (frame_unwind_find_by_frame): Remove the return type.
	Extend the comment.
	* frame.c (get_frame_id, frame_unwind_register_value)
	(create_new_frame, get_prev_frame_1, frame_unwinder_is)
	(get_frame_type, frame_unwind_arch): Do not use the return value of
	frame_unwind_find_by_frame.
2010-08-11 13:22:57 +00:00
Phil Muldoon cb2e07a6f0 2010-08-11 Phil Muldoon <pmuldoon@redhat.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Tom Tromey  <tromey@redhat.com>

	* python/python.c (gdbpy_solib_address):  New function.
	(gdbpy_decode_line): Likewise.

2010-08-11  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Basic Python): Describe solib_address and
          decode_line Python APIs

2010-08-11  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/python.c: New File.
	* gdb.python/python-sl.c: New File.
	* gdb.python/python.exp: Test solib_address and decode_line
	* functions.
2010-08-11 12:48:24 +00:00
gdbadmin ea63ca6fce *** empty log message *** 2010-08-11 00:00:04 +00:00
Tom Tromey 464b3efb95 * gdb.texinfo (Pretty Printing API): Document
gdb.default_visualizer.
2010-08-10 20:25:30 +00:00
Tom Tromey c29c521f43 gdb
Revert gdb-add-index addition:
	* Makefile.in (install-only): Don't install gdb-add-index.
	* gdb-add-index.sh: Remove.
gdb/doc
	Revert gdb-add-index addition:
	* gdb.texinfo (Index Files): Don't document gdb-add-index.
2010-08-10 18:35:53 +00:00
Kevin Buettner 0c012db1eb * remote-sim.c (gdbsim_xfer_inferior_memory): Replace
`target_has_execution' check with `to_has_memory' check.
	(gdbsim_has_all_memory, gdbsim_has_memory): New functions.
	(init_gdbsym_ops): Initialize relevant fields of `gdbsim_ops'
	with `gdbsim_has_all_memory' and `gdbsim_has_memory'.
2010-08-10 04:39:26 +00:00
Kevin Buettner db04efe6af * remote-sim.c (program_loaded, gdbsim_desc, remote_sim_ptid)
(resume_siggnal, resume_step): Move these static globals...
	(struct sim_inferior_data): ...into this new struct.
	(sim_inferior_data_key, next_pid, sim_argv, gdbsim_is_open):
	New static globals.
	(gdb_callback, callbacks_initialized): Move these globals to
	a point earlier in the file.
	(check_for_duplicate_sim_descriptor, get_sim_inferior_data)
	(get_sim_inferior_data_by_ptid, sim_inferior_data_cleanup)
	(gdbsim_close_inferior, gdbsim_resume_inferior)
	(gdbsim_stop_inferior): New functions.
	(SIM_INSTANCE_NOT_NEEDED, SIM_INSTANCE_NEEDED, INITIAL_PID):
	New constants.
	(gdbsim_fetch_register, gdbsim_store_register, gdbsim_load)
	(gdbsim_create_inferior, gdbsim_open, gdbsim_close, gdbsim_resume)
	(gdbsim_stop, gdbsim_cntrl_c, gdbsim_wait)
	(gdbsim_xfer_inferior_memory, gdbsim_files_info)
	(gdbsim_mourn_inferior, simulator_command, gdbsim_thread_alive,
	(gdbsim_pid_to_str): Invoke `get_sim_inferior_data' to set
	new local variable `sim_data' in each of these functions.  Use
	`sim_data' to reference former globals `program_loaded',
	`gdbsim_desc', `remote_sim_ptid', `resume_siggnal', and
	`resume_step'.
	(gdbsim_open): Remove local variable `argv'.  Put results of call
	to `gdb_buildargv' in `sim_argv' rather than in `argv'.  Don't
	make a cleanup for it.  Free it though when a sim instance cannot
	be obtained.
	(gdbsim_close): Free sim_argv and null it out as appropriate.
	Close sim instances in all inferiors.
	(gdbsim_cntrl_c): Stop all inferiors.
	(gdbsim_wait):
	(_initialize_remote_sim): Initialize `sim_inferior_data_key'.
2010-08-10 00:19:26 +00:00
gdbadmin a8d1ba1945 *** empty log message *** 2010-08-10 00:00:33 +00:00
Sami Wagiaalla e37fd15a52 Complete symbol construction before adding to pending list.
2010-08-09  Sami Wagiaalla  <swagiaal@redhat.com>

	* dwarf2read.c (new_symbol): Add symbol to variable list at end of
	function after symbol construction is complete.
	Do the same for template symbol addition to template_symbols list.
2010-08-09 20:34:06 +00:00
Sami Wagiaalla 45c58896fc Fixed stabs cplus_specific issue
2010-08-09  Sami Wagiaalla  <swagiaal@redhat.com>

	* symtab.c (symbol_get_demangled_name): Remove assertion and
	return NULL when language_specific.cplus_specific is not initialized.
	* stabsread.c (define_symbol): Set the name before calling
	cp_scan_for_anonymous_namespaces.
2010-08-09 20:13:51 +00:00
Sami Wagiaalla 33e5013ed2 create and use symbol_set_language.
2010-08-09  Sami Wagiaalla  <swagiaal@redhat.com>

	* symtab.h: Renamed SYMBOL_INIT_LANGUAGE_SPECIFIC to
	SYMBOL_SET_LANGUAGE.
	(symbol_init_language_specific): Renamed to symbol_set_language.
	* symtab.c (symbol_init_language_specific): Removed redundant check
	for language_cplus.
	Renamed to symbol_set_language.
	* stabsread.c (define_symbol): Updated.
	(read_enum_type): Updated
	* psymtab.c (add_psymbol_to_bcache): Updated.
	* minsyms.c (install_minimal_symbols): Updated.
	* coffread.c (process_coff_symbol): SYMBOL_SET_LANGUAGE instead of
	SYMBOL_LANGUAGE to set the language.
	* minsyms.c (prim_record_minimal_symbol_full): Ditto.
	* mdebugread.c (new_symbol): Ditto.
	* cp-namespace.c (check_one_possible_namespace_symbol): Ditto.
	* dwarf2read.c (new_symbol_full): Ditto.
	* jv-lang.c (add_class_symbol): Ditto.
2010-08-09 19:42:48 +00:00
Pedro Alves 1971b03393 * linux-low.c (gdb_wants_lwp_stopped): Delete.
(gdb_wants_all_stopped): Delete.
	(linux_wait_1): Don't call them.
	* server.c (handle_v_cont): Tag all threads as want-stopped.
	(gdb_wants_thread_stopped): Fix comments.  Tag the thread that
	stopped as "client-wants-stopped".
2010-08-09 14:59:23 +00:00
gdbadmin 43c32ed05e *** empty log message *** 2010-08-09 00:00:03 +00:00
gdbadmin bf36b2c754 *** empty log message *** 2010-08-08 00:00:34 +00:00
Jan Kratochvil 5da1313be2 gdb/
* defs.h (make_cleanup_restore_uinteger, make_cleanup_restore_ui_file)
	(make_cleanup_restore_page_info)
	(set_batch_flag_and_make_cleanup_restore_page_info): New declarations.
	* gdbcmd.h (execute_command_to_string): New declaration.
	* python/python.c (struct restore_ui_file_closure, restore_ui_file)
	(make_cleanup_restore_ui_file): Move to utils.c
	(execute_gdb_command) <to_string>: Move ...
	* top.c (execute_command_to_string): ... here.  Call
	set_batch_flag_and_make_cleanup_restore_page_info.
	* utils.c (make_cleanup_restore_integer): New source file blank line.
	(make_cleanup_restore_uinteger): New.
	(struct restore_ui_file_closure, do_restore_ui_file)
	(make_cleanup_restore_ui_file): Move here from python/python.c.
	(init_page_info) <batch_flag>
	(do_restore_page_info_cleanup, make_cleanup_restore_page_info)
	(set_batch_flag_and_make_cleanup_restore_page_info): New.

gdb/testsuite/
	* gdb.python/python.exp (show height, set height 10)
	(verify pagination beforehand, verify pagination beforehand: q)
	(gdb.execute does not page, verify pagination afterwards)
	(verify pagination afterwards: q): New.

gdb/doc/
	* gdb.texinfo (Mode Options) <-batch>
	(Basic Python) <gdb.execute>: Describe setting width and height.
2010-08-07 15:00:39 +00:00
gdbadmin 69742b7827 *** empty log message *** 2010-08-07 00:00:02 +00:00
Pedro Alves c820c52a91 * thread.c (add_thread_silent): Use null_ptid instead of
minus_one_ptid while getting rid of stale inferior_ptid.
2010-08-06 19:45:58 +00:00
Corinna Vinschen 8da614df64 * dwarf2-frame.c (struct dwarf2_cie): Add ptr_size member.
Throughout, call read_encoded_value with ptr_size rather than addr_size.
	(decode_frame_entry_1): Remove redundant setting of
	addr_size.  Call gdbarch_dwarf2_addr_size rather than gdbarch_ptr_bit
	to determine addr_size in Dwarf versions < 4.  Set ptr_size dependent
	on examined frame section.  Add comment to explain why.
	* gdbarch.sh (dwarf2_addr_size): Define as variable.  Add lengthy
	comment to explain usage.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.

	* xstormy16-tdep.c (xstormy16_gdbarch_init): Set dwarf2_addr_size to 4.
2010-08-06 19:02:15 +00:00
Jan Kratochvil e4195b40c5 gdb/
Code cleanup.
	* varobj.c (varobj_create): Move variables fi, old_fi and block to
	a more inner block.
2010-08-06 14:17:56 +00:00
gdbadmin be6187e017 *** empty log message *** 2010-08-06 00:00:03 +00:00
Pedro Alves a3217aa0e5 * configure.tgt (alpha*-*-linux*, am33_2.0*-*-linux*, frv-*-*)
(hppa*-*-linux*, ia64-*-linux*, m32r*-*-linux*, m68*-*-linux*)
	(microblaze*-linux-*, mips*-*-linux*, sh*-*-linux*)
	(sparc-*-linux*, sparc64-*-linux*, xtensa*-*-linux*): Add
	linux-tdep.o to gdb_target_obs.
2010-08-05 16:19:25 +00:00
Marc Khouzam e2b4a699ea * mi/mi-main.c (mi_cmd_remove_inferior): Properly access first argument. 2010-08-05 15:42:06 +00:00
Hui Zhu 50e8a0d53b 2010-08-05 Hui Zhu <teawater@gmail.com>
* mips-linux-tdep.c(regset.h): New include.
	(mips_supply_gregset_wrapper, mips_fill_gregset_wrapper,
	mips_supply_fpregset_wrapper, mips_fill_fpregset_wrapper,
	mips64_supply_gregset_wrapper, mips64_fill_gregset_wrapper,
	mips64_supply_fpregset_wrapper, mips64_fill_fpregset_wrapper,
	mips_linux_regset_from_core_section): New functions.
	(fetch_core_registers, regset_core_fns): Deleted.
	(mips_linux_init_abi): Add mips_linux_regset_from_core_section.
	Deleted regset_core_fns.
	* mips-tdep.c(mips_gdbarch_init): Initialize tdep->gregset,
	tdep->gregset64, tdep->fpregset and tdep->fpregset64.
	* mips-tdep.h(gdbarch_tdep): Add gregset, gregset64, fpregset
	and fpregset64.
2010-08-05 03:03:36 +00:00
gdbadmin 966b060329 *** empty log message *** 2010-08-05 00:00:34 +00:00
Pedro Alves 7072899291 * s390-tdep.c: Include linux-tdep.h.
(s390_gdbarch_init): Call linux_init_abi.
2010-08-04 20:40:57 +00:00
Pedro Alves a5ee0f0c4d * corelow.c (core_pid_to_str): Default to using normal_pid_to_str
instead of printing "Thread" here.
	* linux-tdep.c: Include inferior.h.
	(linux_core_pid_to_str): New.
	(linux_init_abi): New.
	* linux-tdep.h (linux_init_abi): Declare.
	* alpha-linux-tdep.c: Include linux-tdep.h.
	(alpha_linux_init_abi): Call linux_init_abi.
	* amd64-linux-tdep.c (amd64_linux_init_abi): Call linux_init_abi.
	* arm-linux-tdep.c (arm_linux_init_abi): Call linux_init_abi.
	* frv-linux-tdep.c: Include linux-tdep.h
	(frv_linux_init_abi): Call linux_init_abi.
	* hppa-linux-tdep.c: Include linux-tdep.h
	(hppa_linux_init_abi): Call linux_init_abi.
	* i386-linux-tdep.c (i386_linux_init_abi): Call linux_init_abi.
	* ia64-linux-tdep.c: Include linux-tdep.h.
	(ia64_linux_init_abi): Call linux_init_abi.
	* m32r-linux-tdep.c: Include linux-tdep.h.
	(m32r_linux_init_abi): Call linux_init_abi.
	* m68klinux-tdep.c: Include linux-tdep.h.
	(m68k_linux_init_abi): Call linux_init_abi.
	* microblaze-linux-tdep.c: Include linux-tdep.h.
	(microblaze_linux_init_abi): Call linux_init_abi.
	* mips-linux-tdep.c: Include linux-tdep.h.
	(mips_linux_init_abi): Call linux_init_abi.
	* mn10300-linux-tdep.c: Include linux-tdep.h.
	(am33_linux_init_osabi): Call linux_init_abi.  Rename the
	'gdbinfo' parameter to 'info'.
	* ppc-linux-tdep.c: Include linux-tdep.h.
	(ppc_linux_init_abi): Call linux_init_abi.
	* sh-linux-tdep.c: Include linux-tdep.h.
	(sh_linux_init_abi): Call linux_init_abi.
	* sparc-linux-tdep.c: Include linux-tdep.h.
	(sparc32_linux_init_abi): Call linux_init_abi.
	* sparc64-linux-tdep.c: Include linux-tdep.h.
	(sparc64_linux_init_abi): Call linux_init_abi.
	* xtensa-linux-tdep.c: Include linux-tdep.h.
	(xtensa_linux_init_abi): Call linux_init_abi.
	* i386-cygwin-tdep.c (i386_windows_core_pid_to_str): New.
	(i386_cygwin_init_abi): Install it as gdbarch_core_pid_to_str
	callback.
2010-08-04 15:27:57 +00:00
gdbadmin 3eb8c159c5 *** empty log message *** 2010-08-04 00:00:33 +00:00
Doug Evans 63cdd22717 Add missing entry to previous checkin.
(bfd_lookup_symbol): Remove unnecessary forward decl.
2010-08-03 22:39:06 +00:00
Doug Evans bc043ef3f9 * breakpoint.c (bpdisp_text): Constify bpdisps.
* solib-svr4.c (solib_break_names): Constify.
	(bkpt_names, main_name_list): Constify.
	(match_main): Constify soname arg.
	(bfd_lookup_symbol): Constify symname arg.
	(enable_break): Constify bkpt_namep.
	* symtab.c (search_symbols): Constify types, types2, types3, types4.
	(symtab_symbol_info): Constify classnames.
2010-08-03 22:35:41 +00:00
Phil Muldoon 585d1eb8a8 2010-08-03 Phil Muldoon <pmuldoon@redhat.com>
* NEWS: Document Python value inferior function calls.
2010-08-03 09:38:16 +00:00
Doug Evans 2de00c64c4 * dwarf2read.c (dwarf_attr_name): Add DW_AT_GNU_odr_signature. 2010-08-03 00:51:29 +00:00
gdbadmin 14b2f517ee *** empty log message *** 2010-08-03 00:00:07 +00:00
Doug Evans 49c3ccf710 * gdb.cp/namespace.exp: When "print ::cOtherFileClassVar" fails
because of an older gcc, change test2
	"print ::C::OtherFileClass::cOtherFileClassVar" from unresolved
	to unsupported.
2010-08-02 23:41:19 +00:00
Kazu Hirata 42c0c4f1c5 * gdb.base/break-always.exp: Do not expect full paths to file
names.
	* gdb.base/commands.exp: Likewise.
2010-08-02 15:07:14 +00:00
gdbadmin 651a8b0448 *** empty log message *** 2010-08-02 00:00:34 +00:00
gdbadmin 16f7fb5408 *** empty log message *** 2010-08-01 00:00:33 +00:00
Paul Pluzhnikov 02d868e86d 2010-07-31 Paul Pluzhnikov <ppluzhnikov@google.com>
* linux-thread-db.c (libthread_db_debug): New variable.
       (thread_db_find_new_threads_silently): Control verbosity with it.
       (try_thread_db_load_1, try_thread_db_load): Likewise.
       (find_new_threads_once): Likewise.
       (_initialize_thread_db): Set/show it.

doc/ChangeLog
2010-07-31  Paul Pluzhnikov  <ppluzhnikov@google.com>

       * gdb.texinfo (Threads): Document 'debug libthread-db'.
2010-07-31 15:34:41 +00:00
Pedro Alves 310444acc2 * Makefile.in (signals_h): New.
(server_h): Depend on it.
	(server.o): Don't depend on $(signals_def).
	(signals.o): Depend on $(signals_def).
2010-07-31 07:58:48 +00:00
Jan Kratochvil a19cae1666 gdb/
* common/signals.c (signals): Move the content to signals.def.
	Include it.  Remove the INDENT comments.

gdb/gdbserver/
	* Makefile.in (signals_def): New.
	(server_h): Append include/gdb/signals.h and signals_def.
	(server.o): Append signals_def.

include/gdb/
	* signals.h (enum target_signal): Move the content to signals.def.
	Include it.
	* signals.def: New file.
2010-07-31 04:17:44 +00:00
gdbadmin e1720182fa *** empty log message *** 2010-07-31 00:00:03 +00:00
Tom Tromey c2bbed2a5a gdb
* Makefile.in (install-only): Install gdb-add-index.
	* gdb-add-index.sh: New file.
gdb/doc
	* gdb.texinfo (Index Files): Mention gdb-add-index.
2010-07-30 20:46:34 +00:00
Doug Evans c98ee71b7c * gdb.cp/temargs.exp: For new tests that require newer gccs,
xfail them when run with older gccs.
2010-07-30 20:12:00 +00:00
Doug Evans fd961404f8 * lib/gdb.exp (build_executable): Forward "c++" option to
get_compiler_info.
2010-07-30 19:59:42 +00:00
Cheng Renquan f32b2f0980 gdb/
* MAINTAINERS: Add myself for write after approval privileges.
2010-07-30 19:11:27 +00:00
Doug Evans 999adef4d9 * gdb.python/py-type.exp (test_template): Mark as xfail tests
"python print ttype.template_argument(1)" and
	"python print isinstance(ttype.template_argument(1), gdb.Value)"
	if using gcc 4.4 or earlier.
2010-07-30 18:46:27 +00:00
Doug Evans d3765805ec * gdb.base/valgrind-db-attach.exp: Use unique test name for
attach-to-debugger handling.
2010-07-30 17:28:07 +00:00
Jan Kratochvil 1276c7599c gdb/
* symfile.c (addr_section_name): New function.
	(addrs_section_compar): Use it.
	(addr_info_make_relative): Use it.  Move variable sect_name into a more
	inner block.  Make ".dynbss" and ".sdynbss" checks more strict.

gdb/testsuite/
	* gdb.base/prelink-lib.c (copyreloc): New initialized variable.
	* gdb.base/prelink.c (copyreloc, bssvar, bssvarp): New variables.
	(main): Use copyreloc.
	* gdb.base/prelink.exp (split debug of executable)
	(.dynbss vs. .bss address shift): New tests.
2010-07-30 16:04:30 +00:00
Tom Tromey 420697bb59 * configure: Rebuild.
* configure.ac: Add missing case for Python 2.7.
2010-07-30 15:59:41 +00:00
Hui Zhu 6c13bbe177 2010-07-30 Hui Zhu <teawater@gmail.com>
* gdb.texinfo (Inferiors and Programs): Update the introduce of
	"detach inferior" and "kill inferior".
2010-07-30 14:32:02 +00:00
gdbadmin 9ff9845ffb *** empty log message *** 2010-07-30 00:00:32 +00:00
Pedro Alves 88caa9b922 * gdb.threads/pthreads.exp (check_backtraces): Consume $gdb_prompt
in gdb_test_multiple.
2010-07-29 23:19:46 +00:00
DJ Delorie d0d995612d * rx-tdep.c (rx_analyze_prologue): Don't require branches to have
conditions.
2010-07-29 17:35:34 +00:00
Pedro Alves 0b29bddec8 * PROBLEMS: Remove mention of all problems. 2010-07-29 14:48:58 +00:00
Pedro Alves c6f2ac4350 * lib/gdb.exp (gdb_init): Set LC_ALL and LANG to C in the
environment.
2010-07-29 14:18:57 +00:00
gdbadmin 67aceb73d6 *** empty log message *** 2010-07-29 00:00:32 +00:00
Pedro Alves 110ed33992 2010-07-28 Pedro Alves <pedro@codesourcery.com>
PR build/11848
	* configure.ac: Check for wresize.
	* configure, config.in: Regenerate.
	* tui/tui-win.c (make_visible_with_new_height): Wrap wresize call
	with HAVE_WRESIZE.
2010-07-28 23:24:57 +00:00
Tom Tromey 326fd672ca gdb
PR python/11060:
	* python/py-type.c (typy_legacy_template_argument): New function,
	extracted from typy_template_argument.
	(typy_template_argument): Use TYPE_TEMPLATE_ARGUMENT.  Return a
	value when needed.
gdb/testsuite
	PR python/11060:
	* gdb.python/py-type.c (Temargs): New template.
	(temvar): New variable.
	* gdb.python/py-type.exp (test_template): New proc.
2010-07-28 20:50:17 +00:00
Tom Tromey 4ac8c4da1d 2010-07-28 Oleg Nesterov <oleg@redhat.com>
* remote.c (readchar): Call pop_target in case of SERIAL_ERROR.
2010-07-28 20:20:26 +00:00
Tom Tromey 053315c213 * dwarf2read.c (dwarf2_const_value_data): Never sign extend. 2010-07-28 20:05:03 +00:00
Pedro Alves 3ce3b1ba31 2010-07-28 Daniel Jacobowitz <dan@codesourcery.com>
gdb/
	* dwarf2read.c (read_subroutine_type): Improve THIS detection,
	handling DW_AT_object_pointer, and workaround GCC PR 43053.

	gdb/testsuite/
	* gdb.cp/member-ptr.exp, gdb.cp/printmethod.exp,
	gdb.dwarf2/member-ptr-forwardref.exp: Adjust.
2010-07-28 19:04:08 +00:00
Tom Tromey 2bb4f988e5 * Makefile.in (HFILES_NO_SRCDIR): Remove link-warning.h. 2010-07-28 18:32:33 +00:00
Joel Brobecker 74232302aa Add missing gettext markup.
gdb/ChangeLog:

        * remote.c (remote_download_tracepoint): Add missing gettext markup.
        * tracepoint.c (parse_static_tracepoint_marker_definition): Likewise.
2010-07-28 18:04:19 +00:00
Joel Brobecker 385d04dc77 [PATCH] breakpoint_re_set fails while connecting to gdbserver.
This is a problem that I noticed on GNU/Linux, when using both GDB
and GDBserver to debug an Ada program.  To reproduce, use any Ada
program, built with debug info ("gnatmake -g ...").

Then start the program with gdbserver:

        % gdbserver :4444 simple_main

And then insert a breakpoint using the name of an Ada function,
followed by connecting to the target server:

        (gdb) b simple.test_simple
        Breakpoint 1 at 0x401f28: file simple.adb, line 16.
        (gdb) tar rem :4444
        Remote debugging using :4444
        Reading symbols from /lib64/ld-linux-x86-64.so.2...
        Reading symbols from /usr/lib/debug/lib/ld-2.11.1.so...done.
        done.
        Loaded symbols for /lib64/ld-linux-x86-64.so.2
!! ->   Error in re-setting breakpoint 1: Can't find member of namespace, class,
!! ->    struct, or union named "simple.test_simple"
!! ->   Hint: try 'simple.test_simple<TAB> or 'simple.test_simple<ESC-?>
!! ->   (Note leading single quote.)
        0x00007f4db3cf2af0 in _start () from /lib64/ld-linux-x86-64.so.2
        Created trace state variable $trace_timestamp for target's variable 1.

The problem is related to the fact that GDB found debug symbols for
ld.so in /usr/lib/debug.  For debugger configured with a prefix that
is different from /usr, one way to force the problem to reproduce is
to use:

        (gdb) set debug-file-directory /usr/lib/debug

(assuming that debug info has been installed at that location).

The problem is that the wrong language is used to parse the breakpoint
location because it gets changed from under us as a side effect of
some of the code that we do in prepration for re-parsing.  In particular,
breakpoint_re_set_one reads:

      set_language (b->language);
      input_radix = b->input_radix;
      s = b->addr_string;

      save_current_space_and_thread ();
      switch_to_program_space_and_thread (b->pspace);

      marker_spec = b->type == bp_static_tracepoint && is_marker_spec (s);
      [if (marker_spec) decode_tracepoint_spec (...) else decode_line_1]

What happens in our case is that debugging information gets found
for ld.so.  As a result, the current_frame language is C whereas it
would have been unknown if we did not have debugging info. And
save_current_space_and_thread() implicitly causes the current frame
to be selected, which changes the language automatically if the new
language is not uknown and the the language mode is auto.

The fix, until all parsing routines (including decode_line_1) get upgraded
to take a language, is to select the breakpoint language as late as possible.
In this case, we don't need to do that until we actually try to parse
the breakpoint addr_string.

gdb/ChangeLog:

        * breakpoint.c (breakpoint_re_set_one): Move call to set_language
        down, just before the block that parse the breakpoint addr_string.
2010-07-28 17:57:54 +00:00
Tom Tromey 34eaf5422c gdb
PR c++/9946:
	* symfile.c (reread_symbols): Clear template_symbols.
	* symtab.h (struct symbol) <is_cplus_template_function>: New
	field.
	(SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): New macro.
	(struct template_symbol): New.
	* symtab.c (lookup_symbol_aux_local): Use
	cp_lookup_symbol_imports_or_template.
	* objfiles.h (struct objfile) <template_symbols>: New field.
	* objfiles.c (relocate_one_symbol): New function.
	(objfile_relocate1): Use it.  Relocate isolated symbols.
	* gdbtypes.h (struct cplus_struct_type) <n_template_arguments,
	template_arguments>: New fields.
	(TYPE_N_TEMPLATE_ARGUMENTS): New macro.
	(TYPE_TEMPLATE_ARGUMENTS): Likewise.
	(TYPE_TEMPLATE_ARGUMENT): Likewise.
	(lookup_typename): Update.
	* gdbtypes.c (lookup_typename): Constify "block" argument.
	* dwarf2read.c: Include vec.h.
	(symbolp): New typedef.
	(read_func_scope): Read template arguments.  Allocate a
	template_symbol when needed.
	(read_structure_type): Read template arguments.
	(new_symbol_full): New function, from new_symbol.  Handle
	DW_TAG_template_type_param and DW_TAG_template_value_param.
	(new_symbol): Rewrite as wrapper.
	* cp-support.h (cp_lookup_symbol_imports_or_template): Declare.
	* cp-namespace.c: Include language.h.
	(search_symbol_list): New function.
	(cp_lookup_symbol_imports_or_template): Likewise.
gdb/testsuite
	PR c++/9946:
	* gdb.cp/temargs.exp: New file.
	* gdb.cp/temargs.cc: New file.
2010-07-28 16:23:59 +00:00
Pedro Alves d27b3be477 2010-07-28 Balazs Kezes <rlblaster@gmail.com>
* tui/tui-win.c (make_visible_with_new_height): Resize and move
	the command window to the new size and position.
2010-07-28 12:08:19 +00:00
Pedro Alves a782f43e86 tabs vs spaces 2010-07-28 12:02:36 +00:00
Pedro Alves 0036e657cb * tui/tui-win.c (tui_resize_all): Update the locator's origin's
coordinates.
2010-07-28 12:01:22 +00:00
Pedro Alves 369003559a 2010-07-28 Balazs Kezes <rlblaster@gmail.com>
* tui/tui-io.c (tui_handle_resize_during_io): Call tui_resize_all
	after a detecting a resize.
        * tui/tui-win.c (tui_resize_all): Remove tui_set_win_resized_to
	call.
2010-07-28 11:56:30 +00:00
Pedro Alves db5e03ae67 * configure.ac: Check for resize_term.
* configure, config.in: Regenerate.
2010-07-28 11:48:23 +00:00
Joel Brobecker b71fff680d misordered names in Write After Approval list
This patch moves a couple of write-after-approval names up to keep
the list in alphabetical order.

2010-07-27  Joel Brobecker  <brobecker@adacore.com>

	* MAINTAINERS (Write After Approval): Reorder a couple of entries.
2010-07-28 04:09:04 +00:00
Joel Brobecker 3422f66621 Minor (space) reformatting. 2010-07-28 04:04:17 +00:00
gdbadmin 9a47dfdc32 *** empty log message *** 2010-07-28 00:00:33 +00:00
Jan Kratochvil d41b819ec2 gdb/testsuite/
* gdb.base/help.exp (help disassemble): Update the content.
2010-07-27 23:18:38 +00:00
Pedro Alves 9b1c24c8f7 * dwarf2read.c (read_string): Rename to ...
(read_direct_string): ... this.
	(skip_one_die, read_attribute_value, dwarf_decode_line_header)
	(dwarf_decode_lines, dwarf_decode_macros): Adjust.
2010-07-27 22:26:27 +00:00
Jan Kratochvil 00390b8433 gdb/
* linux-nat.c (linux_nat_lp_status_is_event): New function.
	(count_events_callback, select_event_lwp_callback)
	(cancel_breakpoints_callback, linux_nat_wait_1): Use it.
2010-07-27 21:22:09 +00:00
Jan Kratochvil 26ab7092a2 gdb/
* ia64-linux-nat.c (ia64_linux_status_is_event): New function.
	(_initialize_ia64_linux_nat): Install it.
	* linux-nat.c (sigtrap_is_event, linux_nat_status_is_event)
	(linux_nat_set_status_is_event): New.
	(stop_wait_callback, count_events_callback, select_event_lwp_callback)
	cancel_breakpoints_callback, linux_nat_filter_event)
	(linux_nat_wait_1): Use linux_nat_status_is_event.
	* linux-nat.h (linux_nat_set_status_is_event): New prototype.

gdb/testsuite/
	* gdb.threads/ia64-sigill.exp: New file.
	* gdb.threads/ia64-sigill.c: New file.
2010-07-27 20:51:40 +00:00
Tom Tromey 283e6a52fc * NEWS: Mention labels, .gdb_index. 2010-07-27 20:44:33 +00:00
Cheng Renquan 53a71c0681 * cli/cli-cmds.c (disassemble_command): Add support of disassemble
"start,+length" form of arguments.
2010-07-27 20:33:40 +00:00
Jan Kratochvil c63a1f8688 gdb/
* top.c (input_from_terminal_p): Return 0 on BATCH_FLAG.
	* utils.c (defaulted_query): Do not explicitly check for BATCH_FLAG.
	(fputs_maybe_filtered): Do not do filtering also on
	! INPUT_FROM_TERMINAL_P.
2010-07-27 19:11:51 +00:00
Doug Evans 872e696d08 Fix file name mentioned in this entry:
2010-07-27  Ken Werner  <ken.werner@de.ibm.com>

	* dwarf2read.c (dwarf2_read_index): Initialize the types_list and
	types_list_elements variables.
2010-07-27 18:13:25 +00:00
Tom Tromey 5283e9e1e3 * gdb.opt/inline-cmds.c (ATTR): New define.
(func1): Use it.
	(func2): Likewise.
	(func3): Likewise.
	(outer_inline1): Likewise.
	(outer_inline2): Likewise.
	* gdb.opt/inline-bt.c (ATTR): New define.
	(func1): Use it.
	(func2): Likewise.
	* gdb.opt/inline-locals.c (ATTR): New define.
	(func1): Use it.
	(func2): Likewise.
2010-07-27 18:08:48 +00:00
Tom Tromey e992ef7345 * gdb.stabs/gdb11479.c (hack): New function.
(test): Use it.
	(test2): Use it.
	* gdb.python/py-inferior.c (int8_search_buf, int16_search_buf)
	(int32_search_buf, int64_search_buf): No longer static.
	(x): Remove.
	* gdb.base/relocate.c (hack): New function.
2010-07-27 16:58:22 +00:00
Joel Brobecker abebb8b041 ARI fix (trailing newline in warning message).
* dwarf2read.c (dw2_find_pc_sect_symtab): Remove trailing newline
        in warning message.
2010-07-27 16:16:32 +00:00
Phil Muldoon 5374244e7a 2010-07-27 Phil Muldoon <pmuldoon@redhat.com>
* python/py-value.c (valpy_call): New Function.

2010-07-27  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.python/py-value.exp (test_inferior_function_call): New function.
	* gdb.python/py-value.c (func1): New function.
	(func2): Likewise.

2010-07-27  Phil Muldoon  <pmuldoon@redhat.com>

	* gdb.texinfo (Values From Inferior): Add value inferior function
	call description.
2010-07-27 12:40:42 +00:00
Ken Werner ac0b195c01 * valops.c (dwarf2_read_index): Initialize the types_list and types_list_elements variables. 2010-07-27 07:57:49 +00:00
gdbadmin 7bd8aaad48 *** empty log message *** 2010-07-27 00:00:34 +00:00
Tom Tromey 09d8bd0068 * dwarf2loc.c (locexpr_describe_location_piece): Also recognize
TLS with DW_OP_const4u or DW_OP_const8u.
2010-07-26 20:25:00 +00:00
Thiago Jung Bauermann 9fe70b4fe2 * ppc-linux-nat.c (store_vsx_register): Use PTRACE_GETVSXREGS to get
VSX registers contents.
2010-07-26 17:06:26 +00:00
Corinna Vinschen a99aee835b * gdb.asm/xstormy16.inc (gdbasm_startup): Fix beginning of stack so
as not to clash with .data section.
2010-07-26 12:31:11 +00:00
Jerome Guitton a04ba9855e gdb/testsuite/
* gdb.base/code_elim.exp: New file.
	* gdb.base/code_elim1.c: New file.
	* gdb.base/code_elim2.c: New file.
2010-07-26 09:38:50 +00:00
Jerome Guitton caac4577e5 gdb/
* dwarf2read.c (add_partial_symbol): Do not add a global variable if
	its adress is null. Add comment to explain why.
	(new_symbol): Ditto.
2010-07-26 09:30:00 +00:00
gdbadmin ad0d0dfb98 *** empty log message *** 2010-07-26 00:00:03 +00:00
Jan Kratochvil 30d5032895 gdb/gdbserver/
* server.c (handle_target_event): Use target_signal_to_host for
	resume_info.sig initialization.
	* target.h (struct thread_resume) <sig>: New comment.
2010-07-25 10:15:54 +00:00
Jan Kratochvil 857d11d04f gdb/
* linux-nat.c (linux_nat_do_thread_registers): Convert STOP_SIGNAL to
	the host signal first.
2010-07-25 09:31:12 +00:00
gdbadmin 45b143c8af *** empty log message *** 2010-07-25 00:00:03 +00:00
gdbadmin 295b7e0333 *** empty log message *** 2010-07-24 00:00:02 +00:00
Tom Tromey 1fd400ffc4 * dwarf2read.c (struct dwarf2_per_objfile) <n_type_comp_units,
type_comp_units>: New fields.
	(dw2_get_cu): New function.
	(create_cus_from_index): Remove unused argument.
	(create_signatured_type_hash_from_index): New function.
	(create_addrmap_from_index): Update.
	(dwarf2_read_index): Handle version 2.
	(dw2_find_last_source_symtab, dw2_forget_cached_source_info)
	(dw2_lookup_symtab, dw2_do_expand_symtabs_matching)
	(dw2_print_stats, dw2_expand_all_symtabs)
	(dw2_expand_symtabs_with_filename, dw2_find_symbol_file)
	(dw2_expand_symtabs_matching, dw2_map_symbol_filenames): Update.
	(dwarf2_initialize_objfile): Call create_debug_types_hash_table.
	(allocate_signatured_type_hash_table): New function.
	(add_signatured_type_cu_to_list): Likewise.
	(create_debug_types_hash_table): Use them.  Set type_comp_units.
	(read_signatured_type): Ensure section data is available.
	(add_address_entry): Don't record empty ranges.
	(struct signatured_type_index_data): New.
	(write_one_signatured_type): New function.
	(write_psymtabs_to_index): Write type CUs.
	(save_gdb_index_command): Update comment.
	(process_type_comp_unit): Move inititalization of
	from_debug_types...
	(create_debug_types_hash_table): ... here.
2010-07-23 22:15:13 +00:00
Jan Kratochvil 3a674486ec gdb/
* gdb_gcore.sh (tmpfile): Remove the variable, its initialization,
	cleanup and generating of gdb script to it.
	(gdb): Use redirection from /dev/null.  Use --nx.  Turn off pagination
	and terminal size.  Convert $tmpfile to a series of -ex-es.
2010-07-23 21:10:55 +00:00
Keith Seitz 54ec275af0 * symtab.c (basic_lookup_transparent_type): Call pre-expand
hook for STATIC_BLOCK types, too.
2010-07-23 17:42:13 +00:00
Keith Seitz 8fd447e6d3 * dwarf2read.c: Remove unused typedef dwarf2_cu_per_cu_data_ptr
and vector definition.
2010-07-23 14:43:33 +00:00
Jan Kratochvil 25b72ddee0 gdb/
* linux-nat.c (cancel_breakpoint): Remove unused forward declaration.
2010-07-23 12:19:00 +00:00
gdbadmin 8dd40a7aaa *** empty log message *** 2010-07-23 00:00:04 +00:00
Jan Kratochvil 96d19272e8 gdb/
* dwarf2read.c: Include completer.h.
	(save_gdb_index_command): Use matching usage command name.
	(_initialize_dwarf2_read): New variable c, initialize it by add_cmd.
	Set filename_completer for it.
2010-07-22 16:24:38 +00:00
Tom Tromey ca1f3406ef * dwarf2read.c (create_debug_types_hash_table): Set objfile on
type signature's per-CU data.
2010-07-22 15:53:48 +00:00
Pedro Alves ba25b92104 * NEWS: Mention target reported shared libraries support by
default.
2010-07-22 10:52:02 +00:00
gdbadmin 5bc13057e7 *** empty log message *** 2010-07-22 00:00:03 +00:00
Pedro Alves 23bd0f7c5e gdb/
2010-07-21  Pedro Alves  <pedro@codesourcery.com>

	PR symtab/11827

	Revert:
	2010-05-21  Pierre Muller  <muller@ics.u-strasbg.fr>
	* dwarf2read.c (process_die): Also allow DW_TAG_const_type
	and DW_TAG_volatile_type.
	(new_symbol): Likewise.

gdb/testsuite/
2010-07-21  Pedro Alves  <pedro@codesourcery.com>

	PR symtab/11827

	* gdb.base/printcmds.c (enum some_volatile_enum): New enum.
	(some_volatile_enum): New variable.
	* gdb.base/printcmds.exp (test_print_enums): New.
	<top level>: Call it.
2010-07-21 18:08:27 +00:00
Sami Wagiaalla 883df6ddea Corrected pre-overload-resolution function evaluation.
2010-07-21  Sami Wagiaalla  <swagiaal@redhat.com>

	* eval.c (evaluate_subexp_standard): Disabled evaluation of C++
	function symbols before overload resolution.

2010-07-21  Sami Wagiaalla  <swagiaal@redhat.com>

	* gdb.cp/fpointer.cc: New test.
	* gdb.cp/fpointer.exp: New test.
2010-07-21 14:59:05 +00:00
Pedro Alves 269b11a298 * breakpoint.c (bptype_string): New, abstracted out from
print_one_breakpoint_location.
	(print_one_breakpoint_location): Adjust.
	(breakpoint_1): Adjust the type column width dynamically.
2010-07-21 11:25:53 +00:00
gdbadmin b806f530e2 *** empty log message *** 2010-07-21 00:00:33 +00:00
Jan Kratochvil 569b05a560 gdb/
* symfile.c (find_separate_debug_file_by_debuglink): Remove
	a gdb_assert call, new comment.

gdb/testsuite/
	* gdb.base/solib-nodir.exp: New file.
	* lib/gdb.exp (runto): New case for a GDB internal error.
2010-07-20 22:19:07 +00:00
Jan Kratochvil 51d7d80300 gdb/testsuite/
* gdb.base/charset-malloc.c: New file.
	* gdb.base/charset.c (malloc_stub): New prototype.
	(main): Call it instead of malloc itself.
	* gdb.base/charset.exp: Use only prepare_for_testing.
	(binfile): Remove the variable.
2010-07-20 22:06:59 +00:00
Ozkan Sezer c6f46ca0a4 * gdb/gdbserver/server.c (handle_query): strcpy() the returned string from
paddress() instead of sprintf().
2010-07-20 18:20:27 +00:00
Ozkan Sezer 5c3216e2a7 * gdb/gdbserver/utils.c (paddress): Return phex_nz(). 2010-07-20 18:10:52 +00:00
Jan Kratochvil ad34eb2f7c gdb/
* linux-nat.c (linux_handle_extended_wait): Handle case when
	event == PTRACE_EVENT_CLONE && stopping && WSTOPSIG (status) != SIGSTOP.
2010-07-20 12:54:57 +00:00
Jan Kratochvil 33355866db gdb/
Code cleanup.
	* linux-nat.c (linux_nat_wait_1): Reset STATUS after calling
	linux_nat_wait_1.  Use always LP->STATUS afterwards.
2010-07-20 12:33:30 +00:00
Hui Zhu 26590820c2 2010-07-20 Hui Zhu <teawater@gmail.com>
* inf-ptrace.c (inf_ptrace_create_inferior): Initialize back_to.
	(inf_ptrace_attach): Ditto.
2010-07-20 05:58:53 +00:00
gdbadmin fcdc9c861b *** empty log message *** 2010-07-20 00:00:33 +00:00
Jan Kratochvil 8ea5bce590 gdb/doc/
* gdb.texinfo (Active Targets): Fix wrong comma placement.
2010-07-19 18:11:31 +00:00
Jan Kratochvil c0edd9edad gdb/
Make core files the process_stratum.
	* corefile.c (core_target): New variable.
	(core_file_command): Remove variable t, use core_target.
	* corelow.c (core_ops): Make it static.
	(init_core_ops): Change to process_stratum.  Initialize CORE_TARGET.
	* defs.h (make_cleanup_unpush_target): New prototype.
	* gdbarch.h: Regenerate.
	* gdbarch.sh (core_pid_to_str): Remove core_stratum from its comment.
	* gdbcore.h (core_target): New declaration.
	* inf-ptrace.c (inf_ptrace_create_inferior, inf_ptrace_attach): New
	variables ops_already_pushed and back_to.  Use push_target,
	make_cleanup_unpush_target and discard_cleanups calls.
	* record.c (record_open): Replace core_stratum by a core_bfd check.
	* target.c (target_is_pushed): New function.
	(find_core_target): Remove.
	* target.h (enum strata) <core_stratum>: Remove.
	(target_is_pushed): New declaration.
	(find_core_target): Remove declaration.
	* tracepoint.c (init_tfile_ops) <to_stratum>: Remove comment.
	* utils.c (do_unpush_target, make_cleanup_unpush_target): New functions.

gdb/doc/
	Make core files the process_stratum.
	* gdb.texinfo (Active Targets): Remove core_stratum.  Include
	record_stratum example.

gdb/testsuite/
	Make core files the process_stratum.
	* gdb.base/corefile.exp (run: load core again)
	(run: sanity check we see the core file, run: with core)
	(run: core file is cleared, attach: load core again)
	(attach: sanity check we see the core file, attach: with core)
	(attach: core file is cleared): New tests.
	* gdb.base/coremaker.c (main): New parameters.  Implement "sleep" argv.
2010-07-19 17:51:25 +00:00
Hui Zhu f02253f190 2010-07-19 Hui Zhu <teawater@gmail.com>
* breakpoint.c (single_step_breakpoints_inserted): New
	function.
	* breakpoint.h (single_step_breakpoints_inserted): Extern.
	* infrun.c (maybe_software_singlestep): Add check code.
	* record.c (record_resume): Add code for software single step.
	(record_wait): Ditto.
2010-07-19 07:55:43 +00:00
gdbadmin bd0cd65df4 *** empty log message *** 2010-07-19 00:00:04 +00:00
Jan Kratochvil 78768c4ae4 gdb/
* linux-nat.c (linux_handle_extended_wait): Move variable new_lp into
	a more inner block.  Remove its unused declaration initializer.
2010-07-18 21:21:53 +00:00
gdbadmin a881f11cf9 *** empty log message *** 2010-07-18 00:00:33 +00:00
gdbadmin 72f4afc7a3 *** empty log message *** 2010-07-17 00:00:03 +00:00
Thiago Jung Bauermann 431e49aac1 * NEWS: Mention support for the new ptrace interface and hardware
accelerated watchpoint conditions on powerpc-linux.
2010-07-16 23:19:37 +00:00
Ozkan Sezer bd91e7ae05 * target.c (debug_to_insert_breakpoint): Instead of casting to unsigned
long and %ld, use core_addr_to_string() and %s to print CORE_ADDR vars
and host_address_to_string() and %s for pointers.
(debug_to_remove_breakpoint): Likewise.
(debug_to_region_ok_for_hw_watchpoint): Likewise.
(debug_to_can_accel_watchpoint_condition): Likewise.
(debug_to_stopped_data_address): Likewise.
(debug_to_watchpoint_addr_within_range): Likewise.
(debug_to_insert_hw_breakpoint): Likewise.
(debug_to_remove_hw_breakpoint): Likewise.
(debug_to_insert_watchpoint): Likewise.
(debug_to_remove_watchpoint): Likewise.
2010-07-16 20:04:41 +00:00
Sami Wagiaalla 29df156df4 Use allocated cplus_specific for cplus symbols.
2010-07-16  Sami Wagiaalla  <swagiaal@redhat.com>

	* symtab.h (symbol_set_demangled_name): Now takes an optional objfile*
	argument.
	(cplus_specific): New struct.
	* symtab.c (symbol_set_demangled_name): Updated.
	Use cplus_specific for cplus symbols.
	(symbol_get_demangled_name): Retrive the name from the cplus_specific
	struct for cplus symbols.
	(symbol_init_language_specific): Set cplus_specific for cplus symbols.
	(symbol_set_names): Pass objfile to symbol_set_demangled_name.
	* symtab.c (symbol_init_cplus_specific): New function.
2010-07-16 19:23:56 +00:00
Sami Wagiaalla b250c185b3 Use setter and getter for demangled_name.
2010-07-16  Sami Wagiaalla  <swagiaal@redhat.com>

	* symtab.h (symbol_set_demangled_name): New function.
	(symbol_get_demangled_name): New function.
	* symtab.c (symbol_set_demangled_name): New function.
	(symbol_get_demangled_name): New function.
	(symbol_init_language_specific): Use demangled_name setter and getter.
	(symbol_set_names): Ditto.
	(symbol_natural_name): Ditto.
	(symbol_demangled_name): Ditto.
	* dwarf2read.c (new_symbol): Ditto.
2010-07-16 19:00:56 +00:00
Sami Wagiaalla afa1672571 Rename cplus_specific mangled_lang.
2010-07-16  Sami Wagiaalla  <swagiaal@redhat.com>

	* symtab.h: Renamed cplus_specific to mangled_lang.
	* symtab.c (symbol_init_language_specific): Updated.
	(symbol_set_names): Updated.
	(symbol_natural_name): Updated.
	(symbol_demangled_name): Updated.
	* ada-lang.c (ada_decode_symbol): Updated.
	* dwarf2read.c (new_symbol): Updated.
2010-07-16 18:39:10 +00:00
gdbadmin ad0385697b *** empty log message *** 2010-07-16 00:00:33 +00:00
gdbadmin 8942efd7f0 *** empty log message *** 2010-07-15 00:00:33 +00:00
Ken Werner 3cbaedfff7 gdb/ChangeLog:* valops.c (value_assign): Do not call to value_coerce_to_target.(value_must_coerce_to_target): Return 0 in case of TYPE_VECTOR.gdb/testsuite/ChangeLog:* gdb.arch/altivec-abi.exp: New tests. 2010-07-14 14:54:58 +00:00
Ken Werner c932f1bef2 * MAINTAINERS: Add myself for write after approval privileges. 2010-07-14 14:30:35 +00:00
Tom Tromey 91158a569d 2010-07-13 Emmanuel Thomé <Emmanuel.Thome@gmail.com>
* c-valprint.c (c_val_print): Add embedded_offset to address in
	call to val_print_array_elements.

2010-07-13  Tom Tromey  <tromey@redhat.com>

	* gdb.python/py-prettyprint.c (struct arraystruct): New struct.
	(main): Use it.
	* gdb.python/py-prettyprint.exp (run_lang_tests): Add test.
2010-07-14 14:13:55 +00:00
gdbadmin cae36aed43 *** empty log message *** 2010-07-14 00:00:03 +00:00
Tom Tromey b3b272e108 * dwarf2read.c (dwarf2_read_index): Correctly set 'total_size'. 2010-07-13 22:02:05 +00:00
Tom Tromey bb3fa9d02e * dwarf2read.c (dwarf2_per_cu_text_offset): Fix reference to
objfile.
2010-07-13 21:06:48 +00:00
Tom Tromey dd78685836 * symfile.c (set_initial_language): Update.
(deduce_language_from_filename): Argument type now const.
	* symtab.h (find_main_filename): Update.
	(deduce_language_from_filename): Update.
	* symtab.c (find_main_filename): Make result const.
	* dwarf2read.c (dw2_find_symbol_file): Change return type.
	* psymtab.c (find_symbol_file_from_partial): Change return type.
	* symfile.h (struct quick_symbol_functions) <find_symbol_file>:
	Make result const.
2010-07-13 20:52:52 +00:00
Tom Tromey 9291a0cd80 gdb
* breakpoint.c (save_cmdlist): No longer static.
	* gdbcmd.h (save_cmdlist): Declare.
	* symfile.c (symbol_file_add_with_addrs_or_offsets): Set
	OBJF_READNOW on objfile if readnow_symbol_files.
	* elfread.c (elf_symfile_read): Use dwarf2_initialize_objfile.
	(elf_sym_fns_gdb_index): New global.
	* dwarf2read.c: Include exceptions.h.
	(offset_type): New.
	(struct mapped_index): New.
	(dwarf2_per_cu_data_ptr): New typedef.
	(struct dwarf2_per_objfile) <using_index, index_table, gdb_index>:
	New fields.
	(GDB_INDEX_SECTION): New define.
	(struct dwarf2_per_cu_quick_data): New.
	(struct dwarf2_per_cu_data) <objfile>: New field.
	<psymtab>: Removed.
	<v>: New field.
	(byte_swap): New function.
	(MAYBE_SWAP): New macro.
	(INDEX_SUFFIX): New macro.
	(dw2_do_instantiate_symtab): New function.
	(dw2_instantiate_symtab): Likewise.
	(create_cus_from_index): Likewise.
	(create_addrmap_from_index): Likewise.
	(mapped_index_string_hash): Likewise.
	(find_slot_in_mapped_hash): Likewise.
	(dwarf2_read_index): Likewise.
	(dw2_setup): Likewise.
	(dw2_require_line_header): Likewise.
	(dw2_require_full_path): Likewise.
	(dw2_find_last_source_symtab): Likewise.
	(dw2_forget_cached_source_info): Likewise.
	(dw2_lookup_symtab): Likewise.
	(dw2_lookup_symbol): Likewise.
	(dw2_do_expand_symtabs_matching): Likewise.
	(dw2_pre_expand_symtabs_matching): Likewise.
	(dw2_print_stats): Likewise.
	(dw2_dump): Likewise.
	(dw2_relocate): Likewise.
	(dw2_expand_symtabs_for_function): Likewise.
	(dw2_expand_all_symtabs): Likewise.
	(dw2_expand_symtabs_with_filename): Likewise.
	(dw2_find_symbol_file): Likewise.
	(dw2_map_ada_symtabs): Likewise.
	(dw2_expand_symtabs_matching): Likewise.
	(dw2_find_pc_sect_symtab): Likewise.
	(dw2_map_symbol_names): Likewise.
	(dw2_map_symbol_filenames): Likewise.
	(dw2_has_symbols): Likewise.
	(dwarf2_gdb_index_functions): New global.
	(dwarf2_initialize_objfile): New function.
	(process_psymtab_comp_unit): Update.
	(add_partial_subprogram): Likewise.
	(dwarf2_psymtab_to_symtab): Likewise.
	(psymtab_to_symtab_1): Use dw2_do_instantiate_symtab.
	(process_full_comp_unit): Update.
	(find_file_and_directory): New function.
	(read_file_scope): Use find_file_and_directory.
	(dwarf2_per_cu_objfile): Update.
	(dwarf2_per_cu_addr_size): Update.
	(dwarf2_per_cu_offset_size): Update.
	(dwarf2_free_objfile): Free the index, if needed.
	(dwarf2_per_objfile_free): Unmap the index, if needed.
	(struct strtab_entry): New.
	(hash_strtab_entry): New function.
	(eq_strtab_entry): Likewise.
	(create_strtab): Likewise.
	(add_string): Likewise.
	(struct symtab_index_entry): New.
	(struct mapped_symtab): New.
	(hash_symtab_entry): New function.
	(eq_symtab_entry): Likewise.
	(delete_symtab_entry): Likewise.
	(create_index_table): Likewise.
	(create_mapped_symtab): Likewise.
	(cleanup_mapped_symtab): Likewise.
	(find_slot): Likewise.
	(hash_expand): Likewise.
	(add_index_entry): Likewise.
	(add_indices_to_cpool): Likewise.
	(write_hash_table): Likewise.
	(add_address_entry): Likewise.
	(write_psymbols): Likewise.
	(write_obstack): Likewise.
	(unlink_if_set): Likewise.
	(write_psymtabs_to_index): Likewise.
	(save_gdb_index_command): Likewise.
	(_initialize_dwarf2_read): Install "save gdb-index"
	command.
	(create_all_comp_units): Initialize 'objfile' field of CU.
	(dwarf2_locate_sections): Check for .gdb_index.
	* psymtab.h (dwarf2_gdb_index_functions): Declare.
	* symfile.h (dwarf2_initialize_objfile): Declare.
gdb/doc
	* gdb.texinfo (Index Files): New node.
2010-07-13 20:51:34 +00:00
Tom Tromey 58b6ab1339 * symtab.c (lookup_symbol_aux_symtabs): Call pre-expand hook.
(basic_lookup_transparent_type): Likewise.
	* symfile.h (struct quick_symbol_functions)
	<pre_expand_symtabs_matching>: New field.
	* psymtab.c (pre_expand_symtabs_matching_psymtabs): New function.
	(psym_functions): Update.
2010-07-13 20:49:26 +00:00
Tom Tromey f5011d116d * gdb.texinfo (GDB/MI Variable Objects): Remove extra 'for'. 2010-07-13 20:32:43 +00:00
Tom Tromey 0f5238edfd gdb
PR breakpoints/8357:
	* symtab.h (domain_enum_tag) <LABEL_DOMAIN>: Update comment.
	* linespec.c (decode_line_1): Update comment.  Call decode_label.
	(decode_label): New function.
	(symbol_found): Handle LOC_LABEL.
	* dwarf2read.c (new_symbol) <DW_TAG_label>: Set symbol's type and
	domain.  Call add_symbol_to_list.
gdb/doc
	* gdb.texinfo (Specify Location): Document labels.
gdb/testsuite
	* gdb.base/label.exp: New file.
	* gdb.base/label.c: New file.
2010-07-13 20:07:44 +00:00
Tom Tromey 9aa1f1e339 * dwarf2loc.h (dwarf2_per_cu_text_offset): Declare.
* dwarf2loc.c (find_location_expression): Use
	dwarf2_per_cu_text_offset.
	(dwarf2_evaluate_loc_desc): Likewise.
	(dwarf2_loc_desc_needs_frame): Likewise.
	(compile_dwarf_to_ax): Likewise.
	(loclist_describe_location): Likewise.
	* dwarf2read.c (dwarf2_per_cu_text_offset): New function.
	(dwarf2_per_cu_objfile): Update comment.
2010-07-13 15:09:03 +00:00
gdbadmin 2ef36331d2 *** empty log message *** 2010-07-13 00:00:33 +00:00
H.J. Lu add265ae41 Add is_ilp32_target/is_lp64_target.
2010-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* lib/gdb.exp (is_ilp32_target): New.
	(is_lp64_target): Likewise.

	* gdb.arch/amd64-byte.exp: Use is_lp64_target to check 64bit
	target.
	* gdb.arch/amd64-disp-step.exp: Likewise.
	* gdb.arch/amd64-dword.exp: Likewise.
	* gdb.arch/amd64-i386-address.exp: Likewise.
	* gdb.arch/amd64-word.exp: Likewise.

	* gdb.arch/i386-avx.exp: Use is_ilp32_target to check for 32bit
	target.
	* gdb.arch/i386-bp_permanent.exp: Likewise.
	* gdb.arch/i386-byte.exp: Likewise.
	* gdb.arch/i386-disp-step.exp: Likewise.
	* gdb.arch/i386-gnu-cfi.exp: Likewise.
	* gdb.arch/i386-prologue.exp: Likewise.
	* gdb.arch/i386-size-overlap.exp: Likewise.
	* gdb.arch/i386-size.exp: Likewise.
	* gdb.arch/i386-sse.exp: Likewise.
	* gdb.arch/i386-unwind.exp: Likewise.
	* gdb.arch/i386-word.exp: Likewise.

	* gdb.arch/ppc64-atomic-inst.exp: Use is_lp64_target to execute
	test only when building 64-bit executables.  Do not hard-code
	-m64 option.
2010-07-12 17:33:15 +00:00
Jan Kratochvil 953ac07ed7 gdb/
* dwarf2read.c (read_subrange_type): Call read_subrange_type.
	* p-lang.c (pascal_printstr): Likewise.
2010-07-12 17:07:11 +00:00
gdbadmin c0e7d30b1e *** empty log message *** 2010-07-12 00:00:33 +00:00
gdbadmin a2f028ec35 *** empty log message *** 2010-07-11 00:00:33 +00:00
gdbadmin 73b86bec9f *** empty log message *** 2010-07-10 00:00:03 +00:00
Tom Tromey f04e4012c7 * python/py-prettyprint.c (gdbpy_get_display_hint): Don't use
'hint' if it is NULL.
2010-07-09 20:29:56 +00:00
Hui Zhu f4dfd9c05c 2010-07-04 Hui Zhu <teawater@gmail.com>
* source.c (print_source_lines_base): Add check for noprint.
2010-07-09 02:39:58 +00:00
gdbadmin 2ee2fea804 *** empty log message *** 2010-07-09 00:00:34 +00:00
Joel Brobecker 7e6e39e562 Resync python-config.py with Python-2.7 version.
This is just a copy of the Python 2.7 version of python-config.py.
Tested with versions 2.5 and 2.6.  It's nearly identical to the
previous version, except it's written in a more pythonic way,
so it should be fine for 2.4 as well.

gdb/ChangeLog:

        * python/python-config.py: Resync with Python 2.7 version of this
        script.
2010-07-08 22:12:44 +00:00
Joel Brobecker 76b8507d09 Fix typo in NEWS file (introduced in previous commit).
gdb/ChangeLog:

        * NEWS: Fix typo in section name (s/GDB 7.1/GDB 7.2).
2010-07-08 15:41:56 +00:00
gdbadmin 715036dc99 *** empty log message *** 2010-07-08 00:00:02 +00:00
Doug Evans 2dfb8c1771 * lib/gdb.exp (gdb_test_list_exact): New function.
* gdb.base/default.exp (show convenience): Call it, add tests for
	$_sdata = void, $_thread = 0.
2010-07-07 18:49:51 +00:00
Joel Brobecker 797054e63d * NEWS: Create a new section for the next release branch.
Rename the section of the current branch, now that it has
        been cut.
2010-07-07 17:52:37 +00:00
gdbadmin c80befee39 Record GDB 7.2 branch creation. Bump version number to 7.2.50.20100707-cvs. 2010-07-07 17:34:43 +00:00
Tom Tromey ac56253dde * dwarf2read.c (dwarf2_const_value) <DW_form_addr>: Create a
LOC_COMPUTED symbol.
	* dwarf2loc.c (dwarf2_evaluate_loc_desc): Set new field.
	(dwarf2_loc_desc_needs_frame): Likewise.
	(compile_dwarf_to_ax) <DW_OP_addr>: Use offset.
	* dwarf2expr.h (struct dwarf_expr_context) <offset>: New field.
	* dwarf2expr.c (execute_stack_op) <DW_OP_addr>: Use offset.
	* dwarf2-frame.c (execute_stack_op): Set 'offset' field.  Add
	'offset' argument.
	(struct dwarf2_frame_cache) <text_offset>: New field.
	(dwarf2_frame_cache): Set new field.
	(dwarf2_frame_prev_register): Update.
	(dwarf2_frame_sniffer): Update.
	(dwarf2_frame_base_sniffer): Update.
	(dwarf2_frame_find_fde): Add 'out_offset' argument.
2010-07-07 17:26:38 +00:00
Thiago Jung Bauermann 0cf6dd1543 2010-07-07 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	Support for hw accelerated condition watchpoints in booke powerpc.

	* breakpoint.c (fetch_watchpoint_value): Rename to fetch_subexp_value
	and move to eval.c.  Change callers.
	(insert_bp_location): Pass watchpoint condition in
	target_insert_watchpoint.
	(remove_breakpoint_1) Pass watchpoint condition in
	target_remove_watchpoint.
	(watchpoint_locations_match): Call
	target_can_accel_watchpoint_condition.
	* eval.c: Include wrapper.h.
	(fetch_subexp_value): Moved from breakpoint.c.
	* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint):
	Formatting fix.
	(can_use_watchpoint_cond_accel): New function.
	(calculate_dvc): Likewise.
	(num_memory_accesses): Likewise.
	(check_condition): Likewise.
	(ppc_linux_can_accel_watchpoint_condition): Likewise
	(ppc_linux_insert_watchpoint): Call can_use_watchpoint_cond_accel,
	check_condition and calculate_dvc.
	(ppc_linux_remove_watchpoint): Likewise.
	(_initialize_ppc_linux_nat): Set to_can_accel_watchpoint_condition to
	ppc_linux_can_accel_watchpoint_condition
	* target.c (debug_to_insert_watchpoint): Add argument for watchpoint
	condition.
	(debug_to_remove_watchpoint): Likewise.
	(debug_to_can_accel_watchpoint_condition): New function.
	(update_current_target): Set to_can_accel_watchpoint_condition.
	(setup_target_debug): Set to_can_accel_watchpoint_condition.
	* target.h: Add opaque declaration for struct expression.
	(struct target_ops) <to_insert_watchpoint>,
	<to_remove_watchpoint>: Add new arguments to pass the watchpoint
	<to_can_accel_watchpoint_condition>: New member.
	condition.  Update all callers and implementations.
	(target_can_accel_watchpoint_condition): New macro.
	* value.c (free_value_chain): New function.
	* value.h (fetch_subexp_value): New prototype.
	(free_value_chain): Likewise.
2010-07-07 16:15:18 +00:00
Joel Brobecker 6bd3187468 [PATCH] Unexpected EOF read from connection with GDB after inferior exits.
This is on GNU/Linux.

GDBserver does not exit properly when the inferior exits, as demonstrated
with any program using the procedure below:

   % gdbserver-head :4444 simple_main
   Process simple_main created; pid = 25681
   Listening on port 4444

Then, in another terminal, start GDB, connect to GDBserver, and run
the program to completion:

   % gdb-head simple_main
   (gdb) tar rem :4444
   (gdb) cont
   Continuing.

   Program exited normally.

Going back to the terminal where GDBserver is running, we see the following
output:

    Child exited with status 0
    readchar: Got EOF
    Remote side has terminated connection.  GDBserver will reopen the connection.
    Listening on port 4444

The problem is that we're missing a call to mourn_inferior.  As a result,
after we've handled the vCont packet, we fail to notice that there are
no process left to debug (target_running() returns true), and thus try
to continue reading from the remote socket.  However, since GDB just
disconnected after having received the "exit with status 0" reply to the
vCont request, the read triggers the EOF exception.

gdb/gdbserver/ChangeLog:

        * server.c (handle_v_cont): Call mourn_inferior if process
        just exited.
        (myresume): Likewise.
2010-07-07 16:14:04 +00:00
Ulrich Weigand 2f2241f146 * linux-nat.c (linux_nat_do_thread_registers): Use section size
from gdbarch_core_regset_sections also for .reg if present.

	* amd64-linux-tdep.c (amd64_linux_regset_sections): Fix incorrect
	section size for .reg.
	* ppc-linux-tdep.c (ppc_linux_vsx_regset_sections): Likewise.
	(ppc_linux_vmx_regset_sections): Likewise.
	(ppc_linux_fp_regset_sections): Likewise.
	(ppc64_linux_vsx_regset_sections): New variable.
	(ppc64_linux_vmx_regset_sections): Likewise.
	(ppc64_linux_fp_regset_sections): Likewise.
	(ppc_linux_init_abi): Install core_regset_section lists appropriate
	for current word size.
2010-07-07 12:28:32 +00:00
gdbadmin dd8f1dada6 *** empty log message *** 2010-07-07 00:00:04 +00:00
Joel Brobecker 1fd7cdc24b Make server.c:myresume static.
I just happened to notice that this function was exclusively used in
server.c, and thus could be made static.

2010-07-06  Joel Brobecker  <brobecker@adacore.com>

        * server.c (myresume): Make static.
2010-07-06 21:20:43 +00:00
Tom Tromey 11763c1856 * configure, config.in: Rebuild.
* configure.ac (HAVE_LIBPYTHON2_7): New define.
	* python/python-internal.h: Handle HAVE_LIBPYTHON2_7.
2010-07-06 19:03:12 +00:00
Andreas Schwab a6cc4789c3 * breakpoint.c (_initialize_breakpoint): Add "cl" as alias for
"clear".
2010-07-06 16:17:44 +00:00
Ulrich Weigand f9e9243aad include/ChangeLog:
2010-07-06  Ken Werner  <ken.werner@de.ibm.com>

	* floatformat.h (floatformat_ieee_half_big): Add declaration.
	(floatformat_ieee_half_little): Likewise.

libiberty/ChangeLog:

2010-07-06  Ken Werner  <ken.werner@de.ibm.com>

	* floatformat.c (floatformat_ieee_half_big): New variable.
	(floatformat_ieee_half_little): Likewise.

gdb/ChangeLog:

2010-07-06  Ken Werner  <ken.werner@de.ibm.com>

	* gdbtypes.h (floatformats_ieee_half): Add declaration.
	* gdbtypes.c (floatformats_ieee_half): New variable.
	* doublest.c (floatformat_from_length): Set format to
	gdbarch_half_format if length matches.
	* gdbarch.sh (half_bit): New architecture method.
	(half_format): Likewise.
	* gdbarch.h: Regenerate.
	* gdbarch.c: Likewise.
2010-07-06 12:56:24 +00:00
gdbadmin fcebdddbc5 *** empty log message *** 2010-07-06 00:00:03 +00:00
Jan Kratochvil 4e5799b6d2 gdb/
Fix re-run of PIE executable, PR shlibs/11776.
	* solib-svr4.c (svr4_relocate_main_executable) <symfile_objfile>: Remove
	the part of pre-set SYMFILE_OBJFILE->SECTION_OFFSETS.

gdb/testsuite/
	Fix re-run of PIE executable, PR shlibs/11776.
	* gdb.base/break-interp.exp (test_ld): Turn off "disable-randomization".
	Remove $displacement_main to match the solib-svr4.c change.  New "kill"
	and re-"run" of the inferior.
2010-07-05 18:04:33 +00:00
Jan Kratochvil 1a219cc741 gdb/testsuite/
Cope with missing /usr/sbin/prelink.
	* lib/prelink-support.exp (prelink_no):
	<result == 1 && $output is "no such file or directory">: New.
	(prelink_yes): Likewise.  Return on failed prelink_no.
2010-07-05 18:02:56 +00:00
Jan Kratochvil 5e3b36f879 gdb/testsuite/
* gdb.base/attach-pie-misread.exp: Load prelink-support.exp.  Replace
	build_executable by build_executable_own_libs.  Replace "prelink -R"
	execution by a call of prelink_yes.  Comment why "prelink -r" needs no
	change.
	* gdb.base/break-interp.exp: Load prelink-support.exp.  Rename calls of
	copy to file_copy.  Move setting opts --dynamic-linker and -rpath,
	mkdir $dir and ldd its parsing and copying to lib/prelink-support.exp.
	Replace build_executable by build_executable_own_libs's function
	build_executable_own_libs.
	(prelinkNO): Create new stub to call prelink_no.
	(prelinkYES): Create new stub to call prelink_yes.
	(test_attach): Rename calls of copy to file_copy.
	(section_get, prelinkNO_run, prelinkNO, prelinkYES, symlink_resolve)
	(copy): Move to ...
	* lib/prelink-support.exp: ... a new file.  Rename prelinkNO to
	prelink_no, prelinkYES to prelink_yes, copy to file_copy.
	* gdb.base/prelink.exp: Disable testcase also for is_remote and
	skip_shlib_tests.  Load prelink-support.exp.  Replace gdb_compile with
	special flags by gdb_compile_shlib.  Replace second gdb_compile by
	build_executable_own_libs.  Replace "prelink -R" execution by a call of
	prelink_yes.  Replace "prelink -u" and second "prelink -R" execution by
	a second call of prelink_yes.  Replace restart commands by
	clean_restart.
	(prelink): Rename to ...
	(seen displacement message): ... this test.  Extend its expectation
	strictness.
2010-07-05 18:01:53 +00:00
Jan Kratochvil 86e4bafc3b gdb/
* auxv.c (memory_xfer_auxv): Update attach comment.
	* solib-svr4.c (svr4_special_symbol_handling): Remove the call to
	svr4_relocate_main_executable.
	(svr4_solib_create_inferior_hook): Make the call to
	svr4_relocate_main_executable unconditional.

gdb/testsuite/
	* gdb.base/attach-pie-misread.exp, gdb.base/attach-pie-misread.c: New.
	* gdb.base/break-interp.exp (reach, test_core, test_ld): Require each
	displacement message exactly once.
2010-07-05 18:00:40 +00:00