Commit Graph

28804 Commits

Author SHA1 Message Date
Ulrich Weigand 6f5def7d9e * gdb.texinfo (Target Description): Remove warning about
possibly unstable format.
2011-06-29 16:28:22 +00:00
Tom Tromey 3b2b8feaf4 gdb
PR fortran/10036:
	* valprint.h (generic_emit_char, generic_printstr): Declare.
	* valprint.c (wchar_printable, append_string_as_wide)
	(print_wchar): Move from c-lang.c.
	(generic_emit_char): New function; mostly taken from c_emit_char.
	(generic_printstr): New function; mostly taken from c_printstr.
	* f-valprint.c (f_val_print) <TYPE_CODE_ARRAY>: Handle strings
	represented as arrays.
	<TYPE_CODE_CHAR>: Treat as TYPE_CODE_INT; recognize as character
	type.
	* f-typeprint.c (f_type_print_base) <TYPE_CODE_CHAR>: Treat
	identically to TYPE_CODE_INT.
	* f-lang.c (f_get_encoding): New function.
	(f_emit_char): Use generic_emit_char.
	(f_printchar): Replace comment.
	(f_printstr): Use generic_printstr.
	* dwarf2read.c (read_base_type) <DW_ATE_unsigned>: Handle Fortran
	"character" types specially.
	<DW_ATE_signed_char, DW_ATE_unsigned_char>: Make TYPE_CODE_CHAR
	for Fortran.
	* c-lang.c (wchar_printable, append_string_as_wide, print_wchar):
	Move to valprint.c
	(c_emit_char): Call generic_emit_char.
	(c_printstr): Call generic_printstr.
gdb/testsuite
	* gdb.fortran/charset.exp: New file.
	* gdb.fortran/charset.f90: New file.
2011-06-29 15:32:40 +00:00
Gary Benson 168e6d4402 gdb/
* breakpoint.c (bpstat_what): Removed duplicated case.
2011-06-29 15:20:34 +00:00
Tom Tromey 42159ca500 PR testsuite/12040:
* lib/future.exp: New file, mostly extracted from ada.exp.
	Rewrote compatibility code to use rename.
	(gdb_find_gfortran): New proc.
	(gdb_default_target_compile): Refresh from dejagnu; plus a pending
	gfortran patch.
	* lib/ada.exp (gdb_find_gnatmake, gdb_default_target_compile):
	Move to future.exp.
	* lib/gdb.exp: Always load future.exp.
2011-06-29 14:44:45 +00:00
gdbadmin d555a4fbf3 *** empty log message *** 2011-06-29 00:00:33 +00:00
Tom Tromey 1c033f8c71 * python/python-internal.h (PY_SSIZE_T_CLEAN): Define. 2011-06-28 13:09:12 +00:00
Yao Qi af69a5cef7 2011-06-28 Yao Qi <yao@codesourcery.com>
* gdb.cp/exception.cc: Don't include iostream.
	(bar): Remove print statement.
	(catcher): New.
	(main): Remove print statements.  Call function catcher.
	* gdb.cp/exception.exp : Don't match inferior's output in regexp.
	Set breakpoint on catcher, and check the value of parameter.
2011-06-28 08:36:18 +00:00
gdbadmin 50673a5a82 *** empty log message *** 2011-06-28 00:00:03 +00:00
Tom Tromey 5fe41fbfa2 * valops.c (find_overload_match): Call do_cleanups before early
return.
	* top.c (execute_command): Call do_cleanups before early return.
	(command_loop): Likewise.
	* stack.c (backtrace_command): Make a null cleanup early.  Don't
	conditionally call do_cleanups.
	* python/py-value.c (TRY_CATCH): Move cleanup handling into
	TRY_CATCH.
	* python/py-breakpoint.c (gdbpy_breakpoint_has_py_cond): Rearrange
	so cleanups are always run.
	* mi/mi-cmd-var.c (mi_cmd_var_delete): Reset old_cleanups.
	* findcmd.c (parse_find_args): Call do_cleanups on early return
	path.
	* dbxread.c (elfstab_build_psymtabs): Make a null cleanup early.
	Don't conditionally call do_cleanups.
	* cli/cli-script.c (execute_user_command): Initialize 'old_chain'
	later.
2011-06-27 19:21:51 +00:00
Eric Botcazou e26bd57dea * MAINTAINERS (Write After Approval): Use default email address. 2011-06-27 17:00:39 +00:00
Joel Brobecker 6c3097fcd3 Add Eric Botcazou to the list of `Write After Approval' contributors
* MAINTAINERS (Write After Approval): Add Eric Botcazou.
2011-06-27 16:38:27 +00:00
Joel Brobecker 369c397ba4 Add support for single register window model on SPARC
2011-06-27  Eric Botcazou  <ebotcazou@adacore.com>
        * sparc-tdep.h (struct sparc_frame_cache): Add frame_offset,
        saved_regs_mask and copied_regs_mask fields.
        (sparc_record_save_insn): New prototype.
        * sparc-tdep.c (sparc_alloc_frame_cache): Initialize the new fields.
        (sparc_record_save_insn): New function.
        (sparc_analyze_prologue): Add head comment.  Recognize store insns
        of call-saved registers.  Use OFFSET consistently.  Recognize flat
        frames and cache their settings.
        (sparc32_skip_prologue): Handle flat frames.
        (sparc_frame_cache): Add frame_offset to the base address.
        (sparc32_frame_cache): Adjust to new frame description.
        (sparc32_frame_prev_register): Likewise.
        * sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
        * sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_cache): Likewise.
        * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_cache): Likewise.
        * sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_cache): Force the
        frame by calling sparc_record_save_insn.
        * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_cache): Likewise.
        * sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_cache): Likewise.
        * sparc64obsd-tdep.c (sparc64obsd_frame_cache): Likewise.
2011-06-27 16:36:00 +00:00
Tristan Gingold b315ab2151 2011-06-27 Tristan Gingold <gingold@adacore.com>
* dwarf2read.c (struct dwarf2_section_info): Replace was_mmapped
	field by map_addr and map_len.
	(dwarf2_read_section): Adjust for the new bfd_mmap api.
	(munmap_section_buffer): Likewise.
2011-06-27 08:41:39 +00:00
gdbadmin bd82534596 *** empty log message *** 2011-06-27 00:00:33 +00:00
gdbadmin b91ffaa0ac *** empty log message *** 2011-06-26 00:00:33 +00:00
gdbadmin 44eb0d7fc2 *** empty log message *** 2011-06-25 00:00:02 +00:00
Tom Tromey ddd49eeec4 * varobj.c (update_dynamic_varobj_children): Make 'name' const.
* symtab.h (lookup_struct, lookup_union, lookup_enum): Update.
	* python/python.c (gdbpy_parameter): Make 'arg' const.
	(execute_gdb_command): Likewise.
	(gdbpy_decode_line): Likewise.  Copy it.
	(gdbpy_parse_and_eval): Make 'expr_string' const.  Copy it.
	(gdbpy_write): Make 'arg' const.
	* python/py-type.c (typy_lookup_typename): Make 'type_name'
	const.
	(gdbpy_lookup_type): Likewise.
	* python/py-prettyprint.c (print_children): Make 'name' const.
	* python/py-param.c (parmpy_init): Make 'name' const.  Copy it.
	* python/py-inferior.c (infpy_write_memory): Make 'buf_len' a
	Py_ssize_t.
	* python/py-function.c (fnpy_init): Make 'name' const.
	* python/py-cmd.c (cmdpy_init): Make 'name' const.  Copy it.
	(gdbpy_string_to_argv): Make 'input' const.
	* python/py-breakpoint.c (bppy_init): Make 'spec' const.  Copy
	it.
	* gdbtypes.h (lookup_typename): Update.
	* gdbtypes.c (lookup_typename): Make 'name' const.
	(lookup_struct): Likewise.
	(lookup_union): Likewise.
	(lookup_enum): Likewise.
2011-06-24 19:47:37 +00:00
Tom Tromey 5998129b54 * Makefile.in (HFILES_NO_SRCDIR): Add "common/" to
gdb_thread_db.h.  Move all common/ entries to be together.
	(TAGS): Don't depend on DEPFILES.
2011-06-24 19:29:49 +00:00
gdbadmin 756e0a9f0c *** empty log message *** 2011-06-24 00:00:03 +00:00
Yao Qi 6e586cc565 2011-06-23 Yao Qi <yao@codesourcery.com>
* infrun.c (start_remote): Move call init_wait_for_inferior to ...
	* remote.c (remote_start_remote): ... here.
	* monitor.c (monitor_open): ... here.
2011-06-23 15:08:01 +00:00
Yao Qi ab5c6a729c 2011-06-23 Yao Qi <yao@codesourcery.com>
* gdb.cp/mb-inline.exp: Parse the output of `info break' to check breakpoint
	1.2 is disabled.  KFAIL for uclinux.
2011-06-23 14:38:13 +00:00
Andrew Burgess 86c3c1fccc http://sourceware.org/ml/gdb-patches/2011-06/msg00136.html
2011-06-23  Andrew Burgess  <aburgess@broadcom.com>

	* gdbtypes.c (append_composite_type_field_aligned): Fix
	calculation of bit position based on alignment.
2011-06-23 09:51:57 +00:00
Marek Polacek 9497469fbd Fix races in mi2-var-display.exp. 2011-06-23 09:51:11 +00:00
Marek Polacek 5d197ed097 Fix races in mi2-return.exp. 2011-06-23 09:45:24 +00:00
Marek Polacek b9132588e0 Fix races in mi2-console.exp. 2011-06-23 09:40:50 +00:00
Marek Polacek e55595cad5 Fix races in mi2-basics.exp. 2011-06-23 09:38:14 +00:00
Yao Qi be777e08f4 gdb/testsuite/
* gdb.base/moribund-step.exp: Skip test if displaced stepping is not
	supported.
	* lib/gdb.exp (support_displaced_stepping): New.
2011-06-23 07:46:13 +00:00
Yao Qi 615556d61e 2011-06-23 Yao Qi <yao@codesourcery.com>
* gdb.threads/execl.exp: Skip on remote target.
2011-06-23 06:26:28 +00:00
gdbadmin 1c23ac0060 *** empty log message *** 2011-06-23 00:00:32 +00:00
Pedro Alves 28010a5d42 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c (bpstat_stop_status): Call the check_status
	breakpoint_ops method.
	(print_one_breakpoint_location): Also print the condition for Ada
	exception catchpoints.
	(allocate_bp_location): New, factored out from
	allocate_bp_location.
	(allocate_bp_location): Adjust.  Call the owner breakpoint's
	allocate_location method, if there is one.
	(free_bp_location): Call the locations's dtor method, if there is
	one.
	(init_raw_breakpoint_without_location): New breakpoint_ops
	parameter.  Use it.
	(set_raw_breakpoint_without_location): Adjust.
	(init_raw_breakpoint): New breakpoint_ops parameter.  Pass it down.
	(set_raw_breakpoint): Adjust.
	(catch_fork_breakpoint_ops, catch_vfork_breakpoint_ops)
	(catch_syscall_breakpoint_ops): Install NULL allocate_location,
	re_set and check_status methods.
	(init_catchpoint): Don't memset, initialize thread, addr_string
	and enable_state.  Pass the ops down to init_raw_breakpoint.
	(install_catchpoint): Rename to ...
	(install_breakpoint): ... this, and make extern.
	(create_fork_vfork_event_catchpoint): Adjust.
	(catch_exec_breakpoint_ops): Install NULL allocate_location,
	re_set and check_status methods.
	(create_syscall_event_catchpoint): Adjust.
	(ranged_breakpoint_ops, watchpoint_breakpoint_ops)
	(masked_watchpoint_breakpoint_ops): Install NULL
	allocate_location, re_set and check_status methods.
	(catch_exec_command_1): Adjust.
	(gnu_v3_exception_catchpoint_ops): Install NULL allocate_location,
	re_set and check_status methods.
	(create_ada_exception_breakpoint): Rename to ...
	(init_ada_exception_breakpoint): ... this.  Add a struct
	breakpoint parameter, and delete the exp_string, cond_string and
	cond parameters.  Use init_raw_breakpoint, and don't install or
	mention the breakpoint yet.  Don't clear breakpoint fields that
	init_raw_breakpoint already clears.
	(re_set_breakpoint): Delete, split into ...
	(breakpoint_re_set_default, prepare_re_set_context): ... these new
	functions.
	(breakpoint_re_set_one): Call the breakpoint's
	breakpoint_ops->re_set implementation, if there's one.  Adjust.
	* breakpoint.h: Forward declare struct bpstats and struct bp_location.
	(struct bp_location_ops): New type.
	(struct bp_location): New field `ops'.
	(struct breakpoint_ops): New `allocate_location', `re_set' and
	`check_status' fields.  Make `breakpoint_hit''s description match
	reality.
	(init_bp_location): Declare.
	(breakpoint_re_set_default): Declare.
	(create_ada_exception_breakpoint): Rename to ...
	(init_ada_exception_breakpoint): ... this.  Add a struct
	breakpoint parameter, and delete the exp_string, cond_string and
	cond parameters.
	(install_breakpoint): Declare.
	* ada-lang.c: Include exceptions.h.
	<Ada exceptions description>: Update.
	(struct ada_catchpoint_location): New type.
	(ada_catchpoint_location_dtor): New function.
	(ada_catchpoint_location_ops): New global.
	(ada_catchpoint): New type.
	(create_excep_cond_exprs): New function.
	(dtor_exception, allocate_location_exception, re_set_exception)
	(should_stop_exception, check_status_exception): New functions.
	(print_one_exception, print_mention_exception)
	(print_recreate_exception): Adjust.
	(dtor_catch_exception, allocate_location_catch_exception)
	(re_set_catch_exception, check_status_catch_exception): New
	functions.
	(catch_exception_breakpoint_ops): Install them.
	(dtor_catch_exception_unhandled)
	(allocate_location_catch_exception_unhandled)
	(re_set_catch_exception_unhandled)
	(check_status_catch_exception_unhandled): New functions.
	(catch_exception_unhandled_breakpoint_ops): Install them.
	(dtor_catch_assert, allocate_location_catch_assert)
	(re_set_catch_assert, check_status_catch_assert): New functions.
	(catch_assert_breakpoint_ops): Install them.
	(ada_exception_catchpoint_p): Delete.
	(catch_ada_exception_command_split)
	(ada_exception_catchpoint_cond_string): Rename exp_string
	parameter to excep_string.  Adjust.
	(ada_parse_catchpoint_condition): Delete.
	(ada_exception_sal): Rename the exp_string parameter to
	excep_string.  Delete the cond_string and cond parameters.
	Adjust.
	(ada_decode_exception_location): Rename the exp_string parameter
	to excep_string.  Delete the cond_string and cond parameters.
	Adjust.
	(create_ada_exception_catchpoint): New function.
	(catch_ada_exception_command, ada_decode_assert_location)
	(catch_assert_command): Adjust.
	* ada-lang.h (ada_exception_catchpoint_p): Delete declaration.
