Commit Graph

3029 Commits

Author SHA1 Message Date
Pedro Alves 1c5cfe8615 gdb/
*	breakpoint.c (breakpoint_init_inferior): Clean up the moribund
	locations list.
	(moribund_breakpoint_here_p): Record the moribund
	location in the moribund_locations vector.
	* breakpoint.h (moribund_breakpoint_here_p): Declare.
	(displaced_step_fixup): Check if the breakpoint the thread was
	trying to step over has been removed since having been placed in
	the displaced stepping queue.
	(adjust_pc_after_break): In non-stop mode, check for a moribund
	breakpoint at the stop pc.
	(handle_inferior_event): Don't retire moribund breakpoints on
	TARGET_WAITKIND_IGNORE.

gdb/testsuite/
	* gdb.mi/mi-nsmoribund.exp, gdb.mi/nsmoribund.c: New test.
2008-10-15 19:15:34 +00:00
Denis Pilat 41702f1b33 Typo 2008-10-15 13:06:54 +00:00
Denis Pilat 5a98ad698f typo. 2008-10-15 07:55:24 +00:00
Tom Tromey dcb1a1e279 * gdb.base/macscp.exp: Use 'vafunc' and 'fixedarg' rather than
'fprintf' and 'stderr'.
2008-10-09 16:49:47 +00:00
Joel Brobecker 9124fe4822 * gdb.ada/ref_tick_size.exp: New testcase. 2008-10-07 14:10:31 +00:00
Doug Evans 4545259105 * dwarf2read.c (offset_in_cu_p): New function.
(find_partial_die,follow_die_ref): Use it.

	* gdb.dwarf2/dw2-cu-size.exp: New file.
	* gdb.dwarf2/dw2-cu-size.S: New file.

	* gdb.dwarf2/dw2-intercu.S (.Ltype_int_in_cu2): Renamed from
	.Ltype_int for clarity.
2008-10-06 21:54:24 +00:00
Paul Pluzhnikov 4fc5b20858 2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
PR gdb/2384:
	* gdb.cp/gdb2384.exp: Extended to test more cases.
	* gdb.cp/gdb2384.cc: Likewise.
	* gdb.cp/gdb2384-base.h: Likewise.
	* gdb.cp/gdb2384-base.cc: Likewise.
2008-10-03 22:02:20 +00:00
Jan Kratochvil d78df37042 gdb/
Replace TYPE_ARRAY_{UPPER,LOWER}_BOUND_TYPE by a bit if {un,}defined.
	* c-typeprint.c (c_type_print_varspec_suffix), m2-typeprint.c
	(m2_array), p-typeprint.c (pascal_type_print_varspec_prefix),
	valops.c (value_cast), varobj.c (c_number_of_children): Replace
	TYPE_ARRAY_UPPER_BOUND_TYPE compared to BOUND_CANNOT_BE_DETERMINED by
	TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	* parse.c (follow_types): Use TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	* f-valprint.c (f77_get_dynamic_upperbound): Replace with ...
	(f77_get_upperbound): ... this function handling now only
	TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
	(f77_get_dynamic_lowerbound): Replace with ...
	(f77_get_lowerbound): ... this function handling now only
	TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED.
	(f77_get_dynamic_length_of_aggregate, f77_create_arrayprint_offset_tbl):
	Update their callers.
	* eval.c (evaluate_subexp_standard): Update their callers.
	* f-lang.h (f77_get_dynamic_upperbound, f77_get_upperbound)
	(f77_get_dynamic_lowerbound, f77_get_lowerbound): Update their
	prototypes.
	(BOUND_FETCH_OK, BOUND_FETCH_ERROR): Remove.
	* f-typeprint.c (f_type_print_varspec_suffix, f_type_print_base): Remove
	the lower_bound_was_default variable.  Update the
	f77_get_dynamic_upperbound, f77_get_upperbound and
	TYPE_ARRAY_UPPER_BOUND_TYPE calls.
	* gdbtypes.c (print_bound_type): Remove the function.
	(recursive_dump_type): Remove its calls printing UPPER_BOUND_TYPE and
	LOWER_BOUND_TYPE.
	* gdbtypes.h (enum array_bound_type): Remove.
	(struct main_type): Remove the fields upper_bound_type and
	lower_bound_type.  Comment the new overload of the field artificial.
	(TYPE_ARRAY_UPPER_BOUND_TYPE): Replace by ...
	(TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED): ... this macro.
	(TYPE_ARRAY_LOWER_BOUND_TYPE): Replace by ...
	(TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED): ... this macro.

gdb/testsuite/
	* gdb.base/maint.exp (maint print type): Remove printing
	UPPER_BOUND_TYPE and LOWER_BOUND_TYPE.
2008-10-02 22:06:08 +00:00
Tom Tromey 9a044a8903 gdb
PR gdb/2484:
	* symtab.c (struct add_macro_name_data): New struct.
	(add_macro_name): New function.
	(default_make_symbol_completion_list): Complete macro names.
	* scm-lang.c (scm_language_defn): Update.
	* p-lang.c (pascal_language_defn): Update.
	* objc-lang.c (objc_language_defn): Update.
	* macrotab.h (macro_callback_fn): Add user_data argument.
	(macro_for_each): Likewise.
	(macro_for_each_in_scope): Declare.
	* macrotab.c: (struct macro_for_each_data): New struct.
	(foreach_macro): Use it.
	(macro_for_each): Likewise.
	(foreach_macro_in_scope): New function.
	(macro_for_each_in_scope): Likewise.
	* macrocmd.c (print_one_macro): Add argument.
	(macro_list_command): Pass NULL to macro_for_each.
	* m2-lang.c (m2_language_defn): Update.
	* language.h (struct language_defn) <la_macro_expansion>: New
	field.
	(macro_expansion): New enum.
	* language.c (unknown_language_defn): Update.  Fix order of
	initializers.
	(auto_language_defn): Likewise.
	(local_language_defn): Update.
	* jv-lang.c (java_language_defn): Update.
	* f-lang.c (f_language_defn): Update.
	* c-lang.c (c_language_defn): Update.
	(cplus_language_defn): Likewise.
	(asm_language_defn): Likewise.
	(minimal_language_defn): Likewise.
	* ada-lang.c (ada_language_defn): Update.
gdb/testsuite
	* gdb.base/macscp.exp: Add completion tests.
	* gdb.base/macscp1.c (FIFTY_SEVEN): New macro.
	(TWENTY_THREE): Likewise.
	(FORTY_EIGHT): Likewise.
2008-09-30 17:21:28 +00:00
Tom Tromey 506800a969 * gdb.base/macscp.exp: Change "M" to "MACRO_TO_EXPAND"
everywhere.
	* gdb.base/macscp1.c (MACRO_TO_EXPAND): Rename from "M".
2008-09-30 16:53:06 +00:00
Jan Kratochvil 1a6f01b5dc gdb/testsuite/
* gdb.threads/attachstop-mt.exp: Note a real testcase name this
	testcase is derived from.  Fix racy dependency on an expected PID
	number.  No longer support the testcase on Linux kernel 2.4.x.
2008-09-28 11:39:45 +00:00
Tom Tromey 2fae03e85b gdb
* NEWS: Update.
	* macrocmd.c (extract_identifier): Add is_parameter argument.
	(macro_define_command): Update.
	(macro_undef_command): Likewise.
	* macroexp.c (stringify): New function.
	(find_parameter): Likewise.
	(gather_arguments): Add nargs argument.  Handle varargs.
	(substitute_args): Add is_varargs and va_arg_name arguments.
	Handle varargs, splicing, stringification.  Use find_parameter.
	(expand): Handle varargs.
gdb/doc
	* gdb.texinfo (Macros): Remove text about stringification,
	varargs, and splicing.
gdb/testsuite
	* gdb.base/macscp.exp: Add tests for stringification, splicing,
	and varargs.
2008-09-27 21:40:49 +00:00
Pedro Alves 1ad15515cd gdb/
* linux-nat.c (linux_nat_wait): Only use set_ignore_sigint in
	all-stop mode.