2011-06-22 17:53:44 +00:00
Pedro Alves 9ac4176b6d 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* ada-lang.c: Include arch-utils.h.
	(ada_decode_exception_location): Make static.
	(catch_ada_exception_command): Moved here from breakpoint.c.
	(ada_decode_assert_location): Make static.
	(catch_assert_command): Moved here from breakpoint.c.
	(_initialize_ada_lang): Install the exception and assert
	catchpoint commands here.
	* ada-lang.h (ada_decode_exception_location)
	(ada_decode_assert_location): Delete declarations.
	* breakpoint.c (CATCH_PERMANENT, CATCH_TEMPORARY): Moved to
	breakpoint.h.
	(create_ada_exception_breakpoint): Make extern.
	(catch_ada_exception_command, catch_assert_command): Moved to
	ada-lang.c.
	(add_catch_command): Make extern.
	(_initilize_breakpoint): Don't install the exception and assert
	catchpoint commands here.
	* breakpoint.h (CATCH_PERMANENT, CATCH_TEMPORARY): Moved from
	breakpoint.c
	(add_catch_command, create_ada_exception_breakpoint): Declare.
2011-06-22 17:52:37 +00:00
Pedro Alves c56053d23c 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c (init_raw_breakpoint_without_location): Don't add
	the breakpoint to the breakpoint chain here.
	(set_raw_breakpoint_without_location): Add the breakpoint to the
	breakpoint chain here.
	(init_raw_breakpoint): Adjust comments.
	(set_raw_breakpoint): Add the breakpoint to the breakpoint chain
	here.
	(init_catchpoint): Don't set the catchpoint's breakpoint number
	here.
	(install_catchpoint): New function.
	(create_fork_vfork_event_catchpoint)
	(create_syscall_event_catchpoint, catch_exec_command_1): Adjust to
	use install_catchpoint.
2011-06-22 17:16:42 +00:00
Pedro Alves d2f3fc74b7 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c (create_catchpoint_without_mention)
	(create_catchpoint): Delete.
2011-06-22 17:16:00 +00:00
Pedro Alves b4d900402c 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.h (struct breakpoint): Delete field `exec_pathname'.
	* breakpoint.c (init_raw_breakpoint_without_location): Remove
	reference to exec_pathname.
	(struct exec_catchpoint): New type.
	(dtor_catch_exec): New function.
	(insert_catch_exec, print_it_catch_exec, print_one_catch_exec): Adjust.
	(catch_exec_breakpoint_ops): Install dtor_catch_syscall.
	(catch_exec_command_1): Adjust to use init_catchpoint.
	(delete_breakpoint): Remove reference to exec_pathname.
2011-06-22 17:15:06 +00:00
Pedro Alves be5c67c19c 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.h (struct breakpoint_ops): New field `dtor'.
	(struct breakpoint): Delete field `syscalls_to_be_caught'.
	* breakpoint.c (init_raw_breakpoint_without_location): Remove
	reference to syscalls_to_be_caught.
	(catch_fork_breakpoint_ops, catch_vfork_breakpoint_ops): Install a
	NULL `dtor'.
	(struct syscall_catchpoint): New type.
	(dtor_catch_syscall): New function.
	(insert_catch_syscall, remove_catch_syscall)
	(breakpoint_hit_catch_syscall, print_one_catch_syscall)
	(print_recreate_catch_syscall): Adjust.
	(catch_syscall_breakpoint_ops): Install dtor_catch_syscall.
	(catch_exec_breakpoint_ops): Install a NULL `dtor'.
	(create_syscall_event_catchpoint): Adjust to use init_catchpoint.
	(ranged_breakpoint_ops, watchpoint_breakpoint_ops)
	(masked_watchpoint_breakpoint_ops)
	(gnu_v3_exception_catchpoint_ops): Install a NULL `dtor'.
	(delete_breakpoint): Call the `dtor' breakpoint_ops method, if
	there is one.  Remove references to syscalls_to_be_caught.
	(catching_syscall_number): Adjust.
	* ada-lang.c (catch_exception_breakpoint_ops)
	(catch_exception_unhandled_breakpoint_ops)
	(catch_assert_breakpoint_ops): Install a NULL `dtor'.
2011-06-22 17:14:29 +00:00
Pedro Alves e29a4733b9 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.h (struct breakpoint): Delete forked_inferior_pid
	field.
	* breakpoint.c (init_raw_breakpoint_without_location): Remove
	reference to forked_inferior_pid.
	(struct fork_catchpoint): New type.
	(breakpoint_hit_catch_fork, print_it_catch_fork)
	(print_one_catch_fork, breakpoint_hit_catch_vfork)
	(print_it_catch_vfork, print_one_catch_vfork): Adjust.
	(create_fork_vfork_event_catchpoint): Adjust to use
	init_catchpoint.
2011-06-22 17:12:32 +00:00
Pedro Alves 346774a91f 2011-06-22 Pedro Alves <pedro@codesourcery.com>
* breakpoint.c (add_to_breakpoint_chain)
	(init_raw_breakpoint_without_location): New functions, factored
	out from ...
	(set_raw_breakpoint_without_location): ... this one.
	(init_raw_breakpoint): New function, factored out from
	set_raw_breakpoint and adjusted to use
	init_raw_breakpoint_without_location.
	(set_raw_breakpoint): Adjust.
	(init_catchpoint): New function, factored out from
	create_catchpoint_without_mention and adjusted to use
	init_raw_breakpoint.
	(create_catchpoint_without_mention): Adjust.
2011-06-22 17:11:30 +00:00
Marek Polacek 833b0ca776 Fix races in gdb.mi/mi-var-display.exp. 2011-06-22 16:12:46 +00:00
Marek Polacek 1ee4023ae3 Fix races in gdb.mi/mi-nsitrall.exp. 2011-06-22 15:41:47 +00:00
Marek Polacek d0b1d6240c Fix races in gdb.mi/mi-nsmoribund.exp. 2011-06-22 15:38:00 +00:00
Marek Polacek 79aa92c124 Fix races in gdb.mi/mi-return.exp. 2011-06-22 15:32:16 +00:00
Tom Tromey c38c4bc5b2 * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_convert>: Treat type
argument of 0 specially.
2011-06-22 13:38:21 +00:00
Yao Qi b138ce370d gdb/
* infrun.c (handle_inferior_event): Remove write-only local variable
	`sw_single_step_trap_p'.
2011-06-22 10:09:22 +00:00
gdbadmin 8eebce8e67 *** empty log message *** 2011-06-22 00:00:33 +00:00
gdbadmin 06f68d32f6 *** empty log message *** 2011-06-21 00:00:03 +00:00
Tom Tromey 03de682319 * symtab.c (lookup_language_this): End loop if block is NULL. 2011-06-20 17:53:33 +00:00
gdbadmin e7cce27aad *** empty log message *** 2011-06-20 00:00:03 +00:00
gdbadmin be47d07c72 *** empty log message *** 2011-06-19 00:00:33 +00:00
gdbadmin 2b8ef54e82 *** empty log message *** 2011-06-18 00:00:33 +00:00
Tom Tromey 66a17cb629 * valops.c (value_of_this): Use lookup_language_this.
* symtab.h (lookup_language_this): Declare.
	* symtab.c (lookup_language_this): New function.
	(lookup_symbol_aux): Use lookup_language_this.
	* ax-gdb.c (gen_expr) <OP_THIS>: Use lookup_language_this.
2011-06-17 20:46:47 +00:00
Tom Tromey 7518bff55a * value.h (value_of_this): Update.
(value_of_local): Remove.
	* valops.c (value_of_this): Rename from value_of_local.  Change
	parameters.
	* p-exp.y (exp): Update.
	(variable): Likewise.
	* eval.c (evaluate_subexp_standard) <OP_THIS>: Use value_of_this.
2011-06-17 20:35:09 +00:00
Tom Tromey aee28ec61a * valops.c (value_of_local): Complain if NAME is NULL.
* std-operator.def (OP_OBJC_SELF): Remove.
	* parse.c (operator_length_standard) <OP_OBJC_SELF>: Remove.
	* objc-exp.y (name_not_typename): Use OP_THIS.
	* expprint.c (print_subexp_standard) <OP_THIS>: Print language's
	name for "this".
	<OP_OBJC_SELF>: Remove.
	* eval.c (evaluate_subexp_standard) <OP_OBJC_SELF>: Remove.
2011-06-17 20:24:22 +00:00
gdbadmin 9c92b47c98 *** empty log message *** 2011-06-17 00:00:32 +00:00
Tristan Gingold eed8f803b1 2011-06-16 Tristan Gingold <gingold@adacore.com>
* python/py-events.h (gdb_py_events): Make it extern.
	* python/py-evtregistry.c (gdb_py_events): Declare.
2011-06-16 05:54:09 +00:00
Hui Zhu 864ac8a76c 2011-06-16 Hui Zhu <teawater@gmail.com>
* remote.c (remote_trace_set_readonly_regions): Add check for
	remote_protocol_packets[PACKET_qXfer_traceframe_info].support before
	output warning.
2011-06-16 02:19:44 +00:00
gdbadmin a4379bc3eb *** empty log message *** 2011-06-16 00:00:03 +00:00
Ulrich Weigand ef7e8358ec * arm-linux-tdep.c: Include "auxv.h".
(AT_HWCAP): Define.
	(ARM_LINUX_SIZEOF_VFP): Define.
	(arm_linux_supply_vfp): New function.
	(arm_linux_collect_vfp): Likewise.
	(arm_linux_regset_from_core_section): Handle .reg-arm-vfp sections.
	(arm_linux_fpa_regset_sections): New variable.
	(arm_linux_vfp_regset_sections): Likewise.
	(arm_linux_core_read_description): New function.
	(arm_linux_init_abi): Install arm_linux_core_read_description and
	arm_linux_fpa_regset_sections or arm_linux_vfp_regset_sections as
	appropriate for the architecture.
	* arm-tdep.h (struct gdbarch_tdep): Add member "vfpregset".
	(tdesc_arm_with_m): Declare.
	(tdesc_arm_with_iwmmxt): Likewise.
	(tdesc_arm_with_vfpv2): Likewise.
	(tdesc_arm_with_vfpv3): Likewise.
	(tdesc_arm_with_neon): Likewise.
	* arm-linux-nat.c: Move features/*.c includes ...
	* arm-tdep.c: ... here.
	* arm-linux-nat.c (arm_linux_read_description): Move initializing
	target description data structures ...
	* arm-tdep.c (_initialize_arm_tdep): ... here.
	* arm-linux-nat.c (HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3,
	HWCAP_VFPv3D16): Move definitions ...
	* arm-linux-tdep.h: ... here.
2011-06-15 16:39:28 +00:00
Hui Zhu c2fa21f135 2011-06-15 Hui Zhu <teawater@gmail.com>
* remote.c (remote_trace_set_readonly_regions): Add a check for
	target_buf_size.
2011-06-15 14:40:22 +00:00
gdbadmin e0480cca6c *** empty log message *** 2011-06-15 00:00:02 +00:00
Tom Tromey dd707e8e61 * coffread.c (coffread_objfile): Rename from current_objfile.
* dbxread.c (dbxread_objfile): Rename from current_objfile.
	* mdebugread.c (mdebugread_objfile): Rename from current_objfile.
2011-06-14 18:53:14 +00:00
Tom Tromey 86cc002925 * jv-lang.c (jv_type_objfile_data_key, dynamics_objfile)
(class_symtab): Remove.
	(jv_dynamics_progspace_key): New global.
	(jv_per_objfile_free): Reset program space data.  Update assert.
	Don't clear globals.
	(get_dynamics_objfile): Use and set program space data.
	(get_java_class_symtab): Use get_dynamics_objfile.
	(add_class_symbol): Likewise.
	(java_link_class_type): Likewise.
	(java_object_type, jv_clear_object_type, set_java_object_type):
	Remove.
	(get_java_object_type): Update.  Don't cache result.
	(is_object_type): Don't call set_java_object_type.
	(_initialize_java_language): Don't set jv_type_objfile_data_key;
	initialize jv_dynamics_progspace_key.
2011-06-14 18:44:40 +00:00
Tom Tromey 91a81f6972 * symtab.h (current_objfile): Don't declare.
* objfiles.h (current_objfile): Don't declare.
	* objfiles.c (current_objfile): Remove.
	* mdebugread.c (current_objfile): New file-scope global.
	* dbxread.c (current_objfile): New file-scope global.
	* coffread.c (current_objfile): New file-scope global.
2011-06-14 16:49:41 +00:00
Yao Qi 5ce5db06f1 gdb/testsuite/
* gdb.threads/ia64-sigill.exp: Remove "set debug lin-lwp 1".
2011-06-14 08:03:32 +00:00
gdbadmin c6431bc370 *** empty log message *** 2011-06-14 00:00:33 +00:00
Pedro Alves dc7eb48e0a 2011-06-13 Pedro Alves <pedro@codesourcery.com>
gdb/
	* top.h (line): Rename to ...
	(saved_command_line): ... this.
	(linesize): Rename to ...
	(saved_command_line_size): ... this.
	* top.c (line): Rename to ...
	(saved_command_line): ... this.
	(linesize): Rename to ...
	(saved_command_line_size): ... this.
	(dont_repeat, command_line_input, dont_repeat_command): Adjust.
	* event-top.c (command_line_handler): Adjust.
	* main.c (captured_main): Adjust.
2011-06-13 10:55:27 +00:00
gdbadmin 49d4323bfb *** empty log message *** 2011-06-13 00:00:33 +00:00
Mark Kettenis 0d6c213503 * i386-tdep.c (i386_epilogue_frame_cache): Simplify code. Call
get_frame_func instead of get_frame_pc to determine the code
address used to construct the frame ID.
(i386_epilogue_frame_unwind_stop_reason): Fix coding style.
(i386_epilogue_frame_this_id): Likewise.
(i386_epilogue_frame_prev_register): New function.
(i386_epilogue_frame_unwind): Use i386_epilogue_frame_prev_register.
(i386_stack_tramp_frame_sniffer): Fix coding style.
(i386_stack_tramp_frame_unwind): Use i386_epilogue_frame_prev_register.
(i386_gdbarch_init): Fix comments.
2011-06-12 20:46:11 +00:00
Mark Kettenis 8bbdd3f463 * i386-tdep.c (i386_match_insn_block): Use length of the proper
instruction when walking back through the instruction stream.
2011-06-12 18:21:55 +00:00
gdbadmin 03001923a8 *** empty log message *** 2011-06-12 00:00:02 +00:00
gdbadmin e35459660a *** empty log message *** 2011-06-11 00:00:33 +00:00
Jan Kratochvil 533a737ed5 gdb/
* symtab.c (output_partial_symbol_filename): Exchange the filename and
	fullname parameters order.

gdb/testsuite/
	* gdb.dwarf2/dw2-filename.exp (info sources): New testcase.
2011-06-10 21:50:55 +00:00
Jan Kratochvil 44b13c5a41 gdb/
Code cleanup.
	* dwarf2read.c (dw2_map_symbol_filenames): Use symbol_filename_ftype
	for fun.
	* psymtab.c (map_symbol_filenames_psymtab)
	(map_partial_symbol_filenames): Likewise.
	* psymtab.h: Include symfile.h.
	(map_partial_symbol_filenames): Use symbol_filename_ftype for fun.
	* symfile.h (symbol_filename_ftype): New.
	(struct quick_symbol_functions): Use symbol_filename_ftype for fun of
	map_symbol_filenames, clarify more the naming in comment.
2011-06-10 21:48:04 +00:00
Tom Tromey d0e53741e0 * gdb.cp/temargs.exp: Let tests pass if compiler bug is fixed.
Add tests for pointer-to-member-function.
	* gdb.cp/temargs.cc (S::somefunc): New function.
	(K2): New class.
	(main): Instantiate K2; call method.
2011-06-10 16:21:47 +00:00
gdbadmin 09ad00eb8e *** empty log message *** 2011-06-10 00:00:03 +00:00
gdbadmin d49f7f803e *** empty log message *** 2011-06-09 00:00:32 +00:00
Joel Brobecker b5916bbd42 py-inferior.exp: Make sure local var is allocated on the stack.
The testcase, at some point, is trying to change the contents
of a string that was defined as follow:

    char *str = "hello, testsuite";

The problem is that the string is constant, and str is never used
to change the contents of the string in the program, so the compiler
is free to allocate it in a read-only section.  This is what happens
on x86-windows, for instance.

As a result, trying to change the contents of the string during
the `python gdb.inferiors()[0].write_memory (addr, str)' results
in the following error:

    (gdb) python gdb.inferiors()[0].write_memory (addr, str)
    gdb: write target memory, 5 bytes at 0x00403064
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    gdb.MemoryError: Cannot access memory at address 0x403064
    Error while executing Python code.

This patch prevents this from happening by declaring str as an
array rather than a pointer.

gdb/testsuite/ChangeLog:

        * gdb.python/py-inferior.c (f2): Make str an array rather
        than a pointer.
        * gdb.python/py-inferior.exp: Adjust testcase accordingly.
2011-06-08 16:56:11 +00:00
Doug Evans b8e9bd6c64 * cc-with-index.sh: Look for ../../gdb, for fullname.exp. 2011-06-08 01:40:58 +00:00
Doug Evans 0b5574da47 * cc-with-index.sh: Fix typos in comment. 2011-06-08 00:15:54 +00:00
gdbadmin 2334423426 *** empty log message *** 2011-06-08 00:00:02 +00:00
Jan Kratochvil 5be4dfca58 gdb/
* cli/cli-cmds.c (shell_escape): Use waitpid.
	* rs6000-nat.c (exec_one_dummy_insn): Likewise.

gdb/testsuite/
	* gdb.base/async-shell.c: New file.
	* gdb.base/async-shell.exp: New file.
2011-06-07 17:26:47 +00:00
Tristan Gingold 316a8b2145 2011-06-07 Tristan Gingold <gingold@adacore.com>
* xcoffread.c (dwarf2_xcoff_names): New variable.
	(aix_process_linenos): Add a guard.
	(xcoff_symfile_finish): Free dwarf2.
	(xcoff_initial_scan): Add dwarf2 support.
2011-06-07 12:31:07 +00:00
gdbadmin d70849ab99 *** empty log message *** 2011-06-07 00:00:02 +00:00
Pedro Alves 9f47e25402 2011-06-06 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
	* gdb.threads/pending-step.exp: Add more context to SIGTRAP match.
2011-06-06 13:33:08 +00:00
Pedro Alves 3dd5b83d5b 2011-06-06 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcall.c (run_inferior_call): Don't mask async.  Instead force
	a synchronous wait, if the target can async.

	* target.h (struct target_ops): Delete to_async_mask.
	(target_async_mask): Delete.
	* target.c (update_current_target): Delete references to to_async_mask.
	* linux-nat.c (linux_nat_async_mask_value): Delete.
	(linux_nat_is_async_p, linux_nat_can_async_p): Remove references
	to linux_nat_async_mask_value.
	(linux_nat_async_mask): Delete.
	(linux_nat_async, linux_nat_close): Remove references to
	linux_nat_async_mask_value.
	* record.c (record_async_mask_value): Delete.
	(record_async): Remove references to record_async_mask_value.
	(record_async_mask): Delete.
	(record_can_async_p, record_is_async_p): Remove references to
	record_async_mask_value.
	(init_record_ops, init_record_core_ops): Remove references to
	record_async_mask.
	* remote.c (remote_async_mask_value): Delete.
	(init_remote_ops): Remove reference to remote_async_mask.
	(remote_can_async_p, remote_is_async_p): Remove references to
	remote_async_mask_value.
	(remote_async): Remove references to remote_async_mask_value.
	(remote_async_mask): Delete.

	* infrun.c (fetch_inferior_event): Don't claim registers changed
	if the current thread is already not executing.
2011-06-06 12:47:07 +00:00
gdbadmin 586d24ef34 *** empty log message *** 2011-06-06 00:00:33 +00:00
gdbadmin f020b4cec1 *** empty log message *** 2011-06-05 00:00:33 +00:00
gdbadmin 5ca1effa14 *** empty log message *** 2011-06-04 00:00:02 +00:00
Joel Brobecker 64b9b33460 Various spelling fixes.
gdb/ChangeLog:

        From Stephen Kitt  <steve@sk2.org>
        * breakpoint.c, breakpoint.h, cli/cli-dump.c, dwarf2expr.c,
        gdbarch.c, gdbarch.sh, remote.c: Various spelling fixes.

gdb/testsuite/ChangeLog:

        From Stephen Kitt  <steve@sk2.org>
        * gdb.base/help.exp: Adjust following some spelling corrections
        in GDB.
2011-06-03 23:47:46 +00:00
Joel Brobecker 945b3647f2 Minor spelling fix. 2011-06-03 23:46:25 +00:00
Joel Brobecker 325663dcd2 address size can be different from DW_OP_deref size
gdb/ChangeLog:

        * dwarf2expr.c (execute_stack_op) [DW_OP_deref]: Handle
        the case where ADDR_SIZE is different from TYPE_LENGTH (type).
2011-06-03 17:42:24 +00:00
Tom Tromey 8cf64490f2 gdb
* python/py-inferior.c (python_inferior_exit): Use inferior's exit
	code fields.
	* python/py-exitedevent.c (create_exited_event_object): Change
	type of 'exit_code'.  Optionally add exit_code attribute.
	(emit_exited_event): Change type of 'exit_code'.
	* python/py-event.h (emit_exited_event): Update.
	* mi/mi-interp.c (mi_inferior_exit): Print exit code.
	* infrun.c (handle_inferior_event): Set exit code fields on
	inferior.
	* inferior.h (struct inferior) <has_exit_code, exit_code>: New
	fields.
	* inferior.c (exit_inferior_1): Initialize new fields.
gdb/doc
	* gdb.texinfo (GDB/MI Async Records): Document 'exit-code' field.
	(Events In Python): Note that exit_code is optional.
2011-06-03 15:32:44 +00:00
Tom Tromey 8ddd9a20a7 * dwarf2expr.c (get_signed_type): New function.
(execute_stack_op) <DW_OP_shra>: Always perform a signed shift.
2011-06-03 14:57:29 +00:00
gdbadmin ce6e3af315 *** empty log message *** 2011-06-03 00:00:03 +00:00
Keith Seitz 8dfd1e6d6e * objc-lang.c (find_methods): Increment objfile_csym earlier. 2011-06-02 18:44:01 +00:00
Pedro Alves 65fdb766be 2011-06-02 Pedro Alves <pedro@codesourcery.com>
gdb/
	* top.h (simplified_command_loop): Delete declaration.
2011-06-02 14:02:28 +00:00
gdbadmin 598f424ddf *** empty log message *** 2011-06-02 00:00:03 +00:00
Yao Qi dbc0f13167 2011-06-01 Yao Qi <yao@codesourcery.com>
* gdb.base/ending-run.exp: Match __uClibc_main for uClibc.
2011-06-01 15:55:55 +00:00
Mike Frysinger f4b8c29b8a gdb: sim: automatically pass down sysroot
Since gdb sets up a nice sysroot path for us by default, automatically
pass it down to the sim target so it too gets a good default.  This does
not override anything the user explicitly specifies of course.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-01 15:29:07 +00:00
Yao Qi 1706c19944 2011-06-01 Yao Qi <yao@codesourcery.com>
* objfiles.h (obj_section_addr): Update reference to objfile from
	`abfd' to `obfd'.
	(obj_section_endaddr): Likewise.
2011-06-01 14:46:23 +00:00
Daniel Jacobowitz d19cd71304 Really correct email address. 2011-06-01 11:09:15 +00:00
Daniel Jacobowitz 8d07004de6 * MAINTAINERS: Update my email address and affiliation. Also
update Ian Lance Taylor's affiliation.  Use UTF-8 for ludo@gnu.org.
2011-06-01 11:03:58 +00:00
gdbadmin 8dbe69d249 *** empty log message *** 2011-06-01 00:00:03 +00:00
Keith Seitz fd336a18df PR c++/12750
* gdb.cp/static-method.cc: New file.
	* gdb.cp/static-method.exp: New file.