gdb/testsuite/
	* lib/mi-support.exp (mi_expect_interrupt): New.
	(mi_reverse_list, mi_check_thread_states): New, moved and renamed
	from gdb.mi/mi-nonstop.exp.
	* gdb.mi/mi-nsintrall.exp, gdb.mi/nsintrall.c: New.
	* gdb.mi/mi-nonstop.exp (myreverse, check_thread_states): Moved to
	lib/mi-support.exp.
	Use mi_check_thread_states throughout.  Avoid ".*" and do not
	require an anchor after -exec-run.
2008-09-22 11:00:41 +00:00
Daniel Jacobowitz d0b76dc6df * gdb.mi/mi-nonstop.exp: Do not check thread state while a
stop is pending.  Avoid ".*" when two stops are pending.
	* lib/gdb.exp (fullname_syntax_POSIX, fullname_syntax_UNC)
	(fullname_syntax_DOS_CASE, fullname_syntax_DOS): Do not match
	newlines in fullnames.
	* lib/mi-support.exp (mi_run_cmd): Do not require an anchor.
	(mi_expect_stop): Update comments.  Only anchor in sync mode.
	Do not match newlines.
	(mi_send_resuming_command_raw): Always return status.
	(mi_get_stop_line): Do not match more than one line by accident.
	Only anchor in sync mode.
	(mi_run_inline_test): If -exec-next fails, give up.
2008-09-13 17:54:06 +00:00
Ulrich Weigand 9990c83091 * gdb.base/stack-checking.c (big_frame): Reduce stack consumption
on SPU.
2008-09-11 16:24:17 +00:00
Joel Brobecker ebcf6f00fc * gdb.ada/Makefile.in (EXECUTABLES): Bring up to date. 2008-09-10 17:24:06 +00:00
Joel Brobecker b6db24e549 * gdb.ada/array_bounds.exp, gdb.ada/array_subscript_addr.exp,
gdb.ada/arrayidx.exp, gdb.ada/arrayparam.exp, gdb.ada/arrayptr.exp,
        gdb.ada/assign_1.exp, gdb.ada/boolean_expr.exp,
        gdb.ada/char_param.exp, gdb.ada/exprs.exp, gdb.ada/fixed_cmp.exp,
        gdb.ada/fixed_points.exp, gdb.ada/fun_addr.exp,
        gdb.ada/funcall_param.exp, gdb.ada/homonym.exp,
        gdb.ada/interface.exp, gdb.ada/null_array.exp,
        gdb.ada/packed_array.exp, gdb.ada/packed_tagged.exp,
        gdb.ada/print_chars.exp, gdb.ada/print_pc.exp,
        gdb.ada/str_ref_cmp.exp, gdb.ada/sym_print_name.exp,
        gdb.ada/taft_type.exp, gdb.ada/tagged.exp, gdb.ada/type_coercion.exp:
        Include the "= " sequence in the expected output of print tests.
2008-09-10 17:11:11 +00:00
Joel Brobecker 2bf448e0dc * gdb.ada/packed_tagged.exp: Accept "boolean" as a valid type
description for boolean types.
2008-09-10 16:35:17 +00:00
Pedro Alves d51fd4c898 gdb/
* infrun.c (normal_stop): Run hook-stop last.

gdb/testsuite/
	* gdb.base/hook-stop-continue.c: New.
	* gdb.base/hook-stop-continue.exp: New.
2008-09-09 18:58:20 +00:00
Daniel Jacobowitz 694182d2ba * valops.c (value_cast_structs): Return NULL for failure.
(value_cast): Handle NULL from value_cast_structs.
	(value_fetch_lazy): Call check_typedef.  Remove unused variable.

	testsuite/
	* gdb.base/structs3.c, gdb.base/structs3.exp: New files.
2008-09-08 22:16:51 +00:00
Jerome Guitton 3b8a7fc087 * gdb.arch/powerpc-aix-prologue.c (stack_check_probe_1)
(stack_check_probe_2, stack_check_probe_loop_1)
	(stack_check_probe_loop_2): New functions.
	(main): Add call to these new functions.
	* gdb.arch/powerpc-aix-prologue.exp: When breaking on these
	functions, check that the breakpoint is inserted at the appropriate
	location.
	(insert_breakpoint): Slightly refine this procedure so that it can
	be called several times in the test.
2008-09-08 16:03:14 +00:00
Jerome Guitton 96cc0ae8e0 * gdb.base/stack-checking.c: New file.
* gdb.base/stack-checking.exp: New file.
2008-09-08 15:54:29 +00:00
Thiago Jung Bauermann 1f08b40933 * gdb.arch/altivec-abi.exp: Remove extra verbose call.
* gdb.arch/altivec-regs.exp: Likewise.
	* gdb.arch/vsx-regs.exp: Likewise.
2008-09-05 19:12:11 +00:00
Thiago Jung Bauermann 3099e1c48a * gdb.arch/ppc-fp.exp: New file.
* gdb.arch/ppc-fp.c: New file.
2008-09-05 19:00:41 +00:00
Paul Pluzhnikov cc69bfc122 compile with gcc -fno-inline, lest gcc-4.3.1 optimizes the whole thing away. 2008-09-05 17:39:00 +00:00
Michael Snyder b02a33db50 2008-09-04 Michael Snyder <msnyder@vmware.com>
* lib/gdb.exp (gdb_continue_to_breakpoint): Accept "in" as well
	as "at" (for non-debug functions such as _start).
2008-09-04 22:00:25 +00:00
Ulrich Weigand 2992cbe020 * gdb.base/value-double-free.exp: Respect gdb,no_hardware_watchpoints.
* gdb.base/watchpoint-solib.exp: Likewise.  Update tests to handle
	software watchpoints.
	* gdb.base/watch_thread_num.exp: Likewise.
2008-09-04 00:51:04 +00:00
Aleksandar Ristovski 514f746bdc * breakpoint.c (breakpoint_init_inferior): Mark as not inserted only
non-permanent breakpoints.
	(bpstat_stop_status): Change enable_state to bp_disabled only for
	non-permanent breakpoints.
	(bp_loc_is_permanent): New function.
	(create_breakpoint): Check if the location points to a permanent
	breakpoint and if it does, make breakpoint permanent.
	(update_breakpoint_locations): Make sure new locations of permanent
	breakpoints are properly initialized.
	* i386-tdep.c (i386_skip_permanent_breakpoint): New function.
	(i386_gdbarch_init): Set gdbarch_skip_permanent_breakpoint.

	* gdb.arch/i386-bp_permanent.exp: New test.