2011-05-31 22:14:21 +00:00
Keith Seitz e8eb7bc534 PR c++/12750
* linespec.c (get_search_block): New function.
	(find_methods): Add FILE_SYMTATB parameter and use it and
	get_search_block to pass an appropriate block to
	lookup_symbol_in_namespace.
	(decode_line_1): Record if *ARGPTR is single-quote enclosed.
	Check if *ARGPTR starts with a filename first.
	If it does, call locate_first_half again to locate the next
	"first half" of the linespec.
	Pass FILE_SYMTATB to decode_objc and decode_compound.
	Swallow the trailing single-quote if IS_SQUOTE_ENCLOSED.
	(locate_first_half): Stop on the first colon seen.
	(decode_compound): Add FILE_SYMTAB parameter.
	Pass FILE_SYMTAB to lookup_prefix_sym and find_method.
	(lookup_prefix_sym): Add FILE_SYMTAB parameter and use
	get_search_block with lookup_symbol.
	(find_method): Add FILE_SYMTAB parameter and pass it to
	find_methods.
	(decode_objc): Use get_search_block.
2011-05-31 22:13:51 +00:00
Keith Seitz fa8b9902af PR symtab/12704
* gdb.cp/anon-ns.cc: New file.
	* gdb.cp/anon-ns.exp: New file.
2011-05-31 21:54:49 +00:00
Keith Seitz 2b1dbab03d PR symtab/12704
* cp-namespace.c (ANONYMOUS_NAMESPACE_LEN): Remove.
	(cp_scan_for_anonymous_namespaces): Use CP_ANONYMOUS_NAMESPACE_STR
	and CP_ANONYMOUS_NAMESPACE_LEN.
	(cp_is_anonymous): Likewise.
	* cp-support.h (CP_ANONYMOUS_NAMESPACE_STR): Define.
	(CP_ANONYMOUS_NAMESPACE_LEN): Define.
	* dwarf2read.c (namespace_name): Likewise.
	(fixup_partial_die): Likewise.
	* linespec.c (decode_compound): If CP_ANONYMOUS_NAMESPACE_STR is
	seen in the input, keep it.
2011-05-31 21:54:07 +00:00
Pedro Alves 0a5b1e09bf 2011-05-31 Pedro Alves <pedro@codesourcery.com>
gdb/gdbserver/
	* linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
	assertion.
	* win32-i386-low.c (i386_dr_low_get_addr): Ditto.

	gdb/testsuite/
	* gdb.arch/i386-dr3-watch.c: New file.
	* gdb.arch/i386-dr3-watch.exp: New file.
2011-05-31 21:18:56 +00:00
gdbadmin 9ad61fd62f *** empty log message *** 2011-05-31 00:00:32 +00:00
Pedro Alves 6d549500db 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* target.h (enum inferior_event_type): Delete INF_QUIT_REQ.
	* inf-loop.h (inferior_event_handler_wrapper): Delete.
	* inf-loop.c (inferior_event_handler_wrapper): Delete.
	(inferior_event_handler): Don't handle INF_QUIT_REQ.
	* remote.c (_initialize_remote): Register
	async_remote_interrupt_twice directly as
	sigint_remote_twice_token event.
2011-05-30 21:16:35 +00:00
Pedro Alves 395bff701e 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* target.h (enum inferior_event_type): Delete INF_ERROR.
	* inf-loop.c (inferior_event_handler): Don't handle INF_ERROR.
2011-05-30 20:54:24 +00:00
Pedro Alves 9722416428 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* interps.c (interp_set): Don't cancel continuations.
2011-05-30 20:13:29 +00:00
Jan Kratochvil 07e78767d6 gdb/
* linux-nat.c (linux_lwp_is_zombie): Use xsnprintf.
2011-05-30 19:26:36 +00:00
Pedro Alves fa4cd53f7d 2011-05-30 Pedro Alves <pedro@codesourcery.com>
gdb/
	* continuations.h (continuation_ftype): Add `err' parameter.
	Document parameters.
	(do_all_continuations, do_all_continuations_thread)
	(do_all_intermediate_continuations)
	(do_all_intermediate_continuations_thread)
	(do_all_inferior_continuations): Add `err' parameter.
	* continuations.c (do_my_continuations_1, do_my_continuations)
	(do_all_inferior_continuations, do_all_continuations_ptid)
	(do_all_continuations_thread_callback)
	(do_all_continuations_thread, do_all_continuations)
	(do_all_intermediate_continuations_thread_callback)
	(do_all_intermediate_continuations_thread)
	(do_all_intermediate_continuations): Add `err' parameter, and pass
	it down all the way to the continuations proper.
	* inf-loop.c (inferior_event_handler): If fetching an inferior
	event throws an error, don't pop the target, and still call the
	continuations, but with `err' set.  Adjust all other continuation
	calls.
	* breakpoint.c (until_break_command_continuation): Add `err'
	parameter.
	* infcmd.c (step_1_continuation): Add `err' parameter.  Don't
	issue another step if `err' is set.
	(struct until_next_continuation_args): New.
	(until_next_continuation): Add `err' parameter.  Adjust.
	(until_next_command): Adjust.
	(struct finish_command_continuation_args): Add `thread' field.
	(finish_command_continuation): Add `err' parameter.  Handle it.
	(finish_forward): Adjust.
	(attach_command_continuation): Add `err' parameter.  Handle it.
	* infrun.c (infrun_thread_stop_requested_callback): Adjust to
	cancel the continuations.
	* interps.c (interp_set): Adjust to cancel the continuations.
	* thread.c (clear_thread_inferior_resources): Adjust to cancel the
	continuations rather than discarding.
	(free_thread): Don't clear thread inferior resources here.
	(delete_thread_1): Do it here instead.  And do it before removing
	the thread from the threads list.  Tag the thread as exited before
	clearing thread inferior resources.
2011-05-30 18:04:32 +00:00
Joel Brobecker c2949be03b Rephrase error message in infcall.c:call_function_by_hand
No real change besides the error message.

gdb/ChangeLog:

	* infcall.c (call_function_by_hand): Rephrase error message.
2011-05-30 16:08:28 +00:00
Yao Qi 0578b8d157 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/callfuncs.c (t_structs_fc): New.
	(t_structs_dc, t_structs_ldc): New.
	(t_double_many_args):
	(DEF_FUNC_MANY_ARGS_1, DEF_FUNC_MANY_ARGS_2): Define.
	(DEF_FUNC_MANY_ARGS_3, DEF_FUNC_VALUES_1): Define.
	(DEF_FUNC_VALUES_2, DEF_FUNC_VALUES_3): Define.
	* gdb.base/callfuncs.exp: Call new functions.
2011-05-30 02:51:58 +00:00
Yao Qi ff4d2c6018 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/callfuncs.exp (rerun_and_prepare): New.
	Call rerun_and_prepare for each test to isolate effects.
2011-05-30 02:32:21 +00:00
Yao Qi 6680506ef0 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/varargs.c (find_max_float_real): New.
        (find_max_double_real, find_max_long_double_real): New.
        * gdb.base/varargs.exp: Call these new added functions.
	* lib/gdb.exp (setup_kfail_for_target): New.
2011-05-30 02:27:51 +00:00
Yao Qi e43ec454f9 2011-05-30 Yao Qi <yao@codesourcery.com>
* gdb.base/funcargs.c (callca, callcb, callcc): New.
	(callcd, callce, callcf, callc1a, callc1b): New.
	(callc2a, callc2b): New.
	* gdb.base/funcargs.exp (complex_args): New.
	(complex_integral_args, complex_float_integral_args): New.
	* lib/gdb.exp (support_complex_tests): New.  Determine
	whether to run test cases on _Complex types.
2011-05-30 02:20:16 +00:00
gdbadmin a773502202 *** empty log message *** 2011-05-30 00:00:03 +00:00
gdbadmin b3c88224d5 *** empty log message *** 2011-05-29 00:00:32 +00:00
gdbadmin 597a1b9a54 *** empty log message *** 2011-05-28 00:00:32 +00:00
Pedro Alves 619cebe87f 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* defs.h (struct thread_info, struct inferior): Delete forward
	declarations.
	* breakpoint.h (struct thread_info): New forward declaration.
	* observer.sh (struct inferior): New forward declaration.
	* python/python-internal.h (struct inferior): New forward
	declaration.
2011-05-27 18:39:49 +00:00
Pedro Alves be34f8494e 2011-05-27 Pedro Alves <pedro@codesourcery.com>
* defs.h (struct continuation, continuation_ftype)
	(continuation_free_arg_ftype, add_continuation)
	(do_all_continuations, do_all_continuations_thread)
	(discard_all_continuations, discard_all_continuations_thread)
	(add_intermediate_continuation, do_all_intermediate_continuations)
	(do_all_intermediate_continuations_thread)
	(discard_all_intermediate_continuations)
	(discard_all_intermediate_continuations_thread)
	(add_inferior_continuation, do_all_inferior_continuations)
	(discard_all_inferior_continuations): Move to ...
	* continuations.h: ... this new file.
	* breakpoint.c, continuations.c, event-top.c, inf-loop.c,
	infcmd.c, inferior.c, infrun.c, interps.c: Include
	continuations.h.
2011-05-27 18:28:18 +00:00
Jan Kratochvil 432b4d03ad gdb/
Fix PR 10970, PR 12702.
	* linux-nat.c (linux_lwp_is_zombie): New function.
	(wait_lwp): Initialize status.  New variable prev_mask.  Block signals.
	Check for linux_lwp_is_zombie.  Use WNOHANG and sigsuspend.

gdb/testsuite/
	* gdb.threads/leader-exit.c: New file.
	* gdb.threads/leader-exit.exp: New file.
2011-05-27 16:55:39 +00:00
Pedro Alves b0f260d61e 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* defs.h (continuation_ftype, continuation_free_arg_ftype): New
	typedefs.
	(add_continuation, add_intermediate_continuation)
	(add_inferior_continuation): Use them.
	* continuations.c (struct continuation): Use them.
	(make_continuation_ftype): Delete.
	(make_continuation, add_inferior_continuation, add_continuation)
	(add_intermediate_continuation): Use continuation_ftype and
	continuation_free_arg_ftype.  Rename parameters to shorter names.
2011-05-27 14:56:14 +00:00
Pedro Alves af1e9a32aa 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* continuations.c (make_continuation): Make it return void.
	(do_my_continuations): Rename to ...
	(do_my_continuations_1): ... this.  Remove old_chain parameter and
	adjust.
	(do_my_continuations): New.
	(discard_my_continuations): Rename to ...
	(discard_my_continuations_1): ... this.  Remove old_chain
	parameter and adjust.
	(discard_my_continuations): New.
	(add_inferior_continuation): Simplify.
	(do_all_inferior_continuations): Reimplement on top
	do_my_continuations.
	(discard_all_inferior_continuations): Simplify.
	(add_continuation): Simplify.
	(do_all_continuations_ptid): Simplify.
	(discard_all_continuations_thread_callback): Simplify.
	(add_intermediate_continuation): Simplify.
	(discard_all_intermediate_continuations_thread_callback):
	Simplify.
2011-05-27 14:32:08 +00:00
Marek Polacek 6caf069d24 gdb.mi/mi-nonstop.exp: Replace gdb_test_multiple with mi_gdb_test. 2011-05-27 14:16:43 +00:00
Pedro Alves 50c0c01734 2011-05-27 Pedro Alves <pedro@codesourcery.com>
gdb/
	* utils.c (struct continuation, add_continuation)
	(add_inferior_continuation)
	(do_all_inferior_continuations, discard_all_inferior_continuations)
	(restore_thread_cleanup, do_all_continuations_ptid)
	(do_all_continuations_thread_callback)
	(do_all_continuations_thread, do_all_continuations)
	(discard_all_continuations_thread_callback)
	(discard_all_continuations_thread, discard_all_continuations)
	(add_intermediate_continuation)
	(do_all_intermediate_continuations_thread_callback)
	(do_all_intermediate_continuations_thread)
	(do_all_intermediate_continuations)
	(discard_all_intermediate_continuations_thread_callback)
	(discard_all_intermediate_continuations_thread)
	(discard_all_intermediate_continuations): Move to ...
	* continuations.c: ... this new file, and adjust to no longer
	implement continuations on top of cleanups.
	* Makefile.in (SFILES): Add continuations.c.
	(COMMON_OBS): Add continuations.o.
2011-05-27 14:00:25 +00:00
Marek Polacek 97fce28b40 gdb.mi: Get rid of the non-stop testcases. 2011-05-27 12:47:10 +00:00
gdbadmin cc67cf82dc *** empty log message *** 2011-05-27 00:00:33 +00:00
Pedro Alves d8b344530c 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* inferior.h (enum exec_direction_kind): Delete EXEC_ERROR.
	* infrun.c (show_exec_direction_func): Don't handle EXEC_ERROR.
	Internal error on invalid values.
	* reverse.c: Don't handle EXEC_ERROR.
	* mi/mi-main.c: Don't handle EXEC_ERROR.
2011-05-26 18:23:32 +00:00
Pedro Alves 3223143295 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* record.c: Include event-loop.h, inf-loop.h.
	(record_beneath_to_async): New global.
	(tmp_to_async): New global.
	(record_async_inferior_event_token): New global.
	(record_open_1): Don't error out if async is enabled.
	(record_open): Handle to_async.  Create an async event source in
	the event loop.
	(record_close): Delete the async event source.
	(record_resumed): New global.
	(record_execution_dir): New global.
	(record_resume, record_core_resume): Set them.  Register the
	target on the event loop.
	(record_wait): Rename to ...
	(record_wait_1): ... this.  Add more debug output.  Handle
	TARGET_WNOHANG, and the target beneath returning
	TARGET_WAITKIND_IGNORE.
	(record_wait): Reimplement on top of record_wait_1.
	(record_async_mask_value): New global.
	(record_async, record_async_mask, record_can_async_p)
	(record_is_async_p, record_execution_direction): New functions.
	(init_record_ops, init_record_core_ops): Install new methods.
	* infrun.c (fetch_inferior_event): Temporarily switch the global
	execution direction to the direction the target was going.
	(execution_direction): Change type to int.
	* target.c (default_execution_direction): New function.
	(update_current_target): Inherit and de_fault
	to_execution_direction.
	* target.h (struct target_ops) <to_execution_direction>: New
	field.
	(target_execution_direction): New macro.
	* inferior.h (execution_direction): Change type to int.
2011-05-26 18:11:33 +00:00
Pedro Alves 949dc678a8 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcall.c (call_function_by_hand): Don't allow calling functions
	in reverse execution mode.
2011-05-26 16:23:08 +00:00
Pedro Alves c13bd2b52e 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcmd.c (finish_command): Allow async finish in reverse.
2011-05-26 16:11:45 +00:00
Yao Qi 6938fd346a 2011-05-26 Yao Qi <yao@codesourcery.com>
gdb/
	* gdb_thread_db.h: Delete.  Move to ...
	* common/gdb_thread_db.h: ... here.

	gdb/gdbserver/
	* Makefile.in (thread-db.o): Track dependence to
	common/gdb_thread_db.h.
	* thread-db.c: include gdb_thread_db.h from right place.
2011-05-26 15:49:26 +00:00
Pedro Alves 9da8c2a0fa 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcmd.c (finish_backward): Set a step-resume breakpoint at the
	function's entry point instead of a manually managed momentary
	breakpoint, and only ever issue one proceed call.
	* infrun.c (handle_inferior_event) <BPSTAT_WHAT_STEP_RESUME>: If
	doing a reverse-finish, switch to stepi mode, to do another step.
	(insert_step_resume_breakpoint_at_sal): Make public.
	(normal_stop): No need to save function value return registers if
	going reverse.
	* inferior.h (insert_step_resume_breakpoint_at_sal): Declare.

	gdb/testsuite/
	* gdb.reverse/finish-reverse-bkpt.exp: New test.
2011-05-26 15:32:38 +00:00
Pedro Alves 2c03e5bed3 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.h (enum bptype) <bp_hp_step_resume>: New.
	(enum bpstat_what_main_action): Move BPSTAT_WHAT_STEP_RESUME
	before BPSTAT_WHAT_STOP_SILENT.  Add BPSTAT_WHAT_HP_STEP_RESUME
	at the end.
	* breakpoint.c (update_breakpoints_after_exec): Also delete hp
	step-resume breakpoints.
	(print_it_typical): Handle bp_hp_step_resume.
	(bpstat_what): Ditto.
	(bptype_string): Ditto.
	(print_one_breakpoint_location): Ditto.
	(allocate_bp_location): Ditto.
	(mention): Ditto.
	(breakpoint_re_set_one): Ditto.
	* infrun.c (handle_inferior_event): Adjust.  Split
	BPSTAT_WHAT_STEP_RESUME handling in BPSTAT_WHAT_STEP_RESUME and
	BPSTAT_WHAT_HP_STEP_RESUME.
	(insert_step_resume_breakpoint_at_sal): Rename to ...
	(insert_step_resume_breakpoint_at_sal_1): ... this.  Add bptype
	parameter.  Handle it.
	(insert_step_resume_breakpoint_at_sal): Reimplement on top of
	insert_step_resume_breakpoint_at_sal_1.
	(insert_step_resume_breakpoint_at_frame): Rename to ...
	(insert_hp_step_resume_breakpoint_at_frame): ... this.  Adjust to
	set a high-priority step-resume breakpoint.
	(insert_step_resume_breakpoint_at_frame): Adjust comment.
	(insert_step_resume_breakpoint_at_caller): Ditto.

	gdb/testsuite/
	* gdb.reverse/next-reverse-bkpt-over-sr.exp: New test.
2011-05-26 14:59:18 +00:00
Pedro Alves 51be5b68a5 2011-05-26 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.c (iterate_over_related_breakpoints): New.
	(do_map_delete_breakpoint): New.
	(delete_command): Pass do_map_delete_breakpoint to
	map_breakpoint_numbers.
	(do_disable_breakpoint): New.
	(do_map_disable_breakpoint): Iterate over the breakpoint's related
	breakpoints.
	(do_enable_breakpoint): Rename to ...
	(enable_breakpoint_disp): ... this.
	(enable_breakpoint): Adjust.
	(do_enable_breakpoint): New.
	(enable_once_breakpoint): Delete.
	(do_map_enable_breakpoint): New.
	(do_map_enable_once_breakpoint): New.
	(enable_once_command, enable_delete_command)
	(delete_trace_command): Iterate over the breakpoint's related
	breakpoints.
2011-05-26 14:21:24 +00:00
Pedro Alves 4a1be8d214 * alpha-tdep.c (alpha_cannot_fetch_register): Don't return true
for ALPHA_ZERO_REGNUM.
	(alpha_supply_int_regs): Explicitly supply zero as the value for
	ALPHA_ZERO_REGNUM in the register cache.
	* alpha-nat.c (fetch_osf_core_registers): Ditto.
2011-05-26 13:57:46 +00:00
Yao Qi 59d70315fb 2011-05-26 Yao Qi <yao@codesourcery.com>
* gdb/gdb_thread_db.h: Remove HAVE_UINTPTR_T.
2011-05-26 08:09:25 +00:00
Tristan Gingold 251d32d96e 2011-05-26 Tristan Gingold <gingold@adacore.com>
* symfile.h (struct dwarf2_section_names): New type.
	(struct dwarf2_debug_sections): New type.
	(dwarf2_has_info): Add parameter.
	* dwarf2read.c (dwarf2_elf_names): New variable.
	(INFO_SECTION, ABBREV_SECTION, LINE_SECTION, LOC_SECTION)
	(MACINFO_SECTION, STR_SECTION, RANGES_SECTION, TYPES_SECTION)
	(FRAME_SECTION, EH_FRAME_SECTION, GDB_INDEX_SECTION): Remove.
	(dwarf2_has_info): Add names parameter.  Pass names
	to dwarf2_locate_sections.
	(section_is_p): Rewrite using the names parameter.
	(dwarf2_locate_sections): Use section names from the names parameter.
	* coffread.c (coff_symfile_read): Adjust call to dwarf2_has_info.
	* elfread.c (read_psyms): Ditto.
	* machoread.c (macho_symfile_read): Ditto.
2011-05-26 07:47:10 +00:00
gdbadmin 39f8b7c1fa *** empty log message *** 2011-05-26 00:00:32 +00:00
Andreas Schwab 652c71b432 PR gdb/8677
* event-loop.c (handle_file_event): Don't handle POLLHUP as error.
2011-05-25 07:59:04 +00:00
gdbadmin 012ca7c8a8 *** empty log message *** 2011-05-25 00:00:33 +00:00
Keith Seitz 2e21250dbc PR breakpoint/12803
* gdb.cp/cmpd-minsyms.cc (a): New method.
	(b): New method.
	(c): New method.
	* gdb.cp/cmpd-minsyms.exp: Add tests for new methods.
2011-05-24 21:00:45 +00:00
Keith Seitz f17170e5e2 PR breakpoint/12803
* linespec.c (keep_name_info): Add handling for "volatile" keyword.
	(decode_compound): Unconditionally call	keep_name_info.
2011-05-24 21:00:09 +00:00
Pedro Alves cdac0397bf 2011-05-24 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.c (watchpoint_check): If the watchpoint went out of
	scope, clear its command list.
	(map_breakpoint_numbers): Don't walk the related breakpoints list
	of each breakpoint.

	gdb/testsuite/
	* gdb.base/commands.exp (watchpoint_command_test): Check that the
	watchpoint's command list didn't execute when the watchpoint went
	out of scope.
2011-05-24 15:03:30 +00:00
Tom Tromey 91d4fe3f85 * MAINTAINERS: Move Jim Blandy to past maintainers. 2011-05-24 14:52:30 +00:00
Tristan Gingold 3017a00367 2011-05-24 Tristan Gingold <gingold@adacore.com>
* symfile.h (enum dwarf2_section_enum): New type.
	(dwarf2_get_section_info): New prototype.
	* dwarf2read.c (dwarf2_get_section_info): Replace parameter
	section_name by sect.  Use a switch to select the info.
	* dwarf2-frame.c (warf2_get_section_info): Remove prototype.
	(dwarf2_build_frame_info): Adjust calls to dwarf2_get_section_info.
2011-05-24 12:40:17 +00:00
Pierre Muller ee5683ab05 ../commit.txt~ 2011-05-24 12:01:22 +00:00
Pedro Alves c91c8c1612 2011-05-24 Pedro Alves <pedro@codesourcery.com>
gdb/
	* solib-svr4.c (svr4_solib_create_inferior_hook): Skip setting
	shared library event breakpoint if there's no execution.

	gdb/testsuite/
	* gdb.trace/tfile.exp: Add test that opening the basic.tf trace
	file doesn't error, using MI.
2011-05-24 10:48:19 +00:00
Thiago Jung Bauermann 77bc418a4b * breakpont.c (remove_hw_watchpoints): Remove unused function.
* breakpoint.h remove_hw_watchpoints(): Remove prototype.
2011-05-24 03:03:56 +00:00
gdbadmin ed7422145a *** empty log message *** 2011-05-24 00:00:03 +00:00
Tom Tromey c50491a797 gdb
* c-lang.c (evaluate_subexp_c): Use expect_type if it is not
	NULL.
gdb/testsuite
	* gdb.base/charset.exp (string_display): Add tests to assign to
	arrays.
	* gdb.base/charset.c (short_array, int_array, long_array): New.
2011-05-23 20:27:23 +00:00
Doug Evans 6d64e6d477 * python/lib/gdb/printing.py (register_pretty_printer): Add missing
entry for RuntimeError to doc string.
2011-05-23 17:38:06 +00:00
Jerome Guitton 2067c8d4a8 * sparc-tdep.c (sparc_skip_stack_check): Recognize a new instruction
sequence for probing loops.
2011-05-23 16:38:05 +00:00
Pedro Alves b136cd053f 2011-05-23 Pedro Alves <pedro@codesourcery.com>
* infrun.c (user_visible_resume_ptid): Fix typos in describing
	comment.
2011-05-23 15:18:36 +00:00
gdbadmin 2712fce34f *** empty log message *** 2011-05-23 00:00:32 +00:00
gdbadmin ce87af851f *** empty log message *** 2011-05-22 00:00:03 +00:00
Mark Kettenis 22e74ef9b5 * sparc-nat.c (sparc_fetch_inferior_registers): Explicitly supply
zero as the value for %g0 in the register cache.
* sparc-tdep.c (sparc32_supply_gregset): Likewise.
* sparc64-tdep.c (sparc64_supply_gregset): Likewise.
2011-05-21 19:19:45 +00:00
gdbadmin 1d0325c9e6 *** empty log message *** 2011-05-21 00:00:03 +00:00
Pedro Alves 842951eb8c 2011-05-20 Pedro Alves <pedro@codesourcery.com>
* infrun.c (proceed): Set previous_inferior_ptid here.
	(init_wait_for_inferior): Initialize previous_inferior_ptid from
	inferior_ptid, not null_ptid.
	(wait_for_inferior): Don't initialize previous_inferior_ptid here.
	(fetch_inferior_event): Nor here.
2011-05-20 18:38:16 +00:00
Pedro Alves 46cf51e660 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/
	* inf-loop.c (inferior_event_handler): Only output a message if
	verbose.
2011-05-20 18:24:41 +00:00
Luis Machado 29ef4c4686 * MAINTAINERS: Update my e-mail address. 2011-05-20 18:08:43 +00:00
Pedro Alves 4a07b7dac5 2011-05-20 Pedro Alves <pedro@codesourcery.com>
Cope with async mode.

	gdb/testsuite/
	* gdb.mi/mi-break.exp (test_breakpoint_commands): Split gdb_test
	into gdb_test + mi_expect_stop.
2011-05-20 17:52:54 +00:00
Pedro Alves b275f2d2f2 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
	* gdb.mi/basics.c: Don't include stdio.h or unistd.h.
	(callme): Remove printf call.
2011-05-20 17:41:04 +00:00
Pedro Alves f148b27e2c 2011-05-20 Pedro Alves <pedro@codesourcery.com>
* infrun.c (proceed): Switch the inferior event loop to
	INF_EXEC_COMPLETE if the target refused to resume from a
	vfork/fork.
2011-05-20 16:43:47 +00:00
Pedro Alves 09cee04be9 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcmd.c: Include "inf-loop.h".
	(step_once): When stepping into an inline subroutine, pretend the
	target has run.  If the target can async, switch the inferior
	event loop to INF_EXEC_COMPLETE.
	* inferior.h (user_visible_resume_ptid): Declare.
	* infrun.c (user_visible_resume_ptid): New function, factored out
	from `resume'.
	(resume): Use it.
	* mi/mi-main.c (mi_execute_async_cli_command): Remove assertion
	that the current thread is running.  Merge async and sync
	branches.