2008-09-03 13:39:56 +00:00
Tom Tromey 876cecd0ee gdb:
* xml-tdesc.c (tdesc_end_union): Update.
	* stabsread.c (define_symbol): Update.
	(read_type): Update.
	(read_struct_type): Update.
	(read_enum_type): Update.
	* spu-tdep.c (spu_builtin_type_vec128): Update.
	* sh-tdep.c (sh_push_dummy_call_fpu): Update.
	(sh_push_dummy_call_nofpu): Update.
	* mdebugread.c (parse_symbol): Update.
	(parse_symbol): Update.
	(parse_symbol): Update.
	(upgrade_type): Update.
	* jv-lang.c (java_lookup_class): Update.
	* iq2000-tdep.c (iq2000_pointer_to_address): Update.
	* i386-tdep.c (i386_mmx_type): Update.
	(i386_sse_type): Update.
	* gdbtypes.h (enum type_flag_value): New enum.
	(enum type_instance_flag_value): New enum.
	(TYPE_FLAG_UNSIGNED, TYPE_FLAG_NOSIGN, TYPE_FLAG_STUB,
	TYPE_FLAG_TARGET_STUB, TYPE_FLAG_STATIC, TYPE_FLAG_PROTOTYPED,
	TYPE_FLAG_INCOMPLETE, TYPE_FLAG_VARARGS, TYPE_FLAG_VECTOR,
	TYPE_FLAG_FIXED_INSTANCE, TYPE_FLAG_STUB_SUPPORTED,
	TYPE_FLAG_NOTTEXT): Now enum constants.
	(TYPE_FLAG_CONST, TYPE_FLAG_VOLATILE, TYPE_FLAG_CODE_SPACE,
	TYPE_FLAG_DATA_SPACE, TYPE_FLAG_ADDRESS_CLASS_1,
	TYPE_FLAG_ADDRESS_CLASS_2): Remove.
	(TYPE_INSTANCE_FLAG_CONST, TYPE_INSTANCE_FLAG_VOLATILE,
	TYPE_INSTANCE_FLAG_CODE_SPACE, TYPE_INSTANCE_FLAG_DATA_SPACE,
	TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1,
	TYPE_INSTANCE_FLAG_ADDRESS_CLASS_2): New constants.
	(TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB, TYPE_TARGET_STUB,
	TYPE_STATIC, TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_VARARGS,
	TYPE_VECTOR, TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED,
	TYPE_NOTTEXT): Update.
	(TYPE_FLAG_ADDRESS_CLASS_ALL): Remove.
	(TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL): New define.
	(TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE,
	TYPE_ADDRESS_CLASS_1, TYPE_ADDRESS_CLASS_2,
	TYPE_ADDRESS_CLASS_ALL): Update.
	(struct main_type) <flags>: Remove.
	<flag_unsigned, flag_nosign, flag_stub, flag_target_stub,
	flag_static, flag_prototyped, flag_incomplete, flag_varargs,
	flag_vector, flag_stub_supported, flag_nottext,
	flag_fixed_instance>: New fields.
	<nfields, vptr_fieldno>: Move earlier.
	(TYPE_FLAGS): Remove.
	* gdbtypes.c (make_pointer_type): Update.
	(address_space_name_to_int): Update.
	(address_space_int_to_name): Update.
	(make_type_with_address_space): Update.
	(make_cv_type): Update.
	(create_range_type): Update.
	(get_discrete_bounds): Update.
	(create_set_type): Update.
	(make_vector_type): Update.
	(smash_to_method_type): Update.
	(check_typedef): Update.
	(check_stub_method): Update.
	(init_type): Individually assign flag fields.
	(recursive_dump_type): Don't print entire TYPE_FLAGS field.  Do
	print TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED, and TYPE_NOTTEXT.
	(copy_type_recursive): Copy the entire main type.  Don't use
	TYPE_FLAGS.
	* features/rs6000/powerpc-altivec64l.c
	(initialize_tdesc_powerpc_altivec64l): Update.
	* features/rs6000/powerpc-altivec64.c
	(initialize_tdesc_powerpc_altivec64): Update.
	* features/rs6000/powerpc-altivec32l.c
	(initialize_tdesc_powerpc_altivec32l): Update.
	* features/rs6000/powerpc-altivec32.c
	(initialize_tdesc_powerpc_altivec32): Update.
	* features/rs6000/powerpc-7400.c (initialize_tdesc_powerpc_7400):
	Update.
	* features/arm-with-iwmmxt.c (initialize_tdesc_arm_with_iwmmxt):
	Update.
	* dwarf2read.c (read_structure_type): Update.
	(read_enumeration_type): Likewise.
	(process_enumeration_scope): Likewise.
	(read_tag_pointer_type): Likewise.
	(read_subroutine_type): Likewise.
	(read_subroutine_type): Likewise.
	(read_base_type): Likewise.
	* coffread.c (coff_read_enum_type): Update.
	* ada-valprint.c (adjust_type_signedness): Update.
	* ada-typeprint.c (print_record_field_types): Update.
	* ada-lang.c (packed_array_type): Update.
	(empty_record): Don't reset TYPE_FLAGS.
	(ada_template_to_fixed_record_type_1): Update.
	(ada_template_to_fixed_record_type_1): Likewise.
	(template_to_static_fixed_type): Likewise.
	(to_record_with_fixed_variant_part): Likewise.
	(to_fixed_record_type): Likewise.
	(to_fixed_array_type): Likewise.
	(to_static_fixed_type): Likewise.
gdb/testsuite:
	* gdb.base/maint.exp: Update "maint print type".
2008-08-24 16:39:57 +00:00
Daniel Jacobowitz 0114d60260 * dwarf2read.c (processing_current_prefix): Delete static
variable.
	(process_full_comp_unit): Do not set processing_current_prefix.
	(dwarf2_full_name): New function.
	(read_func_scope): Do not set processing_current_prefix.  Use
	determine_prefix.
	(read_structure_type): Do not set processing_current_prefix.  Remove
	unused inner cleanup.
	(process_structure_scope): Do not set processing_current_prefix.
	(read_enumeration_type): Use dwarf2_full_name.
	(determine_class_name): Return a const char *.  Put the result
	on the objfile obstack.  Use dwarf2_full_name.
	(read_namespace_type): New function.
	(read_namespace): Do not create the type here.  Use
	determine_prefix.
	(read_typedef): Use dwarf2_full_name.  Do not pass the name
	to init_type.
	(read_base_type): Do not pass the name to init_type.  Handle
	TYPE_FLAG_NOSIGN.
	(read_unspecified_type): Do not pass the name to init_type.
	(new_symbol): Use dwarf2_full_name instead of
	processing_current_prefix.
	(read_type_die): Do not set processing_current_prefix.  Handle
	DW_TAG_namespace.
	(determine_prefix): Handle specifications.  Return the result
	on the objfile obstack.  Handle unions correctly.
2008-08-21 18:57:34 +00:00
Vladimir Prus 80f73d716b * gdb.mi/mi-nonstop.exp: Fix the check for non-stop
support.  Adjust the order of "*running" notifications.
	* gdb.mi/non-stop.c: Don't cast from int to void* and
	back.
2008-08-21 15:09:42 +00:00
Mark Kettenis d9c78d7d2c * gdb.arch/powerpc-prologue.exp: Code doesn't save %r31 so don't
expect to find it in the "info frame" output.
2008-08-21 11:36:38 +00:00
Daniel Jacobowitz 97a2d1d342 * gdb.base/interp.exp: Always consume both prompts. 2008-08-20 18:55:57 +00:00
Pedro Alves b96e292732 gdb/
* linespec.c (symtab_from_filename): Also throw NOT_FOUND_ERROR if
	there are no symbols loaded, instead of throwing a generic error.
	(decode_variable): Likewise.

	gdb/testsuite/
	* gdb.base/pending.exp: Test pending breakpoints without symbols
	loaded.
2008-08-20 11:47:57 +00:00
Vladimir Prus 8cf6e61a08 * lib/mi-support.exp (mi_expect_stop): Produce
more details on failures.
	* gdb.mi/mi-nonstop.exp: New.
	* gdb.mi/non-stop.c: New.
2008-08-19 14:13:29 +00:00
Vladimir Prus c6ebd6cf99 * target.c (target_async_permitted, target_async_permitted_1)
(set_maintenance_target_async_permitted)
        (show_maintenance_target_async_permitted): New.
        (initialize_targets): Register 'set target-async'.
        * target.h (target_async_permitted): Declare.
        * linux-nat.c (linux_nat_async_enabled)
        (linux_nat_async_permitted, set_maintenance_linux_async_permitted)
        (show_maintenance_linux_async_permitted): Remove.
        (sigchld_handler, linux_nat_is_async_p, linux_nat_can_async_p)
        (get_pending_events, linux_nat_async): Use target_async_permitted.
        (linux_nat_set_async_mode): Remove, moving the only used bits
        into...
        (linux_nat_setup_async): This.
        (_initialize_linux_nat): Do not register 'maint set linux-async'.
        Use linux_nat_setup_async.
        * remote.c (remote_async_permitted, remote_async_permitted_set)
        (set_maintenance_remote_async_permitted)
        (show_maintenance_remote_async_permitted): Remove.
        (remote_open_1, remote_terminal_inferior, remote_can_async_p)
        (remote_is_async_p): Use target_async_permitted.
        (_initialize_remote): Don't register 'main set remote-async'.
        * mi/mi-cmds.c (mi_cmds): Register -list-target-features.
        * mi/mi-cmds.h (mi_cmd_list_target_features): New.
        * mi/mi-main.c (mi_cmd_list_target_features): New.
2008-08-19 13:05:02 +00:00
Daniel Jacobowitz 46a9b8ed1b * rs6000-tdep.c (struct rs6000_framedata): Add gpr_mask, used_bl,
lr_register.
	(rs6000_in_function_epilogue_p): Check for bctr.
	(skip_prologue): Initialize lr_register.  Set lr_reg to a register
	number.  Set gpr_mask and used_bl.  Continue scanning while some
	expected registers are not saved.  Set lr_register if LR is not
	stored.
	(rs6000_frame_cache): Handle gpr_mask and lr_register.

	* gdb.arch/powerpc-prologue.exp: Correct saved registers.