2011-05-20 16:31:31 +00:00
Pedro Alves 751b8ce122 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infcmd.c (step_1): Simplify synchronous case.
2011-05-20 16:20:25 +00:00
Pedro Alves e93a69ed93 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/
	* tracepoint.c: Include exceptions.h.
	(TFILE_PID): Move higher in file.
	(tfile_open): Delay pushing the tfile target until we're assured
	the tfile header is present in the file.  Wrap reading the initial
	newline-terminated lines in TRY_CATCH.  Pop the target if the
	initial setup failed.  Add the tfile's thread immediately
	aftwards, before any non-essential setup.  Don't skip
	post_create_inferior if there are no traceframes present in the
	file.
	(tfile_close): Remove redundant check for null before xfree call.
	(tfile_thread_alive): New function.
	(init_tfile_ops): Register it as to_thread_alive callback.
2011-05-20 14:41:12 +00:00
Pedro Alves 6823e2b15f 2011-05-20 Pedro Alves <pedro@codesourcery.com>
gdb/
	* tracepoint.c (tfile_open): Delete #if 0'd code.
2011-05-20 14:40:23 +00:00
Pierre Muller eec52c4458 * lib/gdb.exp (gdb_test_list_exact): Suggest use of double
quote pattern to avoid problems with Cygwin/mingw expect versions.
	* gdb.base/default.exp (show convenience): Use double
	quote pattern for regular expressions.
2011-05-20 14:37:20 +00:00
Jan Kratochvil b3c8eb43f1 gdb/
Fix -readnow for -gdwarf-4 unused type units.
	* dwarf2read.c (struct signatured_type): Remove the field offset.
	(create_signatured_type_table_from_index): Remove its initialization.
	(create_debug_types_hash_table): Likewise.  Initialize per_cu.offset
	instead.  Add a complaint call.
	(process_psymtab_comp_unit): Change assignment to gdb_assert.
	(process_type_comp_unit, lookup_die_type, dump_die_shallow)
	(lookup_signatured_type_at_offset, read_signatured_type)
	(write_one_signatured_type): Update the field for per_cu.

gdb/testsuite/
	Fix -readnow for -gdwarf-4 unused type units.
	* gdb.dwarf2/dw4-sig-type-unused.S: New file.
	* gdb.dwarf2/dw4-sig-type-unused.exp: New file.
2011-05-20 08:55:51 +00:00
gdbadmin 5583de77a9 *** empty log message *** 2011-05-20 00:00:33 +00:00
Tom Tromey 310afc7652 * python/py-inferior.c (python_inferior_exit): Use
target_gdbarch.
	(python_on_resume): Likewise.
2011-05-19 18:41:23 +00:00
Tom Tromey cf6c5ffb4c 2011-05-19 Matt Rice <ratmice@gmail.com>
* breakpoint.c (bpstat_do_actions_1): Call prevent_dont_repeat.
2011-05-19 18:31:24 +00:00
Hui Zhu fb80a3c562 2011-05-19 Hui Zhu <teawater@gmail.com>
* tracepoint.c (tfile_trace_find): Return directly when num is -1.
2011-05-19 14:06:44 +00:00
Hui Zhu 3672b1be0a 2011-05-19 Hui Zhu <teawater@gmail.com>
* xcoffread.c (read_xcoff_symtab): Initialize fcn_aux_saved.
2011-05-19 06:54:30 +00:00
gdbadmin 3ee2366c5f *** empty log message *** 2011-05-19 00:01:02 +00:00
Tom Tromey ff355380ea * dwarf2read.c (dwarf2_add_field): Constify.
* value.c (value_static_field): Constify.
	* gdbtypes.h (struct main_type) <field.field_location.physname>:
	Now const.
	* ax-gdb.c (gen_static_field): Constify
2011-05-18 20:19:52 +00:00
Jan Kratochvil ed73195945 gdb/
* linux-nat.c (kill_callback): Use SIGKILL first.

gdb/testsuite/
	* gdb.base/kill-after-signal.c: New file.
	* gdb.base/kill-after-signal.exp: New file.
2011-05-18 18:03:30 +00:00
Joel Brobecker 967cff168c Remove one use of sprintf in ada-lang.c (print_it_exception)
This is just a minor cleanup of an ARI violation.  As this affects
code that is normally unreachable (you'd need a runtime where
the unit providing the exception hook has been compiled without
debugging information), I tested this manually by commenting out
the code just above, thus forcing this part of the code to be
exercised.

gdb/ChangeLog:

        * ada-lang.c (print_it_exception): Avoid use of sprintf.

Tested on x86_64-linux.
2011-05-18 17:29:59 +00:00
Tom Tromey 1d06ead687 * value.c (value_fn_field): Constify.
* symtab.c (gdb_mangle_name): Constify.
	* stabsread.c (update_method_name_from_physname): Make 'physname'
	argument const.
	* p-typeprint.c (pascal_type_print_method_args): Make arguments
	const.  Use explicit fputc_filtered loop.
	(pascal_type_print_base): Constify.
	* p-lang.h (pascal_type_print_method_args): Update.
	* linespec.c (add_matching_methods): Constify.
	(add_constructors): Likewise.
	* jv-typeprint.c (java_type_print_base): Constify.
	* gdbtypes.h (struct cplus_struct_type)
	<fn_fieldlist.fn_field.physname>: Now const.
	* dwarf2read.c (compute_delayed_physnames): Constify.
	(dwarf2_add_member_fn): Likewise.
	* c-typeprint.c (c_type_print_base): Constify.  Use cleanups.
2011-05-18 16:30:37 +00:00
Pedro Alves 0d9a9a5ffe 2011-05-18 Pedro Alves <pedro@codesourcery.com>
gdb/
	* infrun.c (resume): Mention which is the current thread, and its
	current PC in debug output.
	(prepare_to_proceed): Mention the thread switching in debug
	output.
2011-05-18 16:20:27 +00:00
Tom Tromey 05386e9ec7 * linux-thread-db.c (try_thread_db_load_from_pdir_1): Fix absolute
path check.  Use xmalloc and cleanups.
	(try_thread_db_load_from_dir): Use xmalloc and cleanups.
2011-05-18 15:00:55 +00:00
gdbadmin cef6e90a3e *** empty log message *** 2011-05-18 00:00:32 +00:00
Tom Tromey ee86786cdd * cp-valprint.c (cp_print_value_fields): Catch errors from
value_static_field.
2011-05-17 19:29:10 +00:00
Tom Tromey 9ff3b74fdb * dwarf2read.c (dwarf2_get_die_type): Call
get_die_type_at_offset.
	* dwarf2expr.c (dwarf_get_base_type): Handle NULL return from
	get_base_type function.
2011-05-17 17:01:46 +00:00
Pedro Alves 393eab5450 2011-05-17 Pedro Alves <pedro@codesourcery.com>
gdb/doc/
	* gdb.texinfo (Remote Protocol) <Overview>: Mention vCont is
	required for multi-threading support.
	(Remote Protocol) <Packets>: Mention that 'c', 's', 'C', 'S' and
	Hc are deprecated for multi-threading debugging.  Point readers at
	the vCont packet.
2011-05-17 13:29:38 +00:00
Pedro Alves cd3da28e23 2011-05-17 Tomas Martinec <fyzmat@gmail.com>
gdb/
	* infrun.c (handle_inferior_event) <handling deferred step>: Clear
	trap_expected.
2011-05-17 11:43:07 +00:00
gdbadmin 4c83e80569 *** empty log message *** 2011-05-17 00:01:03 +00:00
Doug Evans fd20d931f1 * python/py-auto-load.c (source_section_scripts): Mention objfile
name in warning.
2011-05-16 16:33:57 +00:00
Tom Tromey b481f9e0ce 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
* linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
	__FILE__ and __LINE__ to internal_error.
2011-05-16 15:59:45 +00:00
Pedro Alves 3b48433dfb 2011-05-16 Pedro Alves <pedro@codesourcery.com>
gdb/testsuite/
	* gdb.ada/start.exp: Call untested with the correct test filename.
	* gdb.arch/i386-bp_permanent.exp: Call untested with the correct
	test filename.  Make the test's binary unique.
	* gdb.arch/i386-signal.exp: Call untested with the correct test
	filename.
	* gdb.arch/i386-size-overlap.exp: Ditto.
	* gdb.arch/Makefile.in (EXECUTABLES): Update.
	* gdb.base/gcore-buffer-overflow.exp: Ditto.
	* gdb.cp/call-c.exp: Ditto.
	* gdb.mi/mi-reverse.exp: Call untested with the correct test
	filename.  Make the test's binary unique.
	* gdb.mi/Makefile.in (EXECUTABLES): Update.
	* gdb.python/py-mi.exp: Ditto.
	* gdb.python/Makefile.in (EXECUTABLES): Update.
	* gdb.reverse/i386-precsave.exp: Ditto.
	* gdb.reverse/i387-env-reverse.exp: Call untested with the correct
	test filename.
	* gdb.reverse/i387-stack-reverse.exp: Ditto.
	* gdb.reverse/sigall-precsave.exp: Ditto.  Make the test's binary
	unique.
	* gdb.reverse/sigall-reverse.exp: Call untested with the correct
	test filename.
	* gdb.reverse/Makefile.in (EXECUTABLES): Update.
	* gdb.trace/tfile.exp: Ditto.
2011-05-16 13:56:41 +00:00
Doug Evans 290351b813 * linux-thread-db.c (try_thread_db_load_from_pdir_1): New function.
(try_thread_db_load_from_pdir): Call it.  If unable to find
	libthread_db in directory of libpthread, see if we're looking at
	the separate-debug-info copy.
2011-05-16 02:22:39 +00:00
gdbadmin 6706b16f7f *** empty log message *** 2011-05-16 00:00:33 +00:00
Doug Evans 75fc9810e3 * python/py-autoload.c (print_script): Print "Missing" instead of
"No" for missing scripts.
	(info_auto_load_scripts): Tweak "Loaded" column to fit "Missing".

	doc/
	* gdb.texinfo (Auto-loading): Document printing of missing scripts.
2011-05-15 18:46:25 +00:00
gdbadmin 80db650d1d *** empty log message *** 2011-05-15 00:00:33 +00:00
Yao Qi ba4a8bdd81 2011-05-14 Yao Qi <yao@codesourcery.com>
* gdb.trace/tfile.c(add_memory_block): Store address in unsigned
	type.
2011-05-14 06:06:36 +00:00
Doug Evans 9f7bc58762 * ui-file.c (stdio_file_write_async_safe): Add comment. 2011-05-14 05:44:37 +00:00
Hui Zhu 093cee7d54 2011-05-14 Hui Zhu <teawater@gmail.com>
* ui-file.c (stdio_file_write_async_safe): Add empty check for build.
2011-05-14 03:37:18 +00:00
gdbadmin 5aa4daa445 *** empty log message *** 2011-05-14 00:00:33 +00:00
Doug Evans 98a5dd1327 Support $pdir and $sdir in libthread-db-search-path.
* NEWS: Mention $sdir,$pdir.
	* gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): Add $sdir:$pdir.
	* linux-thread-db.c (try_thread_db_load_from_pdir): New function.
	(try_thread_db_load_from_sdir): New function.
	(try_thread_db_load_from_dir): New function.
	(thread_db_load_search): Handle $pdir, $sdir.  Remove trying of
	system directories if search of libthread-db-search-path fails,
	that is now done via $sdir.
	(has_libpthread): New function.
	(thread_db_load): Remove search for libthread_db in directory of
	libpthread, that is now done via $pdir.

	gdbserver/
	* thread-db.c (try_thread_db_load_from_sdir): New function.
	(try_thread_db_load_from_dir): New function.
	(thread_db_load_search): Handle $sdir, ignore $pdir.
	Remove trying of system directories if search of
	libthread-db-search-path fails,	that is now done via $sdir.

	doc/
	* gdb.texinfo (Threads): Document $sdir,$pdir.
	(Server): Document $pdir exception.
2011-05-13 22:36:07 +00:00
Doug Evans dbaefcf757 * NEWS: Mention "info auto-load-scripts".
* python/py-auto-load.c (struct auto_load_pspace_info): New member
	script_not_found_warning_printed.
	(init_loaded_scripts_info): Renamed from create_loaded_scripts_hash,
	all callers updated.  Initialize script_not_found_warning_printed.
	(get_auto_load_pspace_data_for_loading): New function.
	(maybe_add_script): New function.
	(source_section_scripts): Simplify.  Only print one warning regardless
	of the number of auto-load scripts not found.
	(clear_section_scripts): Clear script_not_found_warning_printed.
	(auto_load_objfile_script): Record script in hash table.
	(count_matching_scripts): New function.
	(maybe_print_script): Renamed from maybe_print_section_script, all
	callers updated.  Rewrite to use ui_out_*.
	(info_auto_load_scripts): Renamed from
	maintenance_print_section_scripts, all callers updated.
	(gdbpy_initialize_auto_load): "maintenance print section-scripts"
	renamed as "info auto-load-scripts".

	doc/
	* gdb.texinfo (Auto-loading): Document "info auto-load-scripts".

	testsuite/
	* gdb.python/py-objfile-script.exp: New file.
	* gdb.python/py-objfile-script.c: New file.
	* gdb.python/py-objfile-script-gdb.py: New file.
	* testsuite/gdb.python/py-section-script.exp: Test
	"info auto-load-scripts".
2011-05-13 22:11:47 +00:00
Doug Evans cc63ef9bbd fix >80 cols in earlier entry 2011-05-13 22:09:57 +00:00
Doug Evans bbfac39e2a fix >80 column entry in earlier entry 2011-05-13 22:07:56 +00:00
Tom Tromey 9930639c02 gdb
* dwarf2expr.c (read_uleb128): Cast intermediate result.
	(read_sleb128): Likewise.
gdb/testsuite
	* gdb.dwarf2/clztest.exp: New file.
	* gdb.dwarf2/clztest.c: New file.
	* gdb.dwarf2/clztest.S: New file.
2011-05-13 18:54:59 +00:00
Doug Evans 7e0396aae0 * gdb.texinfo (Threads): Clarify default value for libthread-db-search-path. 2011-05-13 18:45:43 +00:00
Tom Tromey 06826322cb * dwarf2loc.c (disassemble_dwarf_expression): Fix instruction
offset display.
2011-05-13 18:42:48 +00:00
Doug Evans 05272e115a * gdb.base/charset.exp: If UTF-16 is not available, skip char16_t, String16 tests. 2011-05-13 18:31:01 +00:00
Doug Evans 01124a23b3 * linux-nat.c (debug_linux_nat_async): Delete.
Replace all references to use debug_linux_nat instead.
	(show_debug_linux_nat_async): Delete.
	(sigchld_handler): Call ui_file_write_async_safe instead of
	fprintf_unfiltered.
	(_initialize_linux_nat): Remove `set debug lin-lwp-async'.
	* ui-file.c (struct ui_file): New member to_write_async_safe.
	(null_file_write_async_safe): New function.
	(ui_file_write_async_safe): New function.
	(set_ui_file_write_async_safe): New function.
	(ui_file_new): Initialize to_write_async_safe.
	(stdio_file_write_async_safe): New function.
	(struct stdio_file): New member fd.
	(stdio_file_new): Initialize to_write_async_safe, fd.
	(stdio_file_read, stdio_file_isatty): New stdio->fd instead of calling fileno.
	* ui-file.h (ui_file_write_async_safe_ftype): New typedef.
	(set_ui_file_write_async_safe): Declare.
	(ui_file_write_async_safe): Declare.

	doc/
	* gdb.texinfo (Completion): Update example.
	(Debugging Output): Delete `set/show debug lin-lwp-async'.
2011-05-13 17:31:07 +00:00
Tom Tromey 6edba76fe8 * lib/gdb.exp (is_x86_like_target): New proc.
* gdb.dwarf2/watch-notconst.exp: Use is_x86_like_target.
	* gdb.dwarf2/valop.exp: Use is_x86_like_target.
	* gdb.dwarf2/typeddwarf.exp: Use is_x86_like_target.  Pass
	-nostdlib to compiler.
	* gdb.dwarf2/typeddwarf.S (_start): Rename from 'main'.
	* gdb.dwarf2/pieces.exp: Use is_x86_like_target.
	* gdb.dwarf2/implptr.exp: Use is_x86_like_target.
	* gdb.dwarf2/dw2-restore.exp: Check for LP64.
	* gdb.dwarf2/callframecfa.exp: Use is_x86_like_target.
2011-05-13 17:17:22 +00:00
Tom Tromey 72fc29ff12 * utils.c (do_value_free): New function.
(make_cleanup_value_free): Likewise.
	* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Handle value
	freeing correctly.
	(dwarf2_loc_desc_needs_frame): Call
	make_cleanup_value_free_to_mark.
	* dwarf2expr.h (struct dwarf_expr_context) <mark>: Remove field.
	* dwarf2expr.c (free_dwarf_expr_context): Don't call
	value_free_to_mark.
	(new_dwarf_expr_context): Don't call value_mark.
	* dwarf2-frame.c (execute_stack_op): Call
	make_cleanup_value_free_to_mark.
	* defs.h (make_cleanup_value_free): Declare.
2011-05-13 15:44:49 +00:00
Thiago Jung Bauermann 028d0ed5d1 gdb/
* mi/mi-main.c (mi_cmd_execute): Use cleanup from
	prepare_execute_command.
	* top.c (prepare_execute_command): Return cleanup.
	(execute_command): Use cleanup from prepare_execute_command.
	* top.h (prepare_execute_command): Change prototype to return
	cleanup.
	* defs.h (struct value): Add opaque declaration.
	(make_cleanup_value_free_to_mark): Add prototype.
	* utils.c (do_value_free_to_mark): New function.
	(make_cleanup_value_free_to_mark): Likewise.

gdb/testsuite/
	* gdb.python/py-function.exp: Test setting a value from a function
	which executes a command.
2011-05-13 04:34:25 +00:00
gdbadmin 69badfdddb *** empty log message *** 2011-05-13 00:00:33 +00:00
Tom Tromey b087e0edae * dwarf2expr.c (execute_stack_op) <DW_OP_shr>: Unconditionally
cast left-hand-side to unsigned.
2011-05-12 19:32:47 +00:00
Tom Tromey 8a9b8146fd gdb
PR gdb/12617:
	* value.h (value_from_contents): Declare.
	* value.c (value_from_contents): New function.
	* dwarf2read.c (dwarf_stack_op_name): Add new values.
	(dwarf2_get_die_type): New function.
	* dwarf2loc.c (dwarf_expr_get_base_type): New function.
	(allocate_piece_closure): Acquire reference to values.
	(read_pieced_value): Update for value-based expressions.
	(write_pieced_value): Likewise.
	(free_pieced_value_closure): Call value_free as needed.
	(dwarf2_evaluate_loc_desc_full): Set get_base_type field.
	Update for value-based expressions.
	* dwarf2loc.h (dwarf2_get_die_type): Declare.
	* dwarf2expr.h (struct dwarf_stack_value) <value>: Change type.
	<get_base_type>: New field.
	(struct dwarf_expr_piece) <v.value>: Change type.
	<v.regno>: New field.
	(struct dwarf_expr_context) <mark>: New field.
	(dwarf_expr_piece, dwarf_expr_fetch): Update.
	(dwarf_expr_pop, dwarf_expr_push): Remove.
	(dwarf_expr_push_address): Declare.
	* dwarf2expr.c (dwarf_arch_cookie): New global.
	(struct dwarf_gdbarch_types): New.
	(dwarf_gdbarch_types_init, dwarf_expr_address_type): New
	functions.
	(dwarf_expr_push): Change type of 'value' argument.  Update.  Now
	static.
	(dwarf_expr_push_address): New function.
	(dwarf_expr_pop): Now static.
	(dwarf_expr_fetch): Change return type.
	(dwarf_require_integral): New function.
	(dwarf_expr_fetch): Simplify.
	(add_piece): Update.
	(base_types_equal_p, dwarf_get_base_type, get_unsigned_type): New
	functions.
	(execute_stack_op) <sign_ext>: Remove.
	Use values for DWARF stack.
	<DW_OP_GNU_const_type, DW_OP_GNU_deref_type,
	DW_OP_GNU_regval_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret>:
	New cases.
	(_initialize_dwarf2expr): New function.
	(add_piece): Update.
	(new_dwarf_expr_context): Set new field.
	(free_dwarf_expr_context): Call value_free_to_mark.
	* dwarf2-frame.c (no_base_type): New function.
	(execute_stack_op): Set get_base_type field.  Update.
gdb/testsuite
	* gdb.dwarf2/typeddwarf.S: New file.
	* gdb.dwarf2/typeddwarf.c: New file.
	* gdb.dwarf2/typeddwarf.exp: New file.
2011-05-12 17:40:55 +00:00
Tom Tromey e8d28ef4f3 * dwarf2read.c (read_common_block): Fix formatting. 2011-05-12 15:59:46 +00:00
Kwok Yeung d248b706a3 Add support for enabling and disabling tracepoints while a trace
experiment is still running.

gdb/
	* breakpoint.c (disable_breakpoint): Disable all locations
	associated with a tracepoint on target if a trace experiment is
	running.
	(disable_command): Disable a specific tracepoint location on target if
	a trace	experiment is running.
	(do_enable_breakpoint): Enable all locations associated with a
	tracepoint on target if a trace experiment is running.
	(enable_command) Enable a specific tracepoint location on target if a
	trace experiment is running.
	* target.c (update_current_target): Add INHERIT and de_fault clauses for
	to_supports_enable_disable_tracepoint, to_enable_tracepoint and
	to_disable_tracepoint.
	* target.h: Add declaration of struct bp_location.
	(struct target_ops): Add new functions
	to_supports_enable_disable_tracepoint, to_enable_tracepoint and
	to_disable_tracepoint to target operations.
	(target_supports_enable_disable_tracepoint): New macro.
	(target_enable_tracepoint): New macro.
	(target_disable_tracepoint): New macro.
	* remote.c (struct remote_state): Add new field.
	(remote_enable_disable_tracepoint_feature): New.
	(remote_protocol_features): Add new entry.
	(remote_supports_enable_disable_tracepoint): New.
	(remote_enable_tracepoint): New.
	(remote_disable_tracepoint): New.
	(init_remote_ops): Add remote_enable_tracepoint,
	remote_disable_tracepoint and remote_supports_enable_disable_tracepoint
	to remote operations.
	* tracepoint.c (start_tracing): Allow tracing to start without any
	tracepoints enabled with just a warning if they can be re-enabled
	later.
	* NEWS: Add news item for the new behaviour of the enable and disable
	GDB commands when applied to tracepoints.
	Add news items for the new remote packets QTEnable and QTDisable.

gdb/doc/
	* gdb.texinfo: Document change in the behaviour of the enable and
	disable GDB commands when applied to tracepoints.
	Document the EnableDisableTracepoints remote stub feature.
	Document QTEnable and QTDisable in the list of tracepoint packets.