2008-08-18 12:32:47 +00:00
Tom Tromey 44feb3ce38 gdb:
PR gdb/1535:
	* breakpoint.c (CATCH_PERMANENT, CATCH_TEMPORARY): New macros.
	(ep_find_event_name_end): Remove.
	(catch_fork_temporary, catch_vfork_temporary,
	catch_fork_permanent, catch_vfork_permanent): New constants.
	(catch_vfork, catch_fork): Remove.
	(catch_fork_command_1): Add 'command' argument.  Remove
	'fork_kind' and 'tempflag'.  Handle NULL 'arg'.  Update switch for
	all cases.
	(catch_exec_command_1): Add 'command' argument; remove
	'tempflag'.  Handle NULL 'arg'.
	(catch_load_command_1): Likewise.
	(catch_unload_command_1): Likewise.
	(catch_ada_exception_command): Likewise.
	(catch_assert_command): Likewise.
	(catch_catch_command): New function.
	(catch_throw_command): Likewise.
	(catch_command_1): Remove.
	(catch_command): Just call error.
	(tcatch_command): Likewise.
	(catch_cmdlist): New global.
	(tcatch_cmdlist): Likewise.
	(add_catch_command): New function.
	(_initialize_breakpoint): Create "catch" and "tcatch" as prefix
	commands.  Create all catch sub-commands.
gdb/testsuite:
	* gdb.base/help.exp (help catch): Rewrite.
2008-08-17 16:58:17 +00:00
Thiago Jung Bauermann 311a4e6b7b gdb/
2008-08-16  Vladimir Prus  <vladimir@codesourcery.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* cli-script.c (read_next_line): Add parse_commands argument.
	(recurse_read_control_structure): Adapt to new read_next_line
	signature.
	(read_command_lines): Add parse_commands argument.
	(define_command): Adapt to new read_command_lines signature.
	(document_command): Likewise.
	* breakpoint.c (commands_command): Likewise.
	* defs.h (read_command_lines): Adjust function prototype.

testsuite/
2008-08-16  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* gdb.base/define.exp: Test indented command documentation.
	* gdb.python/python.exp: Test indented multi-line command.
2008-08-16 20:36:30 +00:00
Luis Machado 604c2f837c * rs6000-tdep: Include "features/rs6000/powerpc-vsx32.c".
Include "features/rs6000/powerpc-vsx64.c".
	(ppc_supply_vsxregset): New function.
	(ppc_collect_vsxregset): New function.
	(IS_VSX_PSEUDOREG): New macro.
	(IS_EFP_PSEUDOREG): New macro.
	(vsx_register_p): New function.
	(ppc_vsx_support_p): New function.
	(rs6000_builtin_type_vec128): New function.
	(rs6000_register_name): Hide upper halves of vs0~vs31.  Return
	correct names for VSX registers and EFPR registers.
	(rs6000_pseudo_register_type): Return correct types for VSX
	and EFPR registers.
	(rs6000_pseudo_register_reggroup_p): Return correct group for
	VSX and EFPR registers.
	(ppc_pseudo_register_read): Rename to dfp_pseudo_register_read.
	(ppc_pseudo_register_write): Rename to dfp_pseudo_register_write.
	(vsx_pseudo_register_read): New function.
	(vsx_pseudo_register_write): New function.
	(efpr_pseudo_register_read): New function.
	(efpr_pseudo_register_write): New function.
	(rs6000_pseudo_register_read): Call new VSX and EFPR read functions.
	(rs6000_pseudo_register_write): Call new VSX and EFPR write functions.
	(rs6000_gdbarch_init): Declare have_vsx.
	Initialize new upper half VSX registers.
	Initialize VSX-related and EFPR-related pseudo-registers variables.
	Adjust the number of pseudo registers accordingly.

	* ppc-linux-nat.c: Define PTRACE_GETVSXREGS, PTRACE_SETVSXREGS
	and SIZEOF_VSRREGS.
	(gdb_vsxregset_t): New type.
	(have_ptrace_getsetvsxregs): New variable.
	(fetch_vsx_register): New function.
	(fetch_register): Handle VSX registers.
	(fetch_vsx_registers): New function.
	(fetch_ppc_registers): Handle VSX registers.
	(store_ppc_registers): Handle VSX registers.
	(store_vsx_register): New function.
	(store_register): Handle VSX registers.
	(store_vsx_registers): New function.
	(ppc_linux_read_description): Handle VSX-enabled inferiors.
	(gdb_vsxregset_t): New type.
	(supply_vsxregset): New function.
	(fill_vsxregset): New function.

	* ppc-tdep.h (vsx_register_p): New prototype.
	(vsx_support_p): New prototype.
	(ppc_vsr0_regnum): New variable.
	(ppc_vsr0_upper_regnum): Likewise.
	(ppc_efpr0_regnum): Likewise.
	(ppc_builtin_type_vec128): New type.
	(ppc_num_vsrs): New constant.
	(ppc_num_vshrs): New constant.
	(ppc_num_efprs): Likewise.
	Define POWERPC_VEC_VSX PPC_VSR0_UPPER_REGNUM and PPC_VSR31_UPPER_REGNUM.
	(ppc_supply_vsxregset): New prototype.
	(ppc_collect_vsxregset): New prototype.

	* ppc-linux-tdep.c: Include "features/rs6000/powerpc-vsx32l.c"
	Include "features/rs6000/powerpc-vsx64l.c".
	(_initialize_ppc_linux_tdep): Initialize VSX-enabled targets.
	(ppc_linux_regset_sections): Add new ".reg-ppc-vsx" field.
	(ppc32_linux_vsxregset): New 32-bit VSX-enabled regset.
	(ppc_linux_regset_from_core_section): Handle VSX core section.
	(ppc_linux_core_read_description): Support VSX-enabled core files.

	* ppc-linux-tdep.h: Declare *tdesc_powerpc_vsx32l
	Declare tdesc_powerpc_vsx64l

	* corelow.c (get_core_register_section): Support VSX-enabled
	core files.

	* features/rs6000/power-vsx.xml: New VSX descriptions.
	* features/rs6000/powerpc-vsx32.xml: New file.
	* features/rs6000/powerpc-vsx32l.xml: New file.
	* features/rs6000/powerpc-vsx64.xml: New file.
	* features/rs6000/powerpc-vsx64l.xml: New file.
	* features/rs6000/powerpc-vsx32.c: New file (generated).
	* features/rs6000/powerpc-vsx32l.c: New file (generated).
	* features/rs6000/powerpc-vsx64.c: New file (generated).
	* features/rs6000/powerpc-vsx64l.c: New file (generated).
	* features/Makefile: Updated with new descriptions.
	* regformats/rs6000/powerpc-vsx32l.dat: New file (generated).
	* regformats/rs6000/powerpc-vsx64l.dat: New file (generated).

	* testsuite/gdb.arch/vsx-regs.c: New source file.
	* testsuite/gdb.arch/vsx-regs.exp: New testcase.
	* testsuite/lib/gdb.exp (skip_vsx_tests): New function.
2008-08-15 15:18:34 +00:00
Tom Tromey 886a217cf4 gdb:
* macrocmd.c (macro_define_command): Check for NULL argument.
	(macro_undef_command): Likewise.
gdb/testsuite:
	* gdb.base/macscp.exp: Add regression test for "macro define" or
	"macro undef" with no arguments.
2008-08-14 18:03:22 +00:00
Paul Pluzhnikov c814a4f300 gdb.base/args.exp: Prevent ~/.gdbinit from affecting test. 2008-08-08 17:17:02 +00:00
Ulrich Weigand 12ab8a602f ChangeLog:
* spu-tdep.c (info_spu_dma_cmdlist): Only show entries with
	the valid bit set.  Ensure display order respects partial
	order defined by dependency bits.

testsuite/ChangeLog:

	* gdb.arch/spu-info.exp: Updated for "info spu dma" changes.