gdb/gdbserver/
	* server.c (handle_query): Add EnableDisableTracepoints to the list
	of supported features.
	* tracepoint.c (clear_installed_tracepoints): Uninstall	disabled
	tracepoints.
	(cmd_qtenable_disable): New.
	(cmd_qtstart): Install tracepoints even if disabled.
	(handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
	receiving a QTEnable or QTDisable packet.
	(gdb_collect): Skip data collection if fast tracepoint is disabled.
	(ust_marker_to_static_tracepoint): Do not ignore disabled static
	tracepoints.
	(gdb_probe): Skip data collection if static tracepoint is disabled.
2011-05-12 12:09:17 +00:00
Marek Polacek 10483e8e4e Fix races in gdb.mi/mi-basics.exp 2011-05-12 07:13:23 +00:00
gdbadmin 9e26411c96 *** empty log message *** 2011-05-12 00:00:03 +00:00
Jan Kratochvil cc88a640ca Imported readline 6.2, and upstream patch 001.
[patch 0/3] readline-6.2 rebase
http://sourceware.org/ml/gdb-patches/2011-05/msg00003.html
[patch 1/3] readline-6.2: Merge of already posted patches
http://sourceware.org/ml/gdb-patches/2011-05/msg00004.html
	=
	[Bug-readline] [RFC/readline] bind.c, rl_function_dumper, Free allocated
	http://lists.gnu.org/archive/html/bug-readline/2011-03/msg00000.html
	[Bug-readline] [patch] Fix underquotation in readline/examples/rlfe/conf
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00001.html
	[Bug-readline] [patch] Makefile.in htm<->html
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00002.html
	Re: [Bug-readline] [patch] Makefile.in dependency: callback.o: xmalloc.h
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00004.html
	[Bug-readline] [patch] Remove . from the VPATH directive
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00005.html
	Eli Zaretskii's __MSDOS__ / __GO32__ / __MINGW32__ / __DJGPP__ stuff:
	http://sourceware.org/ml/gdb/2011-04/msg00002.html
	Jan Kratochvil's patch for FSF GDB tree local-specific changes:
	http://sourceware.org/ml/gdb/2011-04/msg00006.html
	Preservation of existing ChangeLog.gdb files, their updates.
[patch 2/3] readline-6.2: Workaround "ask" regression
http://sourceware.org/ml/gdb-patches/2011-05/msg00005.html
[patch 3/3] readline-6.2: Revert 5.x compat., apply 6.x compat.
http://sourceware.org/ml/gdb-patches/2011-05/msg00006.html
[patch 4/3] readline-6.2: Substitute inc-hist.texinfo
http://sourceware.org/ml/gdb-patches/2011-05/msg00010.html

readline/
	Workaround gdb.base/completion.exp regression on readline-6.2.
	* complete.c (get_y_or_n): Disable the return on RL_STATE_CALLBACK.

	Imported readline 6.2, and upstream patch 001.
	* configure: Regenerate.

readline/doc/
	* hsuser.texi (Using History Interactively): Disable !BashFeatures
	@defcodeindex.  Make the `Programming with GNU History' reference
	external.
	* inc-hist.texinfo: Remove.

	Imported readline 6.2, and upstream patch 001.

readline/examples/
	Imported readline 6.2, and upstream patch 001.

readline/examples/rlfe/
	Imported readline 6.2, and upstream patch 001.

gdb/
	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac <--with-system-readline> (for readline_echoing_p):
	Remove the test.
	* tui/tui-io.c (tui_old_readline_echoing_p): Rename to ...
	(tui_old_rl_echoing_p): ... here.
	(tui_setup_io): Rename extern declaration readline_echoing_p to
	_rl_echoing_p.  Adjust assignments for the both renames.

gdb/doc/
	* Makefile.in (GDB_DOC_SOURCE_INCLUDES): Rename inc-hist.texinfo to
	hsuser.texi.
	* gdb.texinfo <!SYSTEM_READLINE>: Rename inc-hist.texinfo inclusion and
	comment to hsuser.texi.  Change rluser.texi name in the comment.
2011-05-11 23:38:44 +00:00
Thiago Jung Bauermann 1f84b6196b * symtab.c (lookup_symtab): Run cleanup before returning. 2011-05-11 18:29:01 +00:00
Tom Tromey 74ac6d431c * dwarf2read.c (handle_data_member_location): New function.
(dwarf2_add_field): Use it.
	(read_common_block): Likewise.
2011-05-11 17:25:41 +00:00
Jan Kratochvil faf067f1a3 gdb/testsuite/
* lib/gdb.exp (gdb_rename_execfile): Remove catch wrappers.
	(gdb_touch_execfile): Remove catch wrappers.  New variable time.
	Replace `file copy' and `file rename' by `file mtime'.  Twice.
2011-05-11 09:11:17 +00:00
Jan Kratochvil 7ff911a38f gdb/testsuite/
* gdb.base/readline-ask.c: New file.
	* gdb.base/readline-ask.exp: New file.
	* gdb.base/readline-ask.inputrc: New file.
2011-05-11 05:01:36 +00:00
Jan Kratochvil 5488dafb5a gdb/
Make addrs->SECTINDEX always defined.
	* symfile.c (relative_addr_info_to_section_offsets): Check for
	SECTINDEX -1, not for zero ADDR.
	(addrs_section_compar): Remove checking for invalid SECTINDEX.
	(addr_info_make_relative): Set SECTINDEX to -1 for unmatched entries.
	* symfile.h (struct section_addr_info) <sectindex>: Update the comment
	on its validity.
2011-05-11 04:56:08 +00:00
gdbadmin fc5303d011 *** empty log message *** 2011-05-11 00:00:32 +00:00
Doug Evans 2471d0083c * linux-thread-db.c: Whitespace cleanup.
(try_thread_db_load_1): Fix comment.
2011-05-10 18:45:22 +00:00
Doug Evans 84e578fbe6 * linux-thread-db.c (set_libthread_db_search_path): New function.
(_initialize_thread_db): Add setter for libthread-db-search-path.

	gdbserver/
	* thread-db.c (thread_db_handle_monitor_command): Handle elided path.

	doc/
	* gdb.texinfo (Threads): If an empty path is provided for
	libthread-db-search-path it is reset to its default value.
	(Server): Ditto.
2011-05-10 16:53:23 +00:00
gdbadmin 6592a5d8f0 *** empty log message *** 2011-05-10 00:00:33 +00:00
Doug Evans 478aac75e4 * NEWS: Mention --with-iconv-bin.
* configure.ac: New option --with-iconv-bin.
	* configure: Regenerate.
	* config.in: Regenerate.
	* defs.h (relocate_gdb_directory): Declare.
	* main.c (relocate_gdb_directory): Renamed from relocate_directory,
	removed progname parameter, and exported.  All callers updated.
	* charset.c (find_charset_names): Use --with-iconv-bin if specified.

	doc/
	* gdb.texinfo (Requirements): Fix typo.  Mention --with-iconv-bin.
2011-05-09 21:49:57 +00:00
Doug Evans 673c2bbeab * linux-nat.c (lin_lwp_attach_lwp): For !WIPSTOPPED case,
adding missing call to restore_child_signals_mask.
2011-05-09 18:43:56 +00:00
Pedro Alves e4c8541fca 2011-05-09 Pedro Alves <pedro@codesourcery.com>
* inferior.h (wait_for_inferior): Remove `thread_exec_as_sigtrap'
	parameter.
	* infrun.c (proceed, start_remote): Adjust.
	(wait_for_inferior): Remove `thread_exec_as_sigtrap' parameter,
	and adjust to not handle it.
	* solib-irix.c (irix_solib_create_inferior_hook): Adjust.
	* solib-osf.c (osf_solib_create_inferior_hook): Adjust.
	* solib-sunos.c (sunos_solib_create_inferior_hook): Adjust.
	* solib-svr4.c (svr4_solib_create_inferior_hook): Adjust.
	* windows-nat.c (do_initial_windows_stuff): Adjust.
	* infcmd.c (attach_command): Adjust.
	(notice_new_inferior): Adjust.
2011-05-09 14:25:37 +00:00
gdbadmin 8393bfa9fe *** empty log message *** 2011-05-09 00:00:02 +00:00
gdbadmin 3050466aa9 *** empty log message *** 2011-05-08 00:00:03 +00:00
gdbadmin 290421cd5b *** empty log message *** 2011-05-07 00:00:33 +00:00
Ulrich Weigand a536c6d7e6 ChangeLog:
* ppc-linux-tdep.c (ppu2spu_prev_register): Handle pseudo registers.
	(ppu2spu_unwind_register): Mark pseudo registers unavailable.
	* spu-tdep.c (op_selb): Use correct value.

testsuite/ChangeLog:

	* gdb.cell/bt.exp: Delete breakpoints before running to signal
	to avoid race condition.
	* gdb.cell/coremaker.c: Use small stack size.
	* gdb.cell/ea-standalone.exp: Use file name without path as
	argument to c_to.
	* gdb.cell/fork.exp: Allow other output when continuing to end.
2011-05-06 20:48:48 +00:00
Ulrich Weigand 7845b0133d * spu-linux-nat.c (spu_symbol_file_add_from_memory): Add NULL
"parent" parameter to symbol_file_add_from_bfd call.
2011-05-06 19:51:12 +00:00
Thiago Jung Bauermann 9c06b0b428 2011-05-06 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	Implement support for PowerPC BookE masked watchpoints.

gdb/
	* NEWS: Mention masked watchpoint support.  Create "Changed commands"
	section.
	* breakpoint.h (struct breakpoint_ops) <works_in_software_mode>: New
	method.  Initialize to NULL in all existing breakpoint_ops instances.
	(struct breakpoint) <hw_wp_mask>: New field.
	* breakpoint.c (is_masked_watchpoint): Add prototype.
	(update_watchpoint): Don't set b->val for masked watchpoints.  Call
	breakpoint's breakpoint_ops.works_in_software_mode if available.
	(watchpoints_triggered): Handle the case of a hardware masked
	watchpoint trigger.
	(watchpoint_check): Likewise.
	(works_in_software_mode_watchpoint): New function.
	(insert_masked_watchpoint, remove_masked_watchpoint)
	(resources_needed_masked_watchpoint)
	(works_in_software_mode_masked_watchpoint, print_it_masked_watchpoint)
	(print_one_detail_masked_watchpoint, print_mention_masked_watchpoint)
	(print_recreate_masked_watchpoint, is_masked_watchpoint): New
	functions.
	(masked_watchpoint_breakpoint_ops): New structure.
	(watch_command_1): Check for the existence of the `mask' parameter.
	Set b->ops according to the type of hardware watchpoint being created.
	* ppc-linux-nat.c (ppc_linux_insert_mask_watchpoint)
	(ppc_linux_remove_mask_watchpoint)
	(ppc_linux_masked_watch_num_registers): New functions.
	(_initialize_ppc_linux_nat): Initialize to_insert_mask_watchpoint,
	to_remove_mask_watchpoint and to_masked_watch_num_registers.
	* target.c (update_current_target): Mention to_insert_mask_watchpoint,
	to_remove_mask_watchpoint, and to_masked_watch_num_registers.
	(target_insert_mask_watchpoint, target_remove_mask_watchpoint)
	(target_masked_watch_num_registers): New functions.
	* target.h (struct target_ops) <to_insert_mask_watchpoint>,
	<to_remove_mask_watchpoint>, <to_masked_watch_num_registers>: New
	methods.
	(target_insert_mask_watchpoint, target_remove_mask_watchpoint)
	(target_masked_watch_num_registers): Add prototypes.

gdb/doc/
	* gdb.texinfo (Set Watchpoints): Document mask parameter.
	(PowerPC Embedded): Mention support of masked watchpoints.
2011-05-06 18:46:33 +00:00
Jan Kratochvil d472a4264b gdb/testsuite/
* gdb.threads/corethreads.c: New file.
	* gdb.threads/corethreads.exp: New file.
2011-05-06 16:03:51 +00:00
Jan Kratochvil 774094b876 gdb/testsuite/
* gdb.threads/gcore-thread.exp (objfile, opts): New variables.
	Try to compile the test using -Wl,-z,norelro first.
	(load_core): New variable libthread_db_seen, initialize it.
	(zeroed-threads cannot be listed): Protect it by XFAIL on
	!$libthread_db_seen.
2011-05-06 16:01:40 +00:00
Jan Kratochvil 8be455d765 gdb/
PR 12573
	* dwarf2read.c (struct dwarf2_cu): New field has_loclist.
	(producer_is_gcc_ge_4_0): New function.
	(process_full_comp_unit): Set also symtab->locations_valid.  Move the
	symtab->language code.
	(var_decode_location): Set cu->has_loclist.
	* symtab.c (skip_prologue_sal): New variables saved_pc, force_skip and
	skip.  Intialize force_skip from locations_valid.  Move the prologue
	skipping code into two passes.
	* symtab.h (struct symtab): Make the primary field a bitfield.  New
	field locations_valid.

gdb/testsuite/
	PR 12573
	* gdb.dwarf2/dw2-skip-prologue.S: New file.
	* gdb.dwarf2/dw2-skip-prologue.c: New file.
	* gdb.dwarf2/dw2-skip-prologue.exp: New file.
2011-05-06 15:06:49 +00:00
Jan Kratochvil d8228535f5 gdb/
* c-exp.y (qualified_name): Call destructor_name_p with $1.type.
	(classify_inner_name): Call cp_lookup_nested_type with
	yylval.tsym.type.
	* cp-namespace.c (cp_lookup_nested_type): New variable
	saved_parent_type.  Call CHECK_TYPEDEF for parent_type.  Call
	type_name_no_tag_or_error with saved_parent_type.
	* dwarf2read.c (load_partial_dies): Read in any children of
	DW_TAG_typedef with complaint in such case.
	* gdbtypes.c (type_name_no_tag_or_error): New function.
	* gdbtypes.h (type_name_no_tag_or_error): New prototype.
	* valops.c (destructor_name_p): New comment for parameter type.  Remove
	type const.  Make dname and cp const.  Call type_name_no_tag_or_error.
	* value.h (destructor_name_p): Remove type const.
2011-05-06 14:12:18 +00:00
Jan Kratochvil 1976171a47 gdb/
* symtab.c (compare_symbol_name): New function.
	(completion_list_add_name, expand_partial_symbol_name): Call it,
	remove the variable ncmp.
	(default_make_symbol_completion_list_break_on): Reduce SYM_TEXT_LEN,
	gdb_assert it.

gdb/testsuite/
	* gdb.cp/psymtab-parameter.cc: New file.
	* gdb.cp/psymtab-parameter.exp: New file.
2011-05-06 13:47:07 +00:00
Jan Kratochvil 7db6f30f9d gdb/testsuite/
Fix a race.
	* gdb.cp/static-print-quit.exp (print c): Split to ...
	(print c - <return>, print c - q <return>, print c - to quit):
	... these.  Make the testfile untested on gdb-7.1.
2011-05-06 13:38:35 +00:00
gdbadmin 7eb9292170 *** empty log message *** 2011-05-06 00:00:03 +00:00
Thiago Jung Bauermann a9634178ec Demote to sw watchpoint only in update_watchpoint.
* breakpoint.c (update_watchpoint): Change between software and
	hardware watchpoint for all kinds of watchpoints, not just
	read/write ones.  Determine b->exact value here instead of
	in watch_command_1.  Error out if there are not enough resources
	for a read or access hardware watchpoint.
	(watch_command_1): Remove logic of checking whether there are
	enough resources available, since update_watchpoint will do that
	work now.  Don't set b->exact here.  Catch exceptions thrown by
	update_watchpoint and delete the watchpoint.
	(can_use_hardware_watchpoint): Remove exact_watchpoints argument.
	Use target_exact_watchpoints instead.
	(delete_breakpoint): Notify observers only if deleted watchpoint
	has a breakpoint number assigned to it.
2011-05-05 22:52:10 +00:00
Janis Johnson 85161e9e44 fix typo 2011-05-05 16:31:05 +00:00
Janis Johnson 56744f0ad5 * lib/gdb.exp (exec_target_file, exec_symbol_file,
gdb_rename_execfile, gdb_touch_execfile): New.
	* gdb.base/reread.exp: Use new procs to handle multiple
	exec files.
2011-05-05 16:29:58 +00:00