2008-08-07 21:25:28 +00:00
Thiago Jung Bauermann d57a3c85f6 Initial python support.
gdb/
2008-08-06  Vladimir Prus  <vladimir@codesourcery.com>
	    Tom Tromey  <tromey@redhat.com>
	    Thiago Jung Bauermann  <bauerman@br.ibm.com>
	    Doug Evans  <dje@google.com>

	* Makefile.in (SUBDIR_PYTHON_OBS, SUBDIR_PYTHON_SRCS,
	SUBDIR_PYTHON_DEPS, SUBDIR_PYTHON_LDFLAGS, SUBDIR_PYTHON_CFLAGS,
	PYTHON_CFLAGS): New.
	(python_h, python_internal_h): New.
	(cli-script.o): Depend on python.h
	(python.o, python-utils.o): New.
	* cli/cli-script.c (print_command_lines): Handle python_control.
	(execute_control_command): Handle python_control.
	(execute_control_command_untraced): New function.
	(while_command): Call execute_control_command_untraced.
	(if_command): Likewise.
	(get_command_line): Remove static attribute.
	(read_next_line): Handle "python".
	(recurse_read_control_structure): Handle python_control.
	(read_command_lines): Handle python_control.
	Include python.h.
	* cli/cli-script.h (get_command_line): Add prototype.
	(execute_control_command_untraced): Likewise.
	* configure.ac: Add --with-python.
	* defs.h (enum command_control_type) <python_control>: New
	constant.
	* python/python-internal.h: New file.
	* python/python.c: New file.
	* python/python.h: New file.
	* python/python-utils.c: New file.
	* NEWS: Mention Python scripting support and its new commands.

gdb/doc/
2008-08-06  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Extending GDB): New chapter.
	(Sequences): Demoted chapter, now a section under the new
	Extending GDB chapter.
	(Python): New section.

gdb/testsuite/
2008-08-06  Tom Tromey  <tromey@redhat.com>

	* gdb.python/python.exp: New file.
2008-08-06 19:41:33 +00:00
Jan Kratochvil c7b778ff85 Fix for PR gdb/1543.
* gdb.base/sep.exp: `sep-proc.c' absolute line numbers replaced with
	$LOCATION.
	(location): New variable.
	* config/cfdbug.exp, config/d10v.exp, config/dve.exp, config/i960.exp,
	config/m32r.exp, config/mn10300-eval.exp, config/proelf.exp,
	config/rom68k.exp, config/sh.exp, config/unix.exp, config/vr4300.exp,
	config/vr5000.exp, config/vxworks.exp, gdb.arch/altivec-regs.exp,
	gdb.arch/e500-abi.exp, gdb.arch/e500-regs.exp, gdb.asm/asm-source.exp,
	gdb.base/a2-run.exp, gdb.base/advance.exp, gdb.base/all-bin.exp,
	gdb.base/args.exp, gdb.base/arithmet.exp, gdb.base/assign.exp,
	gdb.base/async.exp, gdb.base/auxv.exp, gdb.base/bigcore.c,
	gdb.base/bigcore.exp, gdb.base/bitfields.exp, gdb.base/bitops.exp,
	gdb.base/break.c, gdb.base/break.exp, gdb.base/break1.c,
	gdb.base/call-ar-st.exp, gdb.base/call-rt-st.exp,
	gdb.base/call-strs.exp, gdb.base/callfuncs.c, gdb.base/callfuncs.exp,
	gdb.base/checkpoint.exp, gdb.base/chng-syms.exp,
	gdb.base/code-expr.exp, gdb.base/commands.exp, gdb.base/completion.exp,
	gdb.base/complex.exp, gdb.base/cond-expr.exp, gdb.base/condbreak.exp,
	gdb.base/consecutive.exp, gdb.base/corefile.exp, gdb.base/cvexpr.c,
	gdb.base/cvexpr.exp, gdb.base/dbx.exp, gdb.base/default.exp,
	gdb.base/define.exp, gdb.base/del.c, gdb.base/detach.exp,
	gdb.base/display.exp, gdb.base/dump.exp, gdb.base/echo.exp,
	gdb.base/environ.exp, gdb.base/eval-skip.exp, gdb.base/exprs.exp,
	gdb.base/fileio.exp, gdb.base/find.exp, gdb.base/finish.exp,
	gdb.base/funcargs.exp, gdb.base/gcore-buffer-overflow.exp,
	gdb.base/gcore.exp, gdb.base/gdb1555.exp, gdb.base/gdbvars.exp,
	gdb.base/help.exp, gdb.base/huge.exp, gdb.base/info-proc.exp,
	gdb.base/interrupt.exp, gdb.base/jump.exp, gdb.base/langs.exp,
	gdb.base/lineinc.exp, gdb.base/list.exp, gdb.base/macscp.exp,
	gdb.base/maint.exp, gdb.base/mips_pro.exp, gdb.base/miscexprs.exp,
	gdb.base/nodebug.exp, gdb.base/nofield.c, gdb.base/opaque.exp,
	gdb.base/overlays.exp, gdb.base/page.exp, gdb.base/pc-fp.exp,
	gdb.base/pending.c, gdb.base/pendshr.c, gdb.base/pointers.exp,
	gdb.base/psymtab.exp, gdb.base/ptype.exp, gdb.base/randomize.c,
	gdb.base/readline.exp, gdb.base/recurse.exp, gdb.base/regs.exp,
	gdb.base/relational.exp, gdb.base/relocate.exp, gdb.base/remote.exp,
	gdb.base/reread.exp, gdb.base/return.exp, gdb.base/return2.exp,
	gdb.base/scope.exp, gdb.base/sect-cmd.exp, gdb.base/sep-proc.c,
	gdb.base/sep.c, gdb.base/sep.exp, gdb.base/sepdebug.c,
	gdb.base/sepdebug.exp, gdb.base/setshow.exp, gdb.base/shlib-call.exp,
	gdb.base/sigaltstack.c, gdb.base/so-indr-cl.exp, gdb.base/solib.exp,
	gdb.base/source.exp, gdb.base/start.c, gdb.base/step-bt.c,
	gdb.base/step-line.exp, gdb.base/structs.c, gdb.base/structs.exp,
	gdb.base/structs2.exp, gdb.base/term.exp, gdb.base/twice.exp,
	gdb.base/type-opaque.exp, gdb.base/until.exp,
	gdb.base/value-double-free.c, gdb.base/varargs.exp,
	gdb.base/watchpoint.exp, gdb.base/whatis-exp.exp, gdb.disasm/am33.exp,
	gdb.disasm/h8300s.exp, gdb.disasm/hppa.exp, gdb.disasm/mn10300.exp,
	gdb.disasm/sh3.exp, gdb.disasm/t01_mov.exp, gdb.disasm/t02_mova.exp,
	gdb.disasm/t03_add.exp, gdb.disasm/t04_sub.exp, gdb.disasm/t05_cmp.exp,
	gdb.disasm/t06_ari2.exp, gdb.disasm/t07_ari3.exp,
	gdb.disasm/t08_or.exp, gdb.disasm/t09_xor.exp, gdb.disasm/t10_and.exp,
	gdb.disasm/t11_logs.exp, gdb.disasm/t12_bit.exp,
	gdb.disasm/t13_otr.exp, gdb.fortran/exprs.exp, gdb.fortran/types.exp,
	gdb.hp/gdb.aCC/exception.exp, gdb.hp/gdb.aCC/optimize.exp,
	gdb.hp/gdb.aCC/watch-cmd.exp, gdb.hp/gdb.base-hp/callfwmall.exp,
	gdb.hp/gdb.base-hp/dollar.exp, gdb.hp/gdb.base-hp/hwwatchbus.exp,
	gdb.hp/gdb.base-hp/pxdb.exp, gdb.hp/gdb.base-hp/reg-pa64.exp,
	gdb.hp/gdb.base-hp/reg.exp, gdb.hp/gdb.base-hp/sized-enum.exp,
	gdb.hp/gdb.base-hp/so-thresh.exp, gdb.hp/gdb.compat/xdb1.exp,
	gdb.hp/gdb.compat/xdb2.exp, gdb.hp/gdb.compat/xdb3.exp,
	gdb.java/jmisc.exp, gdb.java/jv-exp.exp, gdb.java/jv-print.exp,
	gdb.mi/gdb669.exp, gdb.mi/gdb680.exp, gdb.mi/gdb701.exp,
	gdb.mi/gdb792.exp, gdb.mi/mi-basics.exp, gdb.mi/mi-console.exp,
	gdb.mi/mi-hack-cli.exp, gdb.mi/mi-pending.c, gdb.mi/mi-pendshr.c,
	gdb.mi/mi-pthreads.exp, gdb.mi/mi-read-memory.exp, gdb.mi/mi-regs.exp,
	gdb.mi/mi-syn-frame.exp, gdb.mi/mi-until.exp, gdb.mi/mi2-basics.exp,
	gdb.mi/mi2-console.exp, gdb.mi/mi2-hack-cli.exp,
	gdb.mi/mi2-pthreads.exp, gdb.mi/mi2-read-memory.exp,
	gdb.mi/mi2-regs.exp, gdb.mi/mi2-syn-frame.exp, gdb.mi/mi2-until.exp,
	gdb.pascal/types.exp, gdb.stabs/weird.exp,
	gdb.threads/gcore-thread.exp, gdb.threads/manythreads.exp,
	gdb.threads/print-threads.exp, gdb.threads/pthreads.exp,
	gdb.threads/schedlock.exp, gdb.threads/step.exp, gdb.threads/step2.exp,
	gdb.threads/switch-threads.exp, gdb.threads/thread-specific.exp,
	gdb.threads/thread_check.exp, gdb.threads/thread_events.exp,
	gdb.threads/tls-nodebug.exp, gdb.threads/tls-shared.exp,
	gdb.threads/tls.exp, gdb.trace/actions.exp, gdb.trace/backtrace.exp,
	gdb.trace/circ.exp, gdb.trace/collection.exp, gdb.trace/deltrace.exp,
	gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
	gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
	gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
	gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp,
	lib/mi-support.exp, lib/trace-support.exp: Remove reference
	to bug-gdb@prep.ai.mit.edu .
2008-08-06 12:52:08 +00:00
Vladimir Prus 5e06a3d1d5 * lib/mi-support.exp (mi_load_shlibs): New.
* gdb.mi/mi-pending.exp: Use mi_load_shlibs, not gdb_load_shlibs.
2008-07-31 07:38:51 +00:00
Vladimir Prus 9d81d21bde * lib/mi-support.exp (get_mi_thread_list)
(check_mi_and_console_threads): New, moved from ...
	* gdb.mi/mi-pthread.exp: ...here.
	* gdb.mi/gdb669.exp (get_mi_thread_list)
	(check_mi_and_console_threads): Delete.
	* gdb.mi/mi2-pthread.exp: Likewise.
2008-07-30 17:08:45 +00:00
Tom Tromey bae98fe013 * Makefile.in (just-check): Remove. Move body to...
(check): ... here.
2008-07-28 20:05:58 +00:00
Daniel Jacobowitz 57380f4e0b * linux-nat.c (resume_callback): Add more debugging output.
(linux_nat_has_pending_sigint): New function, based on
	linux_nat_has_pending.
	(set_ignore_sigint, maybe_clear_ignore_sigint): New functions.
	(stop_wait_callback): Remove flush_mask handling.  Honor
	ignore_sigint.  Call maybe_clear_ignore_sigint.  Pass NULL
	to recursive calls.
	(linux_nat_has_pending, flush_callback): Remove.
	(linux_nat_filter_event): Check for ignore_sigint.
	(linux_nat_wait): Remove flush_mask support and call to
	flush_callback.  Use set_ignore_sigint and maybe_clear_ignore_sigint.
	* linux-nat.h (struct lwp_info): Add ignore_sigint field.

	* gdb.threads/manythreads.exp: Use remote_expect instead of after.
	Add a test for duplicated SIGINTs.
2008-07-27 21:12:40 +00:00
Daniel Jacobowitz e09490f18a * linux-nat.c (count_events_callback, select_event_lwp_callback): Only
report events from resumed threads.

	* gdb.threads/schedlock.exp (get_args): Update to work for any
	value of NUM.
	(Top level): Report the number of threads that did not resume.
2008-07-27 21:05:37 +00:00
Daniel Jacobowitz 6387b45f80 * gdb.dwarf2/dw2-compressed.S: Also define __start. 2008-07-27 21:01:45 +00:00
Daniel Jacobowitz 62f64ff2d6 * lib/mi-support.exp (default_mi_gdb_start): Remove check for
non-MI prompt.
2008-07-27 20:57:43 +00:00
Tom Tromey fa8de41e93 gdb:
PR gdb/1158:
	* valops.c (value_struct_elt): Treat function-valued field as a
	static method.
gdb/testsuite:
	* gdb.base/callfuncs.c (struct struct_with_fnptr): New struct.
	(function_struct, function_struct_ptr): New globals.
	* gdb.base/callfuncs.exp (do_function_calls): Test calling via a
	function pointer in a struct.
2008-07-27 02:00:04 +00:00
Tom Tromey ccb3ac8a12 gdb:
PR gdb/1136:
	* macroexp.c (get_punctuator) <punctuators>: Rearrange to put
	longer tokens first.
gdb/testsuite:
	* gdb.base/macscp.exp: Add test for macro lexing bug.
2008-07-27 01:58:01 +00:00
Tom Tromey d7d9f01ea1 gdb
PR gdb/855:
	* NEWS: Add entry for macro commands.
	* Makefile.in (macrocmd.o): Add gdb_string.h.
	* macroscope.h (user_macro_scope): Declare.
	(default_macro_scope): Update documentation.
	(macro_user_macros): Declare.
	* c-lang.c (c_preprocess_and_parse): Always attempt macro lookup.
	Use user_macro_scope.
	(null_macro_lookup): Remove.
	* macrotab.h (macro_callback_fn): Declare.
	(macro_for_each): Likewise.
	(macro_allow_redefinitions): Likewise.
	* macrotab.c (foreach_macro): New function
	(macro_for_each): Likewise.
	(struct macro_table) <redef_ok>: New field.
	(macro_allow_redefinitions): New function.
	(new_macro_table): Update.
	(macro_define_function): Likewise.
	(macro_define_object): Likewise.
	* macroscope.c (user_macro_scope): New function.
	(default_macro_scope): Use it.
	(macro_user_macros): New global.
	(standard_macro_lookup): Look in macro_user_macros.
	(_initialize_macroscope): New function.
	* macroexp.h (macro_is_whitespace, macro_is_digit,
	macro_is_identifier_nondigit): Declare.
	* macroexp.c (macro_is_whitespace): Rename.  No longer static.
	(macro_is_digit): Likewise.
	(macro_is_identifier_nondigit): Likewise.
	(get_identifier): Update.
	(get_pp_number): Likewise.
	(get_token): Likewise.
	* macrocmd.c (skip_ws): New function.
	(extract_identifier): Likewise.
	(free_macro_definition_ptr): Likewise.
	(user_macros): Remove.
	(macro_define_command): Implement.
	(_initialize_macrocmd): Update.
	(macro_undef_command): Implement.
	(print_one_macro): New function.
	(macro_list_command): Implement.
gdb/doc
	* gdb.texinfo (Macros): Update.  Use @code rather than @command.
gdb/testsuite
	* gdb.base/macscp.exp: Add macro tests.
2008-07-18 20:55:33 +00:00
Paul Pluzhnikov 9bf07184c9 Fix for Linux/VDSO failure. 2008-07-17 20:57:26 +00:00
Paul Pluzhnikov becf64774c Fix for gdb.base/corefile.exp failure on Linux 2008-07-17 19:01:44 +00:00
Paul Pluzhnikov 0709f7d3ac Fix for 'FAIL: gdb.cp/class2.exp: p acp->c2' on spu-elf 2008-07-15 19:15:28 +00:00
Paul Pluzhnikov 7093c834d7 Fix for PR gdb/2477 2008-07-14 18:28:57 +00:00
Jan Kratochvil b432ffe3e2 * gdb.base/randomize.exp: Catch non-Linux targets as untested. 2008-07-13 14:56:02 +00:00
Vladimir Prus b1a268e5b4 * infrun.c (normal_stop): For MI, report which threads
were stopped.
2008-07-12 12:41:56 +00:00
Kevin Buettner e2995f8ea0 * gdb.arch/e500-regs.exp (decimal_vector): Adjust "v8_int8" portion
of regexp to account for changes made to GDB in the printing of
	byte vectors.
2008-07-11 21:57:24 +00:00
Tom Tromey 14032a66f1 gdb
* completer.c (complete_line_internal): New function, from
	complete_line.  Add 'for_help' parameter.
	(complete_line): Use it.
	(command_completer): Move later.  Rewrite.
gdb/testsuite
	* gdb.base/completion.exp: Add 'help' completion test.
2008-07-11 15:07:52 +00:00
Jan Kratochvil 981505ef9a * gdb.base/randomize.exp: Remove dependency on tcl-8.4+. 2008-07-10 20:16:27 +00:00
Jan Kratochvil 10568435e1 gdb/
* NEWS (New commands): Mention "set disable-randomization".
	* configure.ac: Add check for HAVE_PERSONALITY and
	HAVE_DECL_ADDR_NO_RANDOMIZE.
	* configure, config.in: Regenerate.
	* linux-nat.c [HAVE_PERSONALITY]: New include <sys/personality.h>.
	[HAVE_PERSONALITY] [!HAVE_DECL_ADDR_NO_RANDOMIZE]: Set
	ADDR_NO_RANDOMIZE.
	(disable_randomization, show_disable_randomization)
	(set_disable_randomization): New.
	(linux_nat_create_inferior) [HAVE_PERSONALITY]: New variables
	PERSONALITY_ORIG and PERSONALITY_SET.  Disable randomization upon the
	variable DISABLE_RANDOMIZATION.
	(_initialize_linux_nat): Call ADD_SETSHOW_BOOLEAN_CMD for the variable
	DISABLE_RANDOMIZATION.

gdb/doc/
	* gdb.texinfo (Starting): Document "set disable-randomization".

gdb/testsuite/
	* gdb.base/randomize.exp, gdb.base/randomize.c: New files.
2008-07-10 09:31:00 +00:00
Pedro Alves 4487aabf2e gdb/
2008-07-09  Pedro Alves  <pedro@codesourcery.com>

	* symfile.c (load_command): Reopen the exec file and reread
	symbols before anything else.

gdb/testsuite/
2008-07-09  Pedro Alves  <pedro@codesourcery.com>

	* gdb.base/chng-syms.exp: Don't expect "No symbol ...".
2008-07-09 11:16:49 +00:00
Pedro Alves a4a9b1c4f2 * gdb.base/fullname.exp: Restore pwd if compiling failed. 2008-07-09 10:50:52 +00:00
Jan Kratochvil 3c3185ac88 gdb/
* breakpoint.c (bpstat_copy): Call RELEASE_VALUE on the new OLD_VAL.

gdb/testsuite/
	* gdb.base/value-double-free.exp, gdb.base/value-double-free.c: New.
2008-07-07 22:39:59 +00:00
Daniel Jacobowitz ed5e946612 Add missed changelog entry. 2008-07-05 13:48:21 +00:00
Vladimir Prus 7ebd49dca3 * lib/mi-support.exp (mi_send_resuming_command_raw): Revert
previous commit.  Add a comment.
2008-06-28 11:31:02 +00:00
Pedro Alves 84e46146f7 gdb/
2008-06-28  Pedro Alves  <pedro@codesourcery.com>

	* linux-nat.c (enum sigchld_state): New.
	(linux_nat_async_events_state): Renamed from
	linux_nat_async_events_enabled.
	(linux_nat_event_pipe_push, my_waitpid): Adjust.
	(sigchld_default_action): New.
	(lin_lwp_attach_lwp): Adjust.  Call linux_nat_async_events
	unconditionally.
	(linux_nat_create_inferior): Set events state to sigchld_default
	state.
	(linux_nat_resume): Adjust.
	(linux_nat_wait): Call linux_nat_async_events unconditionally.
	(sigchld_handler): Adjust.
	(linux_nat_async_mask): Don't set SIGCHLD actions here.
	(get_pending_events): Adjust.
	(linux_nat_async_events): Rewrite to handle enum sigchld_state
	instead of a boolean.
	(linux_nat_async): Adjust.
	(_initialize_linux_nat): Capture default SIGCHLD action into
	sigchld_default_action.

gdb/testsuite/
2008-06-28  Pedro Alves  <pedro@codesourcery.com>

	* gdb.base/sigchld.c, gdb.base/sigchld.exp: New test.
2008-06-28 11:15:34 +00:00
Vladimir Prus 0f8d4a2f6e * lib/mi-support.exp (mi_send_resuming_command_raw): Report pass. 2008-06-28 10:14:34 +00:00
Vladimir Prus 53c2f6a972 Revert accidental commit 2008-06-28 10:03:42 +00:00
Pedro Alves f747e0ce0a * lib/gdb.exp (gdb_saved_set_unbuffered_mode_obj): New global.
(gdb_compile): If target is *-*-cygwin* or *-*-mingw*, and we're
	compiling an executable, link in an object that forces unbuffered
	output.
	* lib/set_unbuffered_mode.c: New file.
2008-06-27 16:42:19 +00:00
Vladimir Prus d50867903f * target.c (target_read_until_error): New.
* target.h (target_read_until_error): Declare.
        * mi/mi-main.c (mi_cmd_data_read_memory): Use
        target_read_until_error.
2008-06-26 15:10:48 +00:00
Jan Kratochvil 734a5c3612 * lib/gdb.exp (prepare_for_testing): Do not drop the OPTIONS argument. 2008-06-25 15:52:15 +00:00
Daniel Jacobowitz 2c40eaebf8 Revert accidental commit. 2008-06-25 15:21:21 +00:00
Vladimir Prus a2840c3559 Emit ^running via observer.
* mi/mi-interp.c (mi_cmd_interpreter_exec): Do no print
        ^running here.
        (mi_on_resume): Print ^running if not previously output.
        * mi/mi-main.c (running_result_record_printed): New.
        (captured_mi_execute_command): Reset
        running_result_record_printed.  Use running_result_record_printed
        to decide if we should skip ^done.
        (mi_execute_async_cli_command): Don't print ^running here.
        * mi/mi-main.h (current_token, running_result_record_printed):
        Declare.
2008-06-25 14:32:34 +00:00
Daniel Jacobowitz 7413f23fb4 * elf32-arm.c (STUB_ENTRY_NAME): Define.
(arm_thumb_thumb_long_branch_stub): Use bx instead of b.n.
	(arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of
	R_ARM_ABS32.
	(struct elf32_arm_stub_hash_entry): Add output_name.
	(arm_build_one_stub): Move offsets into the offset argument
	of _bfd_final_link_relocate.  Correct offset for
	arm_thumb_arm_v4t_stub_long_branch.
	(elf32_arm_size_stubs): Set stub_entry->output_name.
	(elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym.
	Update all callers.
	(elf32_arm_output_stub_sym): New.
	(arm_map_one_stub): Correct formatting.  Use elf32_arm_output_stub_sym.

	* ld-arm/farcall-arm-arm-be8.d, ld-arm/farcall-arm-arm-pic-veneer.d,
	ld-arm/farcall-arm-arm.d, ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
	ld-arm/farcall-arm-thumb-blx.d, ld-arm/farcall-arm-thumb-pic-veneer.d,
	ld-arm/farcall-arm-thumb.d, ld-arm/farcall-group-size2.d,
	ld-arm/farcall-group.d, ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d,
	ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
	ld-arm/farcall-thumb-arm-blx.d, ld-arm/farcall-thumb-arm.d,
	ld-arm/farcall-thumb-thumb-blx-pic-veneer.d,
	ld-arm/farcall-thumb-thumb-blx.d, ld-arm/farcall-thumb-thumb-m.d,
	ld-arm/thumb2-bl-as-thumb1-bad.d, ld-arm/thumb2-bl-bad.d: Update for
	stub symbols and stub corrections.
2008-06-25 14:28:48 +00:00
Vladimir Prus 6ae37fefeb Robustify mi-simplerun.
* gdb.mi/basics.c (main): Add a call to sleep.
        * gdb.mi/mi-cli.exp: Adjust for change in line numbers.
        * gdb.mi/mi2-cli.exp: Likewise.
        * gdb.mi/mi-break.exp: Likewise.
2008-06-13 19:53:42 +00:00
Vladimir Prus b4aa76f032 Fix date in changelog entry 2008-06-11 13:50:55 +00:00
Vladimir Prus 83408de733 * gdb.mi/mi-break.exp (test_ignore_count): Use mi_expect_stop. 2008-06-11 13:35:58 +00:00
Vladimir Prus e1ac332873 Implement *running.
* Makefile.in: Update dependencies.
        * gdbthread.h (struct thread_info): New field
        running_.
        (set_running, is_running): New.
        * thread.c (set_running, is_running): New.
        * inferior.h (suppress_normal_stop_observer): Rename to...
        (suppress_run_stop_observers): ..this.
        * infcmd.c (suppress_normal_stop_observer): Rename to...
        (suppress_run_stop_observers): ..this.
        (finish_command_continuation, finish_command): Adjust.
        * infcall.c (call_function_by_hand): Adjust.
        * infrun.c (normal_stop): Call set_running.
        * target.c (target_resume): New.  Call set_running.
        * target.h (target_resume): Convert from macro to
        a function.

        * mi/mi-interp.c (mi_on_resume): New.
        (mi_interpreter_init): Register mi_on_resume.
2008-06-10 10:23:54 +00:00
Vladimir Prus f7f9a841a3 Use observers to report stop events in MI.
* mi/mi-interp.c (mi_on_normal_stop): New.
        (mi_interpreter_init): Register mi_on_normal_stop.
        (mi_interpreter_exec_continuation): Remove.
        (mi_cmd_interpreter_exec): Don't register the above.
        * mi/mi-main.c (captured_mi_execute_command): Don't care
        about sync_execution.
        (mi_execute_async_cli_command): Don't install continuation.  Don't
        print *stopped.
        (mi_exec_async_cli_cmd_continuation): Remove.
2008-06-10 09:35:09 +00:00
Tom Tromey 37cd5d19fe gdb
* completer.c (complete_line): Don't special-case
	expression_completer.
	(expression_completer): Only pass last word to
	location_completer.
	* c-exp.y (yylex): Check 'token', not 'operator'.
gdb/testsuite
	* gdb.base/completion.exp: New tests for field name completion
	with spaces, and field name completion with '->'.
2008-06-09 19:25:15 +00:00
Tom Tromey 65d12d83a5 gdb
* value.h (evaluate_subexpression_type, extract_field_op):
	Declare.
	* printcmd.c (_initialize_printcmd): Use expression_completer for
	'p', 'inspect', 'call'.
	* parser-defs.h (parse_field_expression): Declare.
	* parse.c: Include exceptions.h.
	(in_parse_field, expout_last_struct): New globals.
	(mark_struct_expression): New function.
	(prefixify_expression): Return int.
	(prefixify_subexp): Return int.  Use expout_last_struct.
	(parse_exp_1): Update.
	(parse_exp_in_context): Add 'out_subexp' argument.  Handle
	in_parse_field.
	(parse_field_expression): New function.
	* expression.h (parse_field_expression): Declare.
	(in_parse_field): Likewise.
	* eval.c (evaluate_subexpression_type): New function.
	(extract_field_op): Likewise.
	* completer.h (expression_completer): Declare.
	* completer.c (expression_completer): New function.
	(count_struct_fields, add_struct_fields): New functions.
	* c-exp.y (yyparse): Redefine.
	(COMPLETE): New token.
	(exp): New productions.
	(saw_name_at_eof, last_was_structop): New globals.
	(yylex): Return COMPLETE when needed.  Recognize in_parse_field.
	(c_parse): New function.
	* breakpoint.c (_initialize_breakpoint): Use expression_completer
	for watch, awatch, and rwatch.
	* Makefile.in (parse.o): Depend on exceptions_h.
gdb/testsuite
	* gdb.base/break1.c (struct some_struct): New struct.
	(values): New global.
	* gdb.base/completion.exp: Add field name completion test.
gdb/doc
	* gdb.texinfo (Completion): Add field name example.
2008-06-06 20:58:08 +00:00
Paul Pluzhnikov ebfe2e3fb6 2008-06-06 Paul Pluzhnikov <ppluzhnikov@google.com>
* gdb.cp/call-c.exp: Test for incorrect handling of reference
	to pointer.
	* gdb.cp/call-c.cc: Likewise.
2008-06-06 18:29:52 +00:00
Nick Roberts bcf6fc3ae4 *** empty log message *** 2008-06-06 00:41:22 +00:00
Nick Roberts 47741aa56c (thread_switch): Test for thread-changed annotation. 2008-06-06 00:40:21 +00:00
Pedro Alves 49fd4a422b gdb/
* linux-thread-db.c (thread_db_wait): Don't trim event ptid.

testsuite/
	* gdb.threads/execl.c, gdb.threads/execl1.c,
	gdb.threads/execl.exp: New tests.
2008-06-05 21:03:59 +00:00
Aleksandar Ristovski 8a34ac3f58 * gdb.cp/exception.exp: Activate test, make it work with pending
catchpoints.
2008-06-05 18:45:37 +00:00
Jan Kratochvil 86ae69ef81 * dw2-ref-missing-frame.S, dw2-ref-missing-frame.exp: New files. 2008-06-05 18:37:17 +00:00
Vladimir Prus f7f9ae2c16 Refactor varobj_update interface.
* varobj.c (varobj_update): Report changes as vector.  Also
        return not just a list of varobj, but a list of special structures
        that tell what exactly has changed.
        * varobj.h (enum varobj_update_error): Rename to
        varobj_scope_status.
        (struct varobj_update_result_t): New.
        (varobj_update): Adjust prototype.
        * mi/mi-cmd-var.c: Adjust for changes.
2008-05-28 12:06:36 +00:00
Andreas Schwab 2a2d4dc301 * symtab.h (enum address_class): Remove LOC_REGPARM and
LOC_COMPUTED_ARG.
	(struct symbol): Add is_argument.
	(SYMBOL_IS_ARGUMENT): Define.

	* ada-lang.c (ada_add_block_symbols): Use SYMBOL_IS_ARGUMENT.
	* buildsym.c (finish_block): Likewise.
	* stack.c (print_frame_args, print_block_frame_locals)
	(print_frame_arg_vars): Likewise.
	* symtab.c (lookup_block_symbol): Likewise.
	* tracepoint.c (add_local_symbols): Likewise.
	* mi/mi-cmd-stack.c (list_args_or_locals): Likewise.

	* coffread.c (process_coff_symbol): Set SYMBOL_IS_ARGUMENT.
	* dwarf2read.c (new_symbol): Likewise.
	* mdebugread.c (parse_symbol): Likewise.
	* stabsread.c (define_symbol): Likewise.

	* ada-exp.y (select_possible_type_sym): Don't handle LOC_REGPARM
	and LOC_COMPUTED_ARG.
	* ada-lang.c (resolve_subexp, symtab_for_sym): Likewise.
	* ax-gdb.c (gen_var_ref): Likewise.
	* eval.c (evaluate_subexp_for_address): Likewise.
	* findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
	* m2-exp.y (yylex): Likewise.
	* printcmd.c (address_info): Likewise.
	* symmisc.c (print_symbol, print_partial_symbols): Likewise.
	* tracepoint.c (collect_symbol, scope_info): Likewise.

testsuite/:
	* gdb.base/frame-args.exp: Handle arguments that are optimized
	out.
2008-05-27 19:29:52 +00:00
Luis Machado 5099e4d90d * gdb.arch/ppc64-atomic-inst.exp: Make the expected compile failure
quiet for ppc32 and group options into a single variable.
2008-05-26 15:46:55 +00:00
Joel Brobecker d9c36a9152 * gdb.ada/null_array/foo.adb: Add multi-dimensional array
of zero-size elements.
        * gdb.ada/null_array.exp: Test printing this new array.
2008-05-23 18:15:23 +00:00
Jan Kratochvil 103a867135 * gdb.base/longjmp.exp: Fix GDB_TEST_MULTIPLE missing GDB_PROMPT races. 2008-05-22 14:33:12 +00:00
Joel Brobecker 07a4cc1acc Fix the date of the entry that I just added. 2008-05-21 17:58:21 +00:00
Joel Brobecker 5943254b56 * gdb.base/finish.exp: Test that "fin" works as an abbreviation
of the "finish" command.
2008-05-21 17:55:22 +00:00
Nick Roberts 79afeace62 Test for new annotation. 2008-05-20 21:11:04 +00:00