Commit Graph

190 Commits

Author SHA1 Message Date
Tom Tromey f8eba3c616 the "ambiguous linespec" series
gdb
2011-12-06  Joel Brobecker  <brobecker@acacore.com>

        * language.h (struct language_defn): Add new component
        la_symbol_name_compare.
        * symfile.h (struct quick_symbol_functions): Update the profile
        of parameter "name_matcher" for the expand_symtabs_matching
        method.  Update the documentation accordingly.
        * ada-lang.h (ada_name_for_lookup): Add declaration.
        * ada-lang.c (ada_name_for_lookup): New function, extracted out
        from ada_iterate_over_symbols.
        (ada_iterate_over_symbols): Do not encode symbol name anymore.
        (ada_expand_partial_symbol_name): Adjust profile.
        (ada_language_defn): Add value for la_symbol_name_compare field.
        * linespec.c: #include "ada-lang.h".
        (iterate_name_matcher): Add language parameter. Replace call
        to strcmp_iw by call to language->la_symbol_name_compare.
        (decode_variable): Encode COPY if current language is Ada.
        * dwarf2read.c (dw2_expand_symtabs_matching): Adjust profile
        of name_matcher parameter.  Adjust call to name_matcher.
        * psymtab.c (expand_symtabs_matching_via_partial): Likewise.
        (expand_partial_symbol_names): Update profile of parameter "fun".
        * psymtab.h (expand_partial_symbol_names): Update profile of
        parameter "fun".
        * symtab.c (demangle_for_lookup): Update function documentation.
        (search_symbols_name_matches): Add language parameter.
        (expand_partial_symbol_name): Likewise.
        * c-lang.c (c_language_defn, cplus_language_defn)
        (asm_language_defn, minimal_language_defn): Add value for
        la_symbol_name_compare field.
        * d-lang.c (d_language_defn): Likewise.
        * f-lang.c (f_language_defn): Ditto.
        * jv-lang.c (java_language_defn): Ditto.
        * m2-lang.c (m2_language_defn): Ditto.
        * objc-lang.c (objc_language_defn): Ditto.
        * opencl-lang.c (opencl_language_defn): Ditto.
        * p-lang.c (pascal_language_defn): Ditto.
        * language.c (unknown_language_defn, auto_language_defn)
        (local_language_defn): Ditto.

2011-12-06  Tom Tromey  <tromey@redhat.com>

	* linespec.c (iterate_over_all_matching_symtabs): Use
	LA_ITERATE_OVER_SYMBOLS.
	(lookup_prefix_sym, add_matching_symbols_to_info): Likewise.
	(find_function_symbols, decode_variable): Remove Ada special
	case.
	* language.h (struct language_defn) <la_iterate_over_symbols>: New
	field.
	(LA_ITERATE_OVER_SYMBOLS): New macro.
	* language.c (unknown_language_defn, auto_language_defn)
	(local_language_defn): Update.
	* c-lang.c (c_language_defn, cplus_language_defn)
	(asm_language_defn, minimal_language_defn): Update.
	* d-lang.c (d_language_defn): Update.
	* f-lang.c (f_language_defn): Update.
	* jv-lang.c (java_language_defn): Update.
	* m2-lang.c (m2_language_defn): Update.
	* objc-lang.c (objc_language_defn): Update.
	* opencl-lang.c (opencl_language_defn): Update.
	* p-lang.c (pascal_language_defn): Update.
	* ada-lang.c (ada_iterate_over_symbols): New function.
	(ada_language_defn): Update.

2011-12-06  Tom Tromey  <tromey@redhat.com>
	    Joel Brobecker  <brobecker@acacore.com>

	PR breakpoints/13105, PR objc/8341, PR objc/8343, PR objc/8366,
	PR objc/8535, PR breakpoints/11657, PR breakpoints/11970,
	PR breakpoints/12023, PR breakpoints/12334, PR breakpoints/12856,
	PR shlibs/8929, PR shlibs/7393:
	* python/py-type.c (compare_maybe_null_strings): Rename from
	compare_strings.
	(check_types_equal): Update.
	* utils.c (compare_strings): New function.
	* tui/tui-winsource.c (tui_update_breakpoint_info): Update for
	location changes.
	* tracepoint.c (scope_info): Update.
	(trace_find_line_command): Use DECODE_LINE_FUNFIRSTLINE.
	* symtab.h (iterate_over_minimal_symbols)
	(iterate_over_some_symtabs, iterate_over_symtabs)
	(find_pcs_for_symtab_line, iterate_over_symbols)
	(demangle_for_lookup): Declare.
	(expand_line_sal): Remove.
	* symtab.c (iterate_over_some_symtabs, iterate_over_symtabs)
	(lookup_symtab_callback): New functions.
	(lookup_symtab): Rewrite.
	(demangle_for_lookup): New function, extract from
	lookup_symbol_in_language.
	(lookup_symbol_in_language): Use it.
	(iterate_over_symbols): New function.
	(find_line_symtab): Update.
	(find_pcs_for_symtab_line): New functions.
	(find_line_common): Add 'start' argument.
	(decode_line_spec): Update.  Change argument to 'flags', change
	interpretation.
	(append_expanded_sal): Remove.
	(append_exact_match_to_sals): Remove.
	(expand_line_sal): Remove.
	* symfile.h (struct quick_symbol_functions) <lookup_symtab>:
	Remove.
	<map_symtabs_matching_filename>: New field.
	* stack.c (func_command): Only look in the current program space.
	Use DECODE_LINE_FUNFIRSTLINE.
	* source.c (line_info): Set pspace on sal.  Check program space in
	the loop.  Use DECODE_LINE_LIST_MODE.
	(select_source_symtab): Use DECODE_LINE_FUNFIRSTLINE.
	* solib-target.c: Remove DEF_VEC_I(CORE_ADDR).
	* python/python.c (gdbpy_decode_line): Update.
	* psymtab.c (partial_map_expand_apply): New function.
	(partial_map_symtabs_matching_filename): Rename from
	lookup_partial_symbol.  Update arguments.
	(lookup_symtab_via_partial_symtab): Remove.
	(psym_functions): Update.
	* objc-lang.h (parse_selector, parse_method): Don't declare.
	(find_imps): Update.
	* objc-lang.c (parse_selector, parse_method): Now static.
	(find_methods): Change arguments.  Fill in a vector of symbol
	names.
	(uniquify_strings): New function.
	(find_imps): Change arguments.
	* minsyms.c (iterate_over_minimal_symbols): New function.
	* linespec.h (enum decode_line_flags): New.
	(struct linespec_sals): New.
	(struct linespec_result) <canonical>: Remove.
	<pre_expanded, addr_string, sals>: New fields.
	(destroy_linespec_result, make_cleanup_destroy_linespec_result)
	(decode_line_full): Declare.
	(decode_line_1): Update.
	* linespec.c (struct address_entry, struct linespec_state, struct
	collect_info): New types.
	(add_sal_to_sals_basic, add_sal_to_sals, hash_address_entry)
	(eq_address_entry, maybe_add_address): New functions.
	(total_number_of_methods): Remove.
	(iterate_name_matcher, iterate_over_all_matching_symtabs): New
	functions.
	(find_methods): Change arguments.  Don't canonicalize input.
	Simplify logic.
	(add_matching_methods, add_constructors)
	(build_canonical_line_spec): Remove.
	(filter_results, convert_results_to_lsals): New functions.
	(decode_line_2): Change arguments.  Rewrite for new data
	structures.
	(decode_line_internal): Rename from decode_line_1.  Change
	arguments.  Add cleanups.  Update for new data structures.
	(linespec_state_constructor, linespec_state_destructor)
	(decode_line_full, decode_line_1): New functions.
	(decode_indirect): Change arguments.  Update.
	(locate_first_half): Use skip_spaces.
	(decode_objc): Change arguments.  Update for new data structures.
	Simplify logic.
	(decode_compound): Change arguments.  Add cleanups.  Remove
	fallback code, replace with error.
	(struct decode_compound_collector): New type.
	(collect_one_symbol): New function.
	(lookup_prefix_sym): Change arguments.  Update.
	(compare_symbol_name, add_all_symbol_names_from_pspace)
	(find_superclass_methods ): New functions.
	(find_method): Rewrite.
	(struct symtab_collector): New type.
	(add_symtabs_to_list, collect_symtabs_from_filename): New
	functions.
	(symtabs_from_filename): Change API.  Rename from
	symtab_from_filename.
	(collect_function_symbols): New function.
	(find_function_symbols): Change API.  Rename from
	find_function_symbol.  Rewrite.
	(decode_all_digits): Change arguments.  Rewrite.
	(decode_dollar): Change arguments.  Use decode_variable.
	(decode_label): Change arguments.  Rewrite.
	(collect_symbols): New function.
	(minsym_found): Change arguments.  Rewrite.
	(check_minsym, search_minsyms_for_name)
	(add_matching_symbols_to_info): New function.
	(decode_variable): Change arguments.  Iterate over all symbols.
	(symbol_found): Remove.
	(symbol_to_sal): New function.
	(init_linespec_result, destroy_linespec_result)
	(cleanup_linespec_result, make_cleanup_destroy_linespec_result):
	New functions.
	(decode_digits_list_mode, decode_digits_ordinary): New functions.
	* dwarf2read.c (dw2_map_expand_apply): New function.
	(dw2_map_symtabs_matching_filename): Rename from
	dw2_lookup_symtab.  Change arguments.
	(dwarf2_gdb_index_functions): Update.
	* dwarf2loc.c: Remove DEF_VEC_I(CORE_ADDR).
	* defs.h (compare_strings): Declare.
	* cli/cli-cmds.c (compare_strings): Move to utils.c.
	(edit_command, list_command): Use DECODE_LINE_LIST_MODE.  Call
	filter_sals.
	(compare_symtabs, filter_sals): New functions.
	* breakpoint.h (struct bp_location) <line_number, source_file>:
	New fields.
	(struct breakpoint) <line_number, source_file>: Remove.
	<filter>: New field.
	* breakpoint.c (print_breakpoint_location, init_raw_breakpoint)
	(momentary_breakpoint_from_master, add_location_to_breakpoint):
	Update for changes to locations.
	(init_breakpoint_sal): Add 'filter' argument.  Set 'filter' on
	breakpoint.
	(create_breakpoint_sal): Add 'filter' argument.
	(remove_sal, expand_line_sal_maybe): Remove.
	(create_breakpoints_sal): Remove 'sals' argument.  Handle
	pre-expanded sals and the filter.
	(parse_breakpoint_sals): Use decode_line_full.
	(check_fast_tracepoint_sals): Use get_sal_arch.
	(create_breakpoint): Create a linespec_sals.  Update.
	(break_range_command): Use decode_line_full.  Update.
	(until_break_command): Update.
	(clear_command): Update match conditions for linespec.c changes.
	Use DECODE_LINE_LIST_MODE.
	(say_where): Update for changes to locations.
	(bp_location_dtor): Free 'source_file'.
	(base_breakpoint_dtor): Free 'filter'.  Don't free 'source_file'.
	(update_static_tracepoint): Update for changes to locations.
	(update_breakpoint_locations): Disable ranged breakpoint if too
	many locations match.  Update.
	(addr_string_to_sals): Use decode_line_full.  Resolve all sal
	PCs.
	(breakpoint_re_set_default): Don't call expand_line_sal_maybe.
	(decode_line_spec_1): Update.  Change argument name to 'flags',
	change interpretation.
	* block.h (block_containing_function): Declare.
	* block.c (block_containing_function): New function.
	* skip.c (skip_function_command): Update.
	(skip_re_set): Update.
	* infcmd.c (jump_command): Use DECODE_LINE_FUNFIRSTLINE.
	* mi/mi-main.c (mi_cmd_trace_find): Use DECODE_LINE_FUNFIRSTLINE.
	* NEWS: Add entry.

2011-12-06  Tom Tromey  <tromey@redhat.com>

	* elfread.c (elf_gnu_ifunc_resolver_return_stop): Allow
	breakpoint's pspace to be NULL.
	* breakpoint.h (struct breakpoint) <pspace>: Update comment.
	* breakpoint.c (init_raw_breakpoint): Conditionally set
	breakpoint's pspace.
	(init_breakpoint_sal): Don't set breakpoint's pspace.
	(prepare_re_set_context): Conditionally switch program space.
	(addr_string_to_sals): Check executing_startup on location's
	program space.

2011-12-06  Tom Tromey  <tromey@redhat.com>

	* breakpoint.h (enum enable_state) <bp_startup_disabled>: Remove.
	* breakpoint.c (should_be_inserted): Explicitly check if program
	space is executing startup.
	(describe_other_breakpoints): Update.
	(disable_breakpoints_before_startup): Change executing_startup
	earlier.  Remove loop.
	(enable_breakpoints_after_startup): Likewise.
	(init_breakpoint_sal): Don't use bp_startup_disabled.
	(create_breakpoint): Don't use bp_startup_disabled.
	(update_global_location_list): Use should_be_inserted.
	(bkpt_re_set): Update.
gdb/testsuite
2011-12-06  Joel Brobecker  <brobecker@acacore.com>

        * gdb.ada/fullname_bp.exp: Add tests for other valid linespecs
        involving a fully qualified function name.

2011-12-06  Tom Tromey  <tromey@redhat.com>

	* gdb.ada/homonym.exp: Add three breakpoint tests.

2011-12-06  Tom Tromey  <tromey@redhat.com>

	* gdb.base/solib-weak.exp (do_test): Remove kfail.
	* gdb.trace/tracecmd.exp: Disable pending breakpoints earlier.
	* gdb.objc/objcdecode.exp: Update for output changes.
	* gdb.linespec/linespec.exp: New file.
	* gdb.linespec/lspec.cc: New file.
	* gdb.linespec/lspec.h: New file.
	* gdb.linespec/body.h: New file.
	* gdb.linespec/base/two/thefile.cc: New file.
	* gdb.linespec/base/one/thefile.cc: New file.
	* gdb.linespec/Makefile.in: New file.
	* gdb.cp/templates.exp (test_template_breakpoints): Update for
	output changes.
	* gdb.cp/re-set-overloaded.exp: Remove kfail.
	* gdb.cp/ovldbreak.exp: Update for output changes.  "all" test now
	makes one breakpoint.
	* gdb.cp/method2.exp (test_break): Update for output changes.
	* gdb.cp/mb-templates.exp: Update for output changes.
	* gdb.cp/mb-inline.exp: Update for output changes.
	* gdb.cp/mb-ctor.exp: Update for output changes.
	* gdb.cp/ovsrch.exp: Use fully-qualified names.
	* gdb.base/solib-symbol.exp: Run to main later.  Breakpoint now
	has multiple matches.
	* gdb.base/sepdebug.exp: Disable pending breakpoints.  Update for
	error message change.
	* gdb.base/list.exp (test_list_filename_and_number): Update for
	error message change.
	* gdb.base/break.exp: Disable pending breakpoints.  Update for
	output changes.
	* configure.ac: Add gdb.linespec.
	* configure: Rebuild.
	* Makefile.in (ALL_SUBDIRS): Add gdb.linespec.
gdb/doc
2011-12-06  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Set Breaks): Update for new behavior.
2011-12-06 18:54:43 +00:00
Tom Tromey 36dfb11c8b gdb
PR mi/8444:
	* mi/mi-common.h (EXEC_ASYNC_SOLIB_EVENT, EXEC_ASYNC_FORK)
	(EXEC_ASYNC_VFORK, EXEC_ASYNC_SYSCALL_ENTRY)
	(EXEC_ASYNC_SYSCALL_RETURN, EXEC_ASYNC_EXEC): New constants.
	* mi/mi-common.c (async_reason_string_lookup): Add new reasons.
	* breakpoint.c (print_it_catch_fork, print_it_catch_vfork)
	(print_it_catch_syscall, print_it_catch_exec)
	(internal_bkpt_print_it): Use ui_out.  Emit stop reason.
	(bpstat_print): Add 'kind' argument.  Handle
	TARGET_WAITKIND_LOADED.
	* infrun.c (normal_stop): Update for bpstat_print change.  Don't
	handle TARGET_WAITKIND_LOADED here.
	* breakpoint.h (bpstat_print): Update.
gdb/testsuite
	* lib/mi-support.exp (mi_run_cmd_full): Rename from mi_run_cmd.
	Add "use_mi_command" argument.
	(mi_run_cmd, mi_run_with_cli): New procs.
	* gdb.mi/solib-lib.c: New file.
	* gdb.mi/solib-main.c: New file.
	* gdb.mi/mi-solib.exp: New file.
gdb/doc
	* gdb.texinfo (GDB/MI Async Records): Document new *stopped
	reasons.
2011-11-22 21:25:19 +00:00
Stan Shebs f196051f5e * NEWS: Mention tracepoint additions.
* breakpoint.h (struct tracepoint): New field traceframe_usage.
	* breakpoint.c (print_one_breakpoint_location): Identify
	tracepoints as such when reporting hit counts, report
	trace buffer usage.
	(create_tracepoint_from_upload): Copy status info.
	* tracepoint.h (struct trace_status): Rename error_desc to stop_desc,
	add fields user_name, notes, start_time, stop_time.
	(struct uploaded_tp): Add fields hit_count, traceframe_usage.
	* tracepoint.c (trace_user): New global.
	(trace_notes): New global.
	(trace_stop_notes): New global.
	(start_tracing): Add argument and trace note handling.
	(stop_tracing): Ditto.
	(trace_start_command): Add notes argument.
	(trace_stop_command): Ditto.
	(trace_status_command): Report additional status info.
	(trace_status_mi): Similarly.
	(trace_save): Update, record tracepoint status.
	(set_disconnected_tracing): Call target method directly.
	(send_disconnected_tracing_value): Remove.
	(set_trace_user): New function.
	(set_trace_notes): New function.
	(set_trace_stop_notes): New function.
	(parse_trace_status): Handle additional status.
	(parse_tracepoint_status): New function.
	(parse_tracepoint_definition): Call it.
	(tfile_get_tracepoint_status): New function.
	(init_tfile_ops): Use it.
	(_initialize_tracepoint): Add new setshows.
	* target.h (struct target_ops): New methods to_get_tracepoint_status
	and to_set_trace_notes.
	(target_get_tracepoint_status): New macro.
	(target_set_trace_notes): New macro.
	* target.c (update_current_target): Add new methods.
	* remote.c (remote_get_tracepoint_status): New function.
	(remote_set_trace_notes): New function.
	(init_remote_ops): Add them.
	* mi/mi-main.c (mi_cmd_trace_start): Add argument to call.
	(mi_cmd_trace_stop): Ditto.

	* tracepoint.c (struct tracepoint): New field traceframe_usage.
	(tracing_start_time): New global.
	(tracing_stop_time): New global.
	(tracing_user_name): New global.
	(tracing_notes): New global.
	(tracing_stop_note): New global.
	(cmd_qtstart): Set traceframe_usage, start_time.
	(stop_tracing): Set stop_time.
	(cmd_qtstatus): Report additional status.
	(cmd_qtp): New function.
	(handle_tracepoint_query): Call it.
	(cmd_qtnotes): New function.
	(handle_tracepoint_general_set): Call it.
	(get_timestamp): Rename from tsv_get_timestamp.

	* gdb.texinfo (Starting and Stopping Trace Experiments): Document
	note-related options and variables.
	(Tracepoint Packets): Document packet changes.

	* gdb.trace/tstatus.exp: New.
	* gdb.trace/actions.c: Include string.h.
2011-11-20 23:59:49 +00:00
Yao Qi 3ea46bff73 * breakpoint.c (install_breakpoint): Add one more parameter so that
update_global_location_list is called conditionally.
	(create_fork_vfork_event_catchpoint): Update.
	(create_syscall_event_catchpoint): Update.
	(create_breakpoint_sal): Update.
	(create_breakpoint_sal): Update. Call do_cleanups before
	install_breakpoint.
	* ada-lang.c (create_ada_exception_catchpoint): Update.
	* breakpoint.h (install_breakpoint): Update declaration.
2011-11-18 01:03:51 +00:00
Yao Qi 1e4d17643d gdb/
* remote.c (struct remote_state): <install_in_trace> new field.
	(PACKET_InstallInTrace): New enum value.
	(remote_install_in_trace_feature): Support InstallInTrace.
	(remote_supports_install_in_trace): Likewise.
	(remote_protocol_features): Likewise.
	(_initialize_remote): Likewise.
	(remote_can_download_tracepoint): New.
	* target.h (struct target): New field
	`to_can_download_tracepoint'.
	(target_can_download_tracepoint): New macro.
	* target.c (update_current_target): Update.
	* breakpoint.h (struct bp_location): Add comment on field
	`duplicate'.
	(should_be_inserted): Don't differentiate breakpoint and tracepoint.
	(remove_breakpoints): Don't remove tracepoints.
	(tracepoint_locations_match ): New.
	(breakpoint_locations_match): Call it.
	(disable_breakpoints_in_unloaded_shlib): Handle tracepoint.
	(download_tracepoint_locations): New.
	(update_global_location_list): Call it.
	* tracepoint.c (find_matching_tracepoint): Delete.
	(find_matching_tracepoint_location): Renamed from
	find_matching_tracepoint.  Return bp_location rather than
	tracepoint.
	(merge_uploaded_tracepoints): Set `inserted' field to 1 if
	tracepoint is found.

gdb/doc/
	* gdb.texinfo (Create and Delete Tracepoints): Describe changed
	behavior of tracepoint.
	(General Query Packets): New feature InstallInTrace.
	(Remote Configuration): Document "set remote
	install-in-trace-packet".

gdb/gdbserver/
	* server.c (handle_query): Handle InstallInTrace for qSupported.
	* tracepoint.c (add_tracepoint): Sort list.
	(install_tracepoint, download_tracepoint): New.
	(cmd_qtdp): Call them to install and download tracepoints.
	(sort_tracepoints): Removed.
	(cmd_qtstart): Update.

gdb/testsuite/
	* gdb.trace/change-loc-1.c: New.
	* gdb.trace/change-loc-2.c: New.
	* gdb.trace/change-loc.c: New.
	* gdb.trace/change-loc.exp:  New.
	* gdb.trace/change-loc.h:  New.
	* gdb.trace/trace-break.c (marker): Define new symbol.
	* gdb.trace/trace-break.exp (break_trace_same_addr_5):
        New.
	(break_trace_same_addr_6): New.
2011-11-14 15:18:54 +00:00
Justin Lebar 1bfeeb0f75 2011-10-06 Justin Lebar <justin.lebar@gmail.com>
* Makefile.in: (SFILES): Add skip.c.
	(HFILES_NO_SRCDIR): Add skip.h.
	(COMMON_OBS): Add skip.o.
	* skip.h, skip.c: New.
	* breakpoint.h (set_default_breakpoint): Remove.
	(get_sal_arch): Declare.
	* breakpoint.c: Remove default_breakpoint_valid,
	default_breakpoint_address, default_breakpoint_symtab,
	default_breakpoint_line, default_breakpoint_pspace variables.
	(get_sal_arch): Make public.
	(set_default_breakpoint): Remove.
	(parse_breakpoint_sals, create_breakpoint, clear_command,
	decode_line_spec_1): Remove uses of default_breakpoint variables;
	replaced with function calls into stack.c.
	* cli/cli-cmds.h: Add cmd_list_element *skiplist.
	* cli/cli-cmds.c: Add skiplist.
	(init_cmd_lists): Initialize skiplist.
	(init_cli_cmds): Fix comment (classes of commands appear in
	alphabetical order).
	* infrun.c (handle_inferior_event): Add check that we don't step into
	a function whose pc is marked for skip.
	* stack.c: Declare last_displayed_sal_valid, last_displayed_pspace,
	last_displayed_addr, last_displayed_symtab, last_displayed_line
	variables.
	(set_last_displayed_sal): New static function.
	(print_frame_info): Switch call to set_default_breakpoint to call to
	set_last_displayed_sal.
	(clear_last_displayed_sal, last_displayed_sal_is_valid,
	get_last_displayed_pspace, get_last_displayed_addr,
	get_last_displayed_symtab, get_last_displayed_line,
	get_last_displayed_sal): New public functions.
	* stack.h (clear_last_displayed_sal, last_displayed_sal_is_valid,
	get_last_displayed_pspace, get_last_displayed_addr,
	get_last_displayed_symtab, get_last_displayed_line,
	get_last_displayed_sal): Declare.

2011-10-06  Justin Lebar <justin.lebar@gmail.com>

	Add tests for skip command.
	* testsuite/gdb.base/skip-solib-lib.c: New
	* testsuite/gdb.base/skip-solib-main.c: New
	* testsuite/gdb.base/skip-solib.exp: New
	* testsuite/gdb.base/skip.c: New
	* testsuite/gdb.base/skip.exp: New
	* testsuite/gdb.base/skip1.c: New
	* testsuite/gdb.base/Makefile.in: Adding new files.
2011-11-01 14:51:25 +00:00
Gary Benson 0574c78f39 2011-10-12 Gary Benson <gbenson@redhat.com>
* breakpoint.h (pc_at_non_inline_function): Declare.
	* breakpoint.c (is_non_inline_function,
	pc_at_non_inline_function): New functions.
	* infrun.c (handle_inferior_event): Don't call skip_inline_frames
	if the stop is at a location where functions cannot be inlined.
2011-10-12 15:43:49 +00:00
Jan Kratochvil e93ca0199f gdb/
No functionality change.
	* breakpoint.c (bpstat_clear_actions): Remove the BS parameter, make
	function comment a reference, new variables tp and bs, move here code
	from throw_exception.
	* breakpoint.h (bpstat_clear_actions): Remove the BS parameter,
	describe it in the comment.
	* exceptions.c (throw_exception): Remove variable tp, move the code for
	bpstat_clear_actions to bpstat_clear_actions.
2011-08-26 09:28:27 +00:00
Jan Kratochvil abf85f464b gdb/
Code cleanup.
	* breakpoint.c (bpstat_clear_actions): Remove clearing of commands_left.
	(command_line_is_silent): New function.
	(bpstat_do_actions_1): No longer use commands_left, use
	command_line_is_silent for commands.
	(bpstat_alloc): Remove clearing of commands_left.
	(bpstat_stop_status): Remove initialization of commands_left, use
	command_line_is_silent.
	* breakpoint.h (struct bpstats): Remove commands_left.
2011-08-21 14:33:07 +00:00
Tom Tromey c0a91b2b14 * ada-lang.c (ada_exception_breakpoint_ops): Make return type
const.
	(ada_exception_sal): Make 'ops' const.
	(ada_decode_exception_location): Likewise.
	(ada_decode_assert_location): Likewise.
	(catch_assert_command): Update.
	(catch_ada_exception_command): Update.
	(create_ada_exception_catchpoint): Make 'ops' const.
	* breakpoint.c (set_raw_breakpoint_without_location)
	(set_raw_breakpoint, momentary_breakpoint_from_master): Make 'ops'
	const.
	(create_internal_breakpoint): Update.
	(init_raw_breakpoint_without_location): Make 'ops' const.
	(init_raw_breakpoint, init_catchpoint)
	(create_fork_vfork_event_catchpoint)
	(create_syscall_event_catchpoint, init_breakpoint_sal)
	(create_breakpoint_sal, create_breakpoints_sal)
	(create_breakpoint, init_ada_exception_breakpoint): Likewise.
	* breakpoint.h (struct breakpoint) <ops>: Now const.
	(init_ada_exception_breakpoint, create_breakpoint): Make 'ops'
	const.
2011-07-25 15:51:20 +00:00
Pedro Alves d9b3f62eb2 2011-07-25 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.h (print_recreate_thread): Declare.
	(struct breakpoint): Move step_count, pass_count,
	number_on_target, static_trace_marker_id,
	static_trace_marker_id_idx ...
	(struct tracepoint): ... to this new struct.
	(get_tracepoint, get_tracepoint_by_number_on_target)
	(get_tracepoint_by_number): Change return type to struct
	tracepoint pointer.
	* breakpoint.c (is_tracepoint_type): New, factored out from
	is_tracepoint.
	(is_tracepoint): Adjust.
	(print_one_breakpoint_location): Cast to struct tracepoint as
	necessary, and adjust.
	(print_recreate_catch_fork, print_recreate_catch_vfork)
	(print_recreate_catch_syscall, print_recreate_catch_exec): Call
	print_recreate_thread.
	(init_breakpoint_sal): New, factored out from
	create_breakpoint_sal.
	(create_breakpoint_sal): Reimplement.
	(create_breakpoint): Allocate a struct tracecepoint if the caller
	wanted a tracepoint.  Use init_breakpoint_sal and
	install_breakpoint.
	(print_recreate_ranged_breakpoint, print_recreate_watchpoint)
	(print_recreate_masked_watchpoint)
	(print_recreate_exception_catchpoint): Call print_recreate_thread.
	(tracepoint_print_one_detail): Adjust.
	(tracepoint_print_recreate): Adjust.  Call print_recreate_thread.
	Dump the pass count here.
	(update_static_tracepoint): Adjust.
	(addr_string_to_sals): Adjust.
	(create_tracepoint_from_upload): Adjust.  Change return type to
	struct tracepoint pointer.
	(trace_pass_set_count): Change parameter type to struct tracepoint
	pointer, and adjust.
	(trace_pass_command): Adjust.
	(get_tracepoint, get_tracepoint_by_number_on_target)
	(get_tracepoint_by_number): Change return type to struct
	tracepoint pointer, and adjust.
	(print_recreate_thread): New, factored out from save_breakpoints.
	(save_breakpoints): Don't print thread and task and passcount
	recreation here.
	* remote.c (remote_download_tracepoint): Adjust.
	* tracepoint.c (trace_actions_command, validate_actionline)
	(start_tracing, tfind_1, trace_find_tracepoint_command)
	(trace_dump_command): Adjust.
	(find_matching_tracepoint): Change return type to struct
	tracepoint pointer, and adjust.
	(merge_uploaded_tracepoints, tfile_get_traceframe_address)
	(tfile_trace_find, tfile_fetch_registers): Adjust.
	* tracepoint.h (create_tracepoint_from_upload): Change return type
	to struct tracepoint pointer.
	* ada-lang.c (print_recreate_exception): Call
	print_recreate_thread.
	* mi/mi-cmd-break.c (mi_cmd_break_passcount): Adjust.
2011-07-25 11:24:44 +00:00
Pedro Alves 3a5c3e2258 2011-07-25 Pedro Alves <pedro@codesourcery.com>
gdb/
	* breakpoint.h (struct breakpoint): Move ops as first field.  Move
	exp_string, exp_string_reparse, exp, exp_valid_block, cond_exp,
	cond_exp_valid_block, val, val_valid, watchpoint_frame,
	watchpoint_thread, watchpoint_triggered ...
	(struct watchpoint): ... to this new struct.
	(is_watchpoint): Declare.
	(install_breakpoint): Add new `internal' parameter.
	* breakpoint.c (is_watchpoint): Delete declaration.
	(set_breakpoint_condition): Handle watchpoints.
	(is_watchpoint): Make public.
	(watchpoint_in_thread_scope): Change parameter type to struct
	watchpoint.
	(watchpoint_del_at_next_stop): Change parameter type to struct
	watchpoint.  Remove assertion.  Adjust.
	(update_watchpoint): Ditto.
	(insert_breakpoints, breakpoint_init_inferior)
	(watchpoints_triggered, watchpoint_check)
	(bpstat_check_watchpoint, bpstat_check_breakpoint_conditions)
	(bpstat_stop_status, print_one_breakpoint_location)
	(print_one_breakpoint_location, watchpoint_locations_match): Cast
	to struct watchpoint as necessary, and adjust.
	(install_breakpoint): Add `internal' argument.  If true, don't
	mention the new breakpoint.  Use set_breakpoint_number.
	(create_fork_vfork_event_catchpoint)
	(create_syscall_event_catchpoint): Adjust.
	(dtor_watchpoint): New.
	(re_set_watchpoint, insert_watchpoint, remove_watchpoint)
	(breakpoint_hit_watchpoint, resources_needed_watchpoint)
	(print_it_watchpoint, print_mention_watchpoint)
	(print_recreate_watchpoint, insert_masked_watchpoint)
	(remove_masked_watchpoint, resources_needed_masked_watchpoint)
	(print_one_detail_masked_watchpoint)
	(print_mention_masked_watchpoint)
	(print_recreate_masked_watchpoint): Cast to struct watchpoint as
	necessary, and adjust.
	(watch_command_1): Allocate and initialize a struct watchpoint
	instead of a struct breakpoint.  Use install_breakpoint.
	(catch_exec_command_1): Adjust.
	(base_breakpoint_dtor): Delete accesses to watchpoint specific
	fields.
	(delete_breakpoint, enable_breakpoint_disp)
	(invalidate_bp_value_on_memory_change): Cast to struct watchpoint
	as necessary, and adjust.
	(initialize_breakpoint_ops): Install dtor_watchpoint as
	watchpoints' dtor method.
	* ada-lang.c (create_ada_exception_catchpoint): Adjust.
	* python/py-breakpoint.c (bppy_get_expression): Use is_watchpoint.
	to struct watchpoint as necessary, and adjust.
2011-07-25 11:23:03 +00:00
Pedro Alves 2060206eaf 2011-07-25 Pedro Alves <pedro@codesourcery.com>
* ada-lang.c (dtor_exception, re_set_exception): Indirect through
	the the base class ops table.
	(catch_exception_breakpoint_ops)
	(catch_exception_unhandled_breakpoint_ops)
	(catch_assert_breakpoint_ops): Don't statically initialize.
	(initialize_ada_catchpoint_ops): New.
	(_initialize_ada_language): Call it.
	* breakpoint.c (base_breakpoint_ops, bkpt_base_breakpoint_ops)
	(bkpt_breakpoint_ops): Forward declare.
	(catch_fork_breakpoint_ops, catch_vfork_breakpoint_ops)
	(catch_syscall_breakpoint_ops, catch_exec_breakpoint_ops)
	(ranged_breakpoint_ops, watchpoint_breakpoint_ops)
	(masked_watchpoint_breakpoint_ops)
	(gnu_v3_exception_catchpoint_ops): Don't statically initialize.
	(dtor_catch_syscall, dtor_catch_exec): Indirect through the the
	base class ops table.
	(null_re_set, null_check_status, null_works_in_software_mode)
	(null_resources_needed, null_print_one_detail): Delete.
	(bkpt_dtor): Rename to ...
	(base_breakpoint_dtor): ... this.  Make static.
	(bkpt_allocate_location): Rename to ...
	(base_breakpoint_allocate_location): ... this.  Make static.
	(base_breakpoint_re_set): New.
	(internal_error_pure_virtual_called): New.
	(base_breakpoint_insert_location, base_breakpoint_remove_location)
	(base_breakpoint_breakpoint_hit, base_breakpoint_check_status)
	(base_breakpoint_works_in_software_mode)
	(base_breakpoint_resources_needed, base_breakpoint_print_it)
	(base_breakpoint_print_one_detail, base_breakpoint_print_mention)
	(base_breakpoint_print_recreate): New functions.
	(base_breakpoint_ops): New global.
	(bkpt_re_set, bkpt_insert_location, bkpt_remove_location)
	(bkpt_breakpoint_hit): Make static.
	(bkpt_check_status): Delete.
	(bkpt_resources_needed): Make static.
	(bkpt_works_in_software_mode): Delete.
	(bkpt_print_it, bkpt_print_mention, bkpt_print_recreate): Make
	static.
	(bkpt_breakpoint_ops, internal_breakpoint_ops)
	(momentary_breakpoint_ops): Don't statically initialize.
	(internal_bkpt_print_recreate, momentary_bkpt_print_recreate):
	Delete.
	(tracepoint_insert_location, tracepoint_remove_location)
	(tracepoint_check_status, tracepoint_works_in_software_mode)
	(tracepoint_print_it): Delete.
	(tracepoint_breakpoint_ops): Don't statically initialize.
	(initialize_breakpoint_ops): New.
	(_initialize_breakpoint): Call it.
	* breakpoint.h (null_re_set, null_works_in_software_mode)
	(null_resources_needed, null_check_status, null_print_one_detail):
	(bkpt_dtor, bkpt_allocate_location, bkpt_re_set)
	(bkpt_insert_location, bkpt_remove_location, bkpt_breakpoint_hit)
	(bkpt_check_status, bkpt_resources_needed)
	(bkpt_works_in_software_mode, bkpt_print_it)
	(null_print_one_detail, bkpt_print_mention, bkpt_print_recreate):
	Delete declarations.
	(initialize_breakpoint_ops): Declare.
2011-07-25 11:21:08 +00:00
Pedro Alves 348d480fa9 2011-07-25 Pedro Alves <pedro@codesourcery.com>
Implement most breakpoint_ops methods for all breakpoint types,
	and move the default handlings to the proper callbacks.

	gdb/
	* breakpoint.c (update_watchpoint): Always call the breakpoint's
	works_in_software_mode method.
	(insert_bp_location): Go through breakpoint_ops->insert_location
	for software and hardware watchpoints.
	(create_internal_breakpoint): Pass bkpt_breakpoint_ops as
	breakpoint_ops.
	(remove_breakpoint_1): Go through breakpoint_ops->remove_location
	for software and hardware watchpoints.
	(print_it_typical): Delete.
	(print_bp_stop_message): Always call the breakpoint_ops->print_it
	method.
	(watchpoint_check): Adjust comment.
	(bpstat_check_location): Simply always call the breakpoint's
	breakpoint_hit method.
	(bpstat_stop_status): Always call the breakpoint's check_status
	method.  Remove special cases for watchpoints and internal event
	breakpoints from here (moved to the check_status implementations).
	(print_one_breakpoint_location): Assume b->ops is never NULL.
	Remove static tracepoint marker id printing from here (moved to
	the print_one_detail callback implementation of tracepoints).
	(init_bp_location): Assert OPS is never NULL.
	(allocate_bp_location): Always call the breakpoint's
	allocate_location method, and remove the default code from here.
	(free_bp_location): Always call the location's dtor method, and
	remove the default code from here.
	(init_raw_breakpoint_without_location): Assert OPS is never NULL.
	(set_raw_breakpoint_without_location): Add new breakpoint_ops
	parameter.  Pass it down.
	(set_raw_breakpoint): Ditto.
	(print_it_catch_fork): Adjust to take a bpstat as argument.
	(catch_fork_breakpoint_ops): Install methods.
	(print_it_catch_vfork): Adjust to take a bpstat as argument.
	(catch_vfork_breakpoint_ops): Install methods.
	(dtor_catch_syscall): Call the base dtor.
	(print_it_catch_syscall): Adjust to take a bpstat as argument.
	(catch_syscall_breakpoint_ops): Install methods.
	(dtor_catch_exec): Call the base dtor.
	(print_it_catch_exec): Adjust to take a bpstat as argument.
	(catch_exec_breakpoint_ops): Install methods.
	(hw_breakpoint_used_count, hw_watchpoint_used_count): Always call
	the breakpoint's resources_needed method, and remove the default
	code from here.
	(set_momentary_breakpoint): Pass bkpt_breakpoint_ops as
	breakpoint_ops.
	(clone_momentary_breakpoint): Clone the original's ops.
	(mention): Always call the breakpoint's print_mention method, and
	remove the default code from here.
	(create_breakpoint_sal): Adjust to pass the ops to
	set_raw_breakpoint rather than setting it manually.
	(create_breakpoint): Assert ops is never NULL.  Adjust to pass the
	ops to set_raw_breakpoint_without_location rather than setting it
	manually.
	(break_command_1): Pass bkpt_breakpoint_ops as breakpoint_ops.
	(print_it_ranged_breakpoint): Adjust to take a bpstat as argument.
	(ranged_breakpoint_ops): Install methods.
	(break_range_command): Adjust to pass the ops to
	set_raw_breakpoint rather than setting it manually.
	(re_set_watchpoint, breakpoint_hit_watchpoint)
	(check_status_watchpoint, resources_needed_watchpoint)
	(works_in_software_mode_watchpoint, print_it_watchpoint)
	(print_mention_watchpoint, print_recreate_watchpoint): New
	functions.
	(watchpoint_breakpoint_ops): Install new methods.
	(print_it_masked_watchpoint): New function.
	(masked_watchpoint_breakpoint_ops): Install new methods.
	(watch_command_1): Adjust to pass the right breakpoint_ops to
	set_raw_breakpoint_without_location rather than setting it
	manually later.  Record the current pspace.
	(print_it_exception_catchpoint): Adjust to take a bpstat as
	argument.
	(gnu_v3_exception_catchpoint_ops): Install new methods.
	(say_where): New function.
	(null_re_set, null_check_status, null_works_in_software_mode)
	(null_resources_needed, null_print_one_detail, bp_location_dtor):
	New functions.
	(bp_location_ops): New global.
	(bkpt_dtor, bkpt_allocate_location, bkpt_re_set)
	(bkpt_insert_location, bkpt_remove_location, bkpt_breakpoint_hit)
	(bkpt_check_status, bkpt_resources_needed)
	(bkpt_works_in_software_mode, bkpt_print_it, bkpt_print_mention)
	(bkpt_print_recreate): New functions.
	(bkpt_breakpoint_ops): New global.
	(tracepoint_re_set, tracepoint_insert_location)
	(tracepoint_remove_location, tracepoint_breakpoint_hit)
	(tracepoint_check_status, tracepoint_works_in_software_mode)
	(tracepoint_print_it, tracepoint_print_one_detail)
	(tracepoint_print_mention, tracepoint_print_recreate): New
	functions.
	(tracepoint_breakpoint_ops): New global.
	(delete_breakpoint): Always call the breakpoint's dtor method, and
	remove the default handling from here.
	(breakpoint_re_set_default): Make static.
	(breakpoint_re_set_one): Always call the breakpoints re_set
	method, and remove the default handling from here.
	(trace_command, ftrace_command, strace_command)
	(create_tracepoint_from_upload): Pass appropriate breakpoints_ops
	to create_breakpoint.
	(save_breakpoints): Always call the breakpoint's print_recreate
	method, and remove the default handling from here.

	* ada-lang.c (dtor_exception): Call the base dtor.
	(re_set_exception): Call the base method.
	(print_it_exception, print_it_catch_exception): Adjust to take a
	bpstat as argument.
	(catch_exception_breakpoint_ops): Install methods.
	(print_it_catch_exception_unhandled): Adjust to take a bpstat as
	argument.
	(catch_exception_unhandled_breakpoint_ops): Install methods.
	(print_it_catch_assert): Adjust to take a bpstat as argument.
	(catch_assert_breakpoint_ops): Install methods.

	* breakpoint.h (struct breakpoint_ops): Adjust the print_it method
	to take a bpstat as argument.
	(enum print_stop_action): Add describing comments to each enum
	value.
	(breakpoint_re_set_default): Delete declaration.
	(null_re_set, null_works_in_software_mode, null_resources_needed)
	(null_check_status, null_print_one_detail): Declare.
	(bkpt_breakpoint_ops): Declare.
	(bkpt_dtor, bkpt_allocate_location, bkpt_re_set)
	(bkpt_insert_location, bkpt_remove_location, bkpt_breakpoint_hit)
	(bkpt_check_status, bkpt_resources_needed)
	(bkpt_works_in_software_mode, bkpt_print_it)
	(null_print_one_detail, bkpt_print_mention, bkpt_print_recreate):
	Declare.

	* mi/mi-cmd-break.c (mi_cmd_break_insert): Adjust to pass
	bkpt_breakpoint_ops.
	* python/py-breakpoint.c (bppy_init): Ditto.
2011-07-25 11:16:49 +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 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
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
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 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
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
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
Joel Brobecker 956a9fb9fb improve Ada exception catchpoint MI notification
This rewrites the code generating the Ada exception catchpoint hit
notification for both the GDB/MI case as well as the non-MI case,
by using the relevant ui_out_* functions to generate the output.
the MI notifications for Ada exception catchpoints now include
the stop reason, and the breakpoint "disp", much like other breakpoint
events do.  It also introduces a new field "exception-name" for
exception catchpoints (excluding "failed assertion catchpoints,
where we just want to know that it was a failed assertion).

gdb/ChangeLog:

        * breakpoint.h (bpdisp_text): Add declaration.
        * breakpoint.c (bpdisp_text): Make non-static.
        * ada-lang.c: #include "mi/mi-common.h".
        (print_it_exception): Rewrite to improve GDB/MI output.

gdb/doc/ChangeLog:

        * gdb.texinfo (GDB/MI Ada Exception Information): Document
        the "exception-name" field in the *stopped async record.

gdb/testsuite/ChangeLog:

        * gdb.ada/mi_catch_ex: New testcase.
2011-04-01 16:59:58 +00:00
Thiago Jung Bauermann f13101077f 2011-03-31 Thiago Jung Bauermann <bauerman@br.ibm.com>
Sergio Durigan Junior  <sergiodj@linux.vnet.ibm.com>

	Implement support for PowerPC BookE ranged breakpoints.

gdb/
	* NEWS: Mention support for ranged breakpoints on embedded PowerPC.
	* breakpoint.h (struct bp_target_info) <length>: New member
	variable.
	(struct breakpoint_ops) <breakpoint_hit>: Take struct bp_location
	instead of struct breakpoint as argument, and also add ASPACE
	and BP_ADDR arguments.  Update all callers.
	(struct breakpoint_ops) <print_one_detail>: New method.
	(struct breakpoint) <addr_string_range_end>: New member variable.
	* breakpoint.c (breakpoint_location_address_match): Add function
	prototype.
	(insert_bp_location): Set bl->target_info.length.
	(breakpoint_here_p): Call breakpoint_location_address_match.
	(moribund_breakpoint_here_p): Likewise.
	(regular_breakpoint_inserted_here_p): Likewise.
	(breakpoint_thread_match): Likewise.
	(bpstat_stop_status): Likewise.
	(bpstat_check_location): Move call to
	breakpoint_ops.breakpoint_hit to the top.
	(print_one_breakpoint_location): Call
	breakpoint_ops.print_one_detail if available.
	(breakpoint_address_match_range): New function.
	(breakpoint_location_address_match): Likewise.
	(breakpoint_locations_match): Compare the length field of the
	locations too.
	(hw_breakpoint_used_count): Count resources used by all locations
	in a breakpoint, and use breakpoint_ops.resources_needed if
	available.
	(breakpoint_hit_ranged_breakpoint): New function.
	(resources_needed_ranged_breakpoint): Likewise.
	(print_it_ranged_breakpoint): Likewise.
	(print_one_ranged_breakpoint): Likewise.
	(print_one_detail_ranged_breakpoint): Likewise.
	(print_mention_ranged_breakpoint): Likewise.
	(print_recreate_ranged_breakpoint): Likewise.
	(ranged_breakpoint_ops): New structure.
	(find_breakpoint_range_end): New function.
	(break_range_command): Likewise.
	(delete_breakpoint): Free addr_string_range_end.
	(update_breakpoint_locations): Add SALS_END argument.  Update
	all callers.  Calculate breakpoint length if a non-zero SALS_END
	is given.  Call breakpoint_locations_match instead of
	breakpoint_address_match.
	(reset_breakpoint): Find SaL of the end of the range if B is a
	ranged breakpoint.
	(_initialize_breakpoint): Register break-range command.
	* defs.h (print_core_address): Add function prototype.
	* ppc-linux-nat.c (ppc_linux_ranged_break_num_registers): New
	function.
	(ppc_linux_insert_hw_breakpoint): Support ranged breakpoints.
	(ppc_linux_remove_hw_breakpoint): Likewise.
	(_initialize_ppc_linux_nat): Initialize
	to_ranged_break_num_registers.
	* target.c (update_current_target): Add comment about
	to_ranged_break_num_registers.
	(target_ranged_break_num_registers): New function.
	* target.h (struct target_ops) <to_ranged_break_num_registers>:
	New method.
	(target_ranged_break_num_registers): Add function prototype.
	* ui-out.c (ui_out_field_core_addr): Move address-printing logic to ...
	* utils.c (print_core_address): ... here.

gdb/doc/
	* gdb.texinfo (PowerPC Embedded): Document ranged breakpoints.
2011-03-31 14:32:49 +00:00
Jan Kratochvil 0e30163f12 gdb/
Support resolution of STT_GNU_IFUNC via breakpoints.
	* breakpoint.c (print_it_typical): Support bp_gnu_ifunc_resolver and
	bp_gnu_ifunc_resolver_return.
	(bpstat_what): Rename parameter to bs_head, new variable bs, adjust
	the loop.  Support bp_gnu_ifunc_resolver and
	bp_gnu_ifunc_resolver_return.  New comment after the loop.  New loop
	for bp_gnu_ifunc_resolver and bp_gnu_ifunc_resolver_return
	breakpoints.
	(bptype_string, print_one_breakpoint_location): Support
	bp_gnu_ifunc_resolver and bp_gnu_ifunc_resolver_return.
	(user_settable_breakpoint): Return true also for
	bp_gnu_ifunc_resolver.
	(allocate_bp_location): Support bp_gnu_ifunc_resolver and
	bp_gnu_ifunc_resolver_return.
	(set_breakpoint_location_function): New parameter explicit_loc,
	describe it.  Call find_pc_partial_function_gnu_ifunc with new
	variable IS_GNU_IFUNC and adjust the address for STT_GNU_IFUNC if
	EXPLICIT_LOC is not set.
	(set_raw_breakpoint): Set EXPLICIT_LOC for
	set_breakpoint_location_function.
	(clone_momentary_breakpoint): Use true for EXPLICIT_LOC of
	set_breakpoint_location_function.
	(mention): Support bp_gnu_ifunc_resolver and
	bp_gnu_ifunc_resolver_return.
	(add_location_to_breakpoint): Set EXPLICIT_LOC for
	set_breakpoint_location_function.
	(update_breakpoint_locations): Remove static.
	(breakpoint_re_set_one): Support bp_gnu_ifunc_resolver and
	bp_gnu_ifunc_resolver_return.
	* breakpoint.h (enum bptype): New fields bp_gnu_ifunc_resolver and
	bp_gnu_ifunc_resolver_return.
	(update_breakpoint_locations): New declaration.
	* elfread.c: Include gdbthread.h and regcache.h.
	(elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop): New
	functions.
	(elf_gnu_ifunc_fns): Install them.
	* minsyms.c (stub_gnu_ifunc_resolver_stop)
	(stub_gnu_ifunc_resolver_return_stop): New functions.
	(stub_gnu_ifunc_fns): Install them.
	* symtab.h (struct gnu_ifunc_fns): New fields gnu_ifunc_resolver_stop
	and gnu_ifunc_resolver_return_stop.
	(gnu_ifunc_resolver_stop, gnu_ifunc_resolver_return_stop): New.
2011-03-28 20:29:51 +00:00
Tom Tromey 56435ebec8 * linespec.h (struct linespec_result) <special_display>: New
field.
	* breakpoint.h (struct breakpoint) <display_canonical>: New
	field.
	* breakpoint.c (print_breakpoint_location): Respect
	display_canonical.
	(create_breakpoint_sal): Add 'display_canonical' parameter.
	(create_breakpoints_sal): Update.
	(create_breakpoint): Update.
2011-03-24 19:47:17 +00:00
Tom Tromey 197f0a605d * tracepoint.c (trace_actions_command): Update.
* thread.c (thread_apply_command): Update.
	* reverse.c (delete_bookmark_command): Update.
	(bookmarks_info): Update.
	* printcmd.c (undisplay_command): Update.
	* memattr.c (mem_enable_command): Update.
	(mem_disable_command): Update.
	(mem_delete_command): Update.
	* inferior.c (detach_inferior_command): Update.
	(kill_inferior_command): Update.
	(remove_inferior_command): Update.
	* cli/cli-utils.h (struct get_number_or_range_state): New.
	(init_number_or_range): Declare.
	(get_number_or_range): Update.
	* cli/cli-utils.c (init_number_or_range): New function.
	(get_number_or_range): Change 'pp' parameter to 'state'.  Remove
	static variables.
	(number_is_in_list): Update.
	* breakpoint.h (get_tracepoint_by_number): Update.
	* breakpoint.c (map_breakpoint_numbers): Update for change to
	get_number_or_range.
	(find_location_by_number): Use get_number, not
	get_number_or_range.
	(trace_pass_set_count): New function.
	(trace_pass_command): Update for change to get_number_or_range.
	Rework loop logic.
	(get_tracepoint_by_number): Remove 'multi_p' parameter; add
	'state' parameter.
2011-03-10 18:33:59 +00:00
Tom Tromey e9cafbccd2 * reverse.c: Include cli-utils.h.
* printcmd.c: Include cli-utils.h.
	(string_printf): Use skip_spaces.
	* cli/cli-utils.h: New file.
	* cli/cli-utils.c: New file.
	* cli/cli-dump.h (skip_spaces): Move to cli-utils.h.
	* cli/cli-dump.c (skip_spaces): Move to cli-utils.c.
	* breakpoint.h (get_number, get_number_or_range): Move to
	cli-utils.h.
	* breakpoint.c: Include cli-utils.h.
	(get_number_trailer, get_number, get_number_or_range)
	(ep_skip_leading_whitespace): Move to cli-utils.c.
	(create_breakpoint_sal, find_condition_and_thread)
	(decode_static_tracepoint_spec, watch_command_1)
	(watch_maybe_just_location, ep_parse_optional_if_clause)
	(catch_fork_command_1, catch_exec_command_1)
	(catch_syscall_command_1): Use skip_spaces, skip_to_space.
	* Makefile.in (SUBDIR_CLI_OBS): Add cli-utils.o.
	(SUBDIR_CLI_SRCS): Add cli-utils.c.
	(HFILES_NO_SRCDIR): Add cli-utils.h.
	(cli-utils.o): New target.
2011-02-21 18:13:17 +00:00
Pedro Alves 3c3fe74c6f * breakpoint.c (get_number_trailer): No longer accept a NULL PP.
* breakpoint.h (get_number_or_range): Declare.
	* printcmd.c (ALL_DISPLAYS): Declare.
	(delete_display): Reimplement taking a display pointer.
	(undisplay_command): Accept a range of displays to delete, using
	get_number_or_range.
2011-02-18 16:43:53 +00:00
Thiago Jung Bauermann a3be78903d Fix some typos.
* breakpoint.c (update_watchpoint): Fix name of the
	update_global_location_list function.
	(print_one_breakpoint): Fix typo.
	(_initialize_breakpoint): Remove extra space in hbreak help
	string.
	* breakpoint.h (struct bp_location) <length>: Fix field
	description.
2011-02-04 17:27:19 +00:00
Paul Pluzhnikov 03673fc718 2011-01-31 Paul Pluzhnikov <ppluzhnikov@google.com>
* breakpoint.h (remove_jit_event_breakpoints): New prototype.
	* breakpoint.c (remove_jit_event_breakpoints): New function.
	* jit.c (jit_descriptor_addr): Delete.
	(registering_code): Delete.
	(clear_int): Delete.
	(jit_inferior_data): New variable.
	(struct jit_inferior_data): New type.
	(get_jit_inferior_data): New function.
	(jit_inferior_data_cleanup): New function.
	(jit_read_descriptor): Adjust.
	(jit_register_code): Adjust.
	(jit_breakpoint_re_set_internal): New function; move code here ...
	(jit_inferior_init): ... from here.
	(jit_breakpoint_re_set): Adjust.
	(jit_reset_inferior_data_and_breakpoints): New function.
	(jit_inferior_created_observer): Adjust.
	(jit_inferior_exit_hook): Adjust.
	(jit_executable_changed_observer): New function.
	(jit_event_handler): Adjust.
	(_initialize_jit): Adjust.
2011-01-31 21:37:01 +00:00
Tom Tromey 45a4356715 * infcmd.c (finish_backward): Use breakpoint_set_silent.
* python/py-breakpoint.c (bppy_set_silent): Use
	breakpoint_set_silent.
	(bppy_set_thread): Use breakpoint_set_thread.
	(bppy_set_task): Use breakpoint_set_task.
	* breakpoint.h (breakpoint_set_silent, breakpoint_set_thread)
	(breakpoint_set_task): Declare.
	(make_breakpoint_silent): Remove.
	* breakpoint.c (breakpoint_set_silent): New function.
	(breakpoint_set_thread): Likewise.
	(breakpoint_set_task): Likewise.
	(make_breakpoint_silent): Remove.
2011-01-31 15:16:59 +00:00
Tom Tromey 09d682a4f3 * breakpoint.h (user_breakpoint_p): Declare.
* breakpoint.c (user_breakpoint_p): New function.
	(breakpoint_1): Use it.
	(save_breakpoints): Likewise.
2011-01-31 15:07:49 +00:00
Thiago Jung Bauermann e09342b536 2011-01-11 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Thiago Jung Bauermann  <bauerman@br.ibm.com>

	Implement support for PowerPC BookE ranged watchpoints.

gdb/
	* breakpoint.h
	(struct breakpoint_ops) <resources_needed>: New method.
	Initialize to NULL in all existing breakpoint_ops instances.
	(struct breakpoint) <exact>: New field.
	(target_exact_watchpoints): Declare external global.
	* breakpoint.c (target_exact_watchpoints): New global flag.
	(update_watchpoint): Set b->type to bp_hardware_watchpoint and
	b->enable_state to bp_enabled before calling
	hw_watchpoint_used_count.
	(hw_watchpoint_used_count): Iterate over all bp_locations in a
	watchpoint.  Call breakpoint's breakpoint_ops.resources_needed
	if available.
	(insert_watchpoint, remove_watchpoint): Use fixed length of 1 byte
	if the watchpoint is exact.
	(resources_needed_watchpoint): New function.
	(watchpoint_breakpoint_ops): Add resources_needed_watchpoint.
	(watch_command_1): Set b->exact if the user asked for an exact
	watchpoint and one can be set.
	(can_use_hardware_watchpoint): Add exact_watchpoints argument.
	Pass fixed length of 1 to target_region_ok_for_hw_watchpoint if
	the user asks for an exact watchpoint and one can be set.  Return
	number of needed debug registers to watch the expression.
	* gdbtypes.c (is_scalar_type): New function, based on
	valprint.c:scalar_type_p.
	(is_scalar_type_recursive): New function.
	* gdbtypes.h (is_scalar_type_recursive): Declare.
	* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Always
	handle regions when ranged watchpoints are available.
	(create_watchpoint_request): New function.
	(ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint): Use
	create_watchpoint_request.
	* rs6000-tdep.c (show_powerpc_exact_watchpoints): New function.
	(_initialize_rs6000_tdep): Add `exact-watchpoints' boolean to the
	`set powerpc' and `show powerpc' commands.
	* target.h (struct target_ops) <to_region_ok_for_hw_watchpoint>:
	Mention documentation comment in the target macro.
	(target_region_ok_for_hw_watchpoint): Document return value.

gdb/doc/
	* gdb.texinfo (PowerPC Embedded): Document ranged watchpoints and
	the "set powerpc exact-watchpoints" flag.
2011-01-11 19:23:03 +00:00
Thiago Jung Bauermann 77b06cd719 2010-01-11 Thiago Jung Bauermann <bauerman@br.ibm.com>
Convert hardware watchpoints to use breakpoint_ops.

gdb/
	* breakpoint.h (breakpoint_ops) <insert>: Rename to...
	<insert_location>: ... this.  Return int instead of void.
	Accept pointer to struct bp_location instead of pointer to
	struct breakpoint.  Adapt all implementations.
	(breakpoint_ops) <remove>: Rename to...
	<remove_location>: ... this.  Accept pointer to struct bp_location
	instead of pointer to struct breakpoint.  Adapt all implementations.
	* breakpoint.c (insert_catchpoint): Delete function.
	(insert_bp_location): Call the watchpoint or catchpoint's
	breakpoint_ops.insert method.
	(remove_breakpoint_1): Call the watchpoint or catchpoint's
	breakpoint_ops.remove method.
	(insert_watchpoint, remove_watchpoint): New functions.
	(watchpoint_breakpoint_ops): New structure.
	(watch_command_1): Initialize the OPS field.
	* inf-child.c (inf_child_insert_fork_catchpoint)
	(inf_child_remove_fork_catchpoint, inf_child_insert_vfork_catchpoint)
	(inf_child_remove_vfork_catchpoint, inf_child_insert_exec_catchpoint)
	(inf_child_remove_exec_catchpoint, inf_child_set_syscall_catchpoint):
	Delete functions.
	(inf_child_target): Remove initialization of to_insert_fork_catchpoint,
	to_remove_fork_catchpoint, to_insert_vfork_catchpoint,
	to_remove_vfork_catchpoint, to_insert_exec_catchpoint,
	to_remove_exec_catchpoint and to_set_syscall_catchpoint.
	* target.c (update_current_target): Change default implementation of
	to_insert_fork_catchpoint, to_remove_fork_catchpoint,
	to_insert_vfork_catchpoint, to_remove_vfork_catchpoint,
	to_insert_exec_catchpoint, to_remove_exec_catchpoint and
	to_set_syscall_catchpoint to return_one.
	(debug_to_insert_fork_catchpoint, debug_to_insert_vfork_catchpoint)
	(debug_to_insert_exec_catchpoint): Report return value.
	* target.h (to_insert_fork_catchpoint, to_insert_vfork_catchpoint)
	(to_insert_exec_catchpoint): Change declaration to return int instead
	of void.

gdb/testsuite/
	* gdb.base/foll-exec.exp: Adapt to new error string when the catchpoint
	type is not supported.
	* gdb.base/foll-fork.exp: Likewise.
	* gdb.base/foll-vfork.exp: Likewise.
2011-01-11 19:16:23 +00:00
Joel Brobecker 7b6bb8daac run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
Michael Snyder 0e2de36609 2010-12-31 Michael Snyder <msnyder@vmware.com>
* annotate.c: Comment cleanup, shorten long lines.
	* arch-utils.c: Ditto.
	* arch-utils.h: Ditto.
	* auxv.c: Ditto.
	* auxv.h: Ditto.
	* ax-gdb.c: Ditto.
	* ax-gdb.h: Ditto.
	* ax-general.c: Ditto.
	* breakpoint.h: Ditto.
	* buildsym.h: Ditto.
2010-12-31 19:16:37 +00:00
Tom Tromey 186c406b19 gdb
PR c++/9593:
	* thread.c (clear_thread_inferior_resources): Call
	delete_longjmp_breakpoint.
	* infrun.c (handle_inferior_event): Handle exception breakpoints.
	(handle_inferior_event): Likewise.
	(insert_exception_resume_breakpoint): New function.
	(check_exception_resume): Likewise.
	* inferior.h (delete_longjmp_breakpoint_cleanup): Declare.
	* infcmd.c (delete_longjmp_breakpoint_cleanup): No longer static.
	(step_1): Set thread's initiating frame.
	(until_next_continuation): New function.
	(until_next_command): Support exception breakpoints.
	(finish_command_continuation): Delete longjmp breakpoint.
	(finish_forward): Support exception breakpoints.
	* gdbthread.h (struct thread_info) <initiating_frame>: New field.
	* breakpoint.h (enum bptype) <bp_exception, bp_exception_resume,
	bp_exception_master>: New constants.
	(struct bpstat_what) <is_longjmp>: New field.
	(set_longjmp_breakpoint): Update.
	* breakpoint.c (create_exception_master_breakpoint): New function.
	(update_breakpoints_after_exec): Handle bp_exception_master.  Call
	create_exception_master_breakpoint.
	(print_it_typical): Handle bp_exception_master, bp_exception.
	(bpstat_stop_status): Handle bp_exception_master.
	(bpstat_what): Handle bp_exception_master, bp_exception,
	bp_exception_resume.
	(bptype_string): Likewise.
	(print_one_breakpoint_location): Likewise.
	(allocate_bp_location): Likewise.
	(set_longjmp_breakpoint): Handle exception breakpoints.  Change
	interface.
	(delete_longjmp_breakpoint): Handle exception breakpoints.
	(mention): Likewise.
	(struct until_break_command_continuation_args) <thread_num>: New
	field.
	(until_break_command_continuation): Call
	delete_longjmp_breakpoint.
	(until_break_command): Support exception breakpoints.
	(delete_command): Likewise.
	(breakpoint_re_set_one): Likewise.
	(breakpoint_re_set): Likewise.
gdb/testuite
	* gdb.java/jnpe.java: New file.
	* gdb.java/jnpe.exp: New file.
	* gdb.cp/nextoverthrow.exp: New file.
	* gdb.cp/nextoverthrow.cc: New file.
2010-12-09 16:09:54 +00:00
Pedro Alves 5038964414 * breakpoint.h: No longer include python.h or python-internal.h.
(struct breakpoint_object): Forward declare.
	* defs.h (PyObject) [!HAVE_PYTHON]: Don't define.
	* varobj.c (PyObject) [!HAVE_PYTHON]: Define.
	* python/py-breakpoint.c (build_bp_list): Cast py_bp_object to
	PyObject pointer.
	(gdbpy_breakpoint_created): Remove casts around py_bp_object
	accesses.
2010-11-25 13:10:07 +00:00
Phil Muldoon 84f4c1fe05 2010-11-11 Phil Muldoon <pmuldoon@redhat.com>
* python/py-breakpoint.c (BPPY_REQUIRE_VALID): Check if bp is
	NULL.
	(BPPY_SET_REQUIRE_VALID): Ditto.
	(bpnum_is_valid): Delete function.
	(bppy_get_visibility): New function.
	(bppy_new): Parse for, and validate internal keyword.  Pass
	internal keyword to breakpoint or watchpoint functions.
	(build_bp_list): New function.
	(gdbpy_breakpoints): Rewrite.  Use build_bp_list and
	iterate_over_breakpoints.
	(gdbpy_breakpoint_created): Rewrite.  Do not store breakpoints in a
	look-aside vector.
	(gdbpy_breakpoint_deleted): Rewrite, defer breakpoint management
	to internal breakpoint chain.

	* breakpoint.c (set_breakpoint_number): New function.
	(breakpoint_1): Check if breakpoint number is more than zero.
	(set_raw_breakpoint_without_location): Set py_bp_object to NULL.
	(create_breakpoint_sal): Take a new parameter called internal.
	Call set_breakpoint_number with internal parameter.  Do not
	mention internal breakpoints.  All callers updated.
	(create_breakpoint): Ditto.
	(create_breakpoints_sal): Ditto.
	(watch_command_1): Ditto.
	(watch_command_wrapper): Take a new parameter called internal.
	All callers updated.
	(rwatch_command_wrapper): Ditto.
	(awatch_command_wrapper): Ditto.
	(save_breakpoints): Update breakpoint save condition check.
	(iterate_over_breakpoints): New function.
	* breakpoint.h: Add conditional python includes.  Add py_bp_object
	and comment to struct breakpoint.  Update all callers.
	* defs.h: Add PyObject definition for GDB builds without Python.

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

	* gdb.texinfo (Breakpoints In Python): Document "internal"
	parameter, and visible attribute.


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

	* gdb.python/py-breakpoint.exp: Add internal watchpoint and
	breakpoint tests.
2010-11-11 14:11:56 +00:00
Pedro Alves f431efe540 gdb/
2010-08-17  Pedro Alves  <pedro@codesourcery.com>

	PR breakpoints/11371

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

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

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

	PR breakpoints/11371

	* gdb.base/watch-cond-infcall.exp: New file.
	* gdb.base/watch-cond-infcall.c: New file.
2010-08-17 20:59:04 +00:00
Jan Kratochvil d63d0675b6 gdb/
* breakpoint.c (update_watchpoint): Add source empty line.  Prefer
	EXP_STRING_REPARSE to EXP_STRING.
	(watch_command_1): Set also EXP_STRING_REPARSE.
	(delete_breakpoint): Free also EXP_STRING_REPARSE.
	* breakpoint.h (struct breakpoint): New field exp_string_reparse.
	Update comment for exp_string.
2010-08-16 19:53:05 +00:00
Hui Zhu f02253f190 2010-07-19 Hui Zhu <teawater@gmail.com>
* breakpoint.c (single_step_breakpoints_inserted): New
	function.
	* breakpoint.h (single_step_breakpoints_inserted): Extern.
	* infrun.c (maybe_software_singlestep): Add check code.
	* record.c (record_resume): Add code for software single step.
	(record_wait): Ditto.
2010-07-19 07:55:43 +00:00
Pedro Alves 0fb4aa4bfc Static tracepoints support, and UST integration.
gdb/gdbserver/
	* configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
	* mem-break.c (uninsert_all_breakpoints)
	(reinsert_all_breakpoints): New.
	* mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
	* tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
	(gdb_agent_ust_loaded, helper_thread_id)
	(gdb_agent_helper_thread_id): New macros.
	(struct ipa_sym_addresses): Add addr_ust_loaded,
	addr_helper_thread_id, addr_cmd_buf.
	(symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
	(in_process_agent_loaded_ust): New.
	(write_e_ust_not_loaded): New.
	(maybe_write_ipa_ust_not_loaded): New.
	(struct collect_static_trace_data_action): New.
	(enum tracepoint_type) <static_tracepoint>: New.
	(struct tracepoint) <handle>: Mention static tracepoints.
	(struct static_tracepoint_ctx): New.
	(CMD_BUF_SIZE): New.
	(add_tracepoint_action): Handle static tracepoint actions.
	(unprobe_marker_at): New.
	(clear_installed_tracepoints): Handle static tracepoints.
	(cmd_qtdp): Handle static tracepoints.
	(probe_marker_at): New.
	(cmd_qtstart): Handle static tracepoints.
	(response_tracepoint): Handle static tracepoints.
	(cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
	(handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
	(get_context_regcache): Handle static tracepoints.
	(do_action_at_tracepoint): Handle static tracepoint actions.
	(traceframe_find_block_type): Handle static trace data blocks.
	(traceframe_read_sdata): New.
	(download_tracepoints): Download static tracepoint actions.
	[HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
	(GDB_PROBE_NAME): New.
	(ust_ops): New.
	(GET_UST_SYM): New.
	(USTF): New.
	(dlsym_ust): New.
	(ust_marker_to_static_tracepoint): New.
	(gdb_probe): New.
	(collect_ust_data_at_tracepoint): New.
	(gdb_ust_probe): New.
	(UNIX_PATH_MAX, SOCK_DIR): New.
	(gdb_ust_connect_sync_socket): New.
	(resume_thread, stop_thread): New.
	(run_inferior_command): New.
	(init_named_socket): New.
	(gdb_ust_socket_init): New.
	(cstr_to_hexstr): New.
	(next_st): New.
	(first_marker, next_marker): New.
	(response_ust_marker): New.
	(cmd_qtfstm, cmd_qtsstm): New.
	(unprobe_marker_at, probe_marker_at): New.
	(cmd_qtstmat, gdb_ust_thread): New.
	(gdb_ust_init): New.
	(initialize_tracepoint_ftlib): Call gdb_ust_init.
	* linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
	(ST_REGENTRY): New.
	(x86_64_st_collect_regmap): New.
	(X86_64_NUM_ST_COLLECT_GREGS): New.
	(AMD64_RIP_REGNUM): New.
	(supply_static_tracepoint_registers): New.
	* linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
	(ST_REGENTRY): New.
	(i386_st_collect_regmap): New.
	(i386_NUM_ST_COLLECT_GREGS): New.
	(supply_static_tracepoint_registers): New.
	* server.c (handle_query): Handle qXfer:statictrace:read.
	<qSupported>: Report support for StaticTracepoints, and
	qXfer:statictrace:read features.
	* server.h (traceframe_read_sdata)
	(supply_static_tracepoint_registers): Declare.
	* remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
	(unpack_varlen_hex): Include in IPA build.
	* Makefile.in (ustlibs, ustinc): New.
	(IPA_OBJS): Add remote-utils-ipa.o.
	($(IPA_LIB)): Link -ldl and -lpthread.
	(UST_CFLAGS): New.
	(IPAGENT_CFLAGS): Add UST_CFLAGS.
	* config.in, configure: Regenerate.

	gdb/
	* NEWS: Mention new support for static tracepoints.
	(New packets): Mention qTfSTM, qTsSTM, qTSTMat and
	qXfer:statictrace:read.
	(New features in the GDB remote stub, GDBserver): Mention static
	tracepoints support using an UST based backend.
	(New commands): Mention "info static-tracepoint-markers" and
	"strace".
	* breakpoint.c (is_marker_spec): New.
	(is_tracepoint): Handle static tracepoints.
	(validate_commands_for_breakpoint): Static tracepoints can't do
	while-stepping.
	(static_tracepoints_here): New.
	(bpstat_what): Handle static tracepoints.
	(print_one_breakpoint_location, allocate_bp_location, mention):
	Ditto.
	(create_breakpoint_sal): Ditto.
	(decode_static_tracepoint_spec): New.
	(create_breakpoint): Replace `hardwareflag', and `traceflag' with
	`type_wanted'.  Adjust.  Handle static tracepoint marker
	locations.
	(break_command_1): Adjust.
	(update_static_tracepoint): New.
	(update_breakpoint_locations): Handle static tracepoints.
	(breakpoint_re_set_one): Handle static tracepoint marker
	locations.
	(disable_command, enable_command): Handle static tracepoints.
	(trace_command, ftrace_command): Adjust.
	(strace_command): New.
	(create_tracepoint_from_upload): Adjust.
	(save_breakpoints): Handle static tracepoints.
	(_initialize_breakpoint): Install the "strace" command.
	* breakpoint.h (enum bptype): New bp_static_tracepoint type.
	(struct breakpoint): New fields static_trace_marker_id and
	static_trace_marker_id_idx.
	(breakpoints_here_p): Declare.
	(create_breakpoint): Adjust.
	(static_tracepoints_here): Declare.
	* remote.c (struct remote_state) <static_tracepoints>: New field.
	(PACKET_qXfer_statictrace_read, PACKET_StaticTracepoints): New.
	(remote_static_tracepoint_marker_at): New.
	(remote_static_tracepoint_markers_by_strid): New.
	(remote_static_tracepoint_feature): New.
	(remote_disconnected_tracing_feature): Handle "StaticTracepoints".
	(remote_xfer_partial): Handle TARGET_OBJECT_STATIC_TRACE_DATA.
	(remote_supports_static_tracepoints): New.
	(remote_download_tracepoint): Download static tracepoints.
	(init_remote_ops): Install remote_static_tracepoint_marker_at and
	remote_static_tracepoint_markers_by_strid.
	(_initialize_remote): Install set|show remote static-tracepoints,
	and set|show remote read-sdata-object commands.
	* target.c (update_current_target): Inherit and default
	to_static_tracepoint_marker_at, and
	to_static_tracepoint_markers_by_strid.
	* target.h (static_tracepoint_marker): Forward declare.
	(enum target_object): New object TARGET_OBJECT_STATIC_TRACE_DATA.
	(static_tracepoint_marker_p): New typedef.
	(DEF_VEC_P(static_tracepoint_marker_p)): New VEC type.
	(struct target_ops): New fields to_static_tracepoint_marker_at and
	to_static_tracepoint_markers_by_strid.
	(target_static_tracepoint_marker_at)
	(target_static_tracepoint_markers_by_strid): New.
	* tracepoint.c: Include source.h.
	(validate_actionline): Handle $_sdata.
	(struct collection_list): New field strace_data.
	(add_static_trace_data): New.
	(clear_collection_list): Clear strace_data.
	(stringify_collection_list): Account for a possible static trace
	data collection.
	(encode_actions_1): Encode an $_sdata collection.
	(parse_tracepoint_definition): Handle static tracepoints.
	(parse_static_tracepoint_marker_definition): New.
	(release_static_tracepoint_marker): New.
	(print_one_static_tracepoint_marker): New.
	(info_static_tracepoint_markers_command): New.
	(sdata_make_value): New.
	(_initialize_tracepoint): Create the $_sdata convenience variable.
	Add the "info static-tracepoint-markers" command.
	Mention $_sdata in the "collect" command's help output.
	* tracepoint.h (struct static_tracepoint_marker): New.
	(parse_static_tracepoint_marker_definition)
	(release_static_tracepoint_marker): Declare.
	* mi/mi-cmd-break.c (mi_cmd_break_insert): Adjust.
	* python/py-breakpoint.c (bppy_new): Adjust.

	doc/
	* gdb.texinfo (Convenience Variables): Document $_sdata.
	(Commands to Set Tracepoints): Describe static tracepoints.  Add
	`Listing Static Tracepoint Markers' menu entry.  Document
	"strace".
	(Tracepoint Action Lists): Document collecting $_sdata.
	(Listing Static Tracepoint Markers): New subsection.
	(Tracepoints support in gdbserver): Mention static tracepoints.
	(remote packets, enabling and disabling): Mention
	read-sdata-object.
	(General Query Packets) <qSupported>: Document qXfer:sdata:read
	and StaticTracepoint.
	Mention qTfSTM, qTsSTM and qTSTMat as tracepoint packets.
	Document qXfer:sdata:read.
	(Tracepoint packets): Document qTfSTM, qTsSTM and qTSTMat.
2010-07-01 10:36:12 +00:00
Jan Kratochvil 628fe4e4a9 gdb/
Fix PR 9436.
	* breakpoint.c (handle_jit_event): New function.
	(bpstat_what): Remove enum class, kc, ss, sn, sgl, slr, clr, sr, shl,
	jit, err, table and bs_class.  New variables shlib_event, jit_event,
	this_action and bptype.  Change bs_class assignments to this_action
	assignments.  new unhandled bptype internal error.  Move here
	shlib_event and jit_event handling from handle_inferior_event.
	* breakpoint.h (enum bpstat_what_main_action): Extend the comment.
	Reorder items.  Remove BPSTAT_WHAT_CHECK_SHLIBS and
	BPSTAT_WHAT_CHECK_JIT.
	* inferior.h (debug_infrun, stop_on_solib_events): New declarations.
	* infrun.c (debug_infrun, stop_on_solib_events): Remove static.
	(handle_inferior_event): Reinitialize frame and gdbarch after
	bpstat_what call.  Move BPSTAT_WHAT_CHECK_SHLIBS and
	BPSTAT_WHAT_CHECK_JIT handling to bpstat_what.  Reinitialize even
	gdbarch when frame gets reinitialized.

gdb/testsuite/
	Test PR 9436.
	* gdb.base/nostdlib.exp, gdb.base/nostdlib.c: New.
2010-06-24 15:17:32 +00:00
Ulrich Weigand d03285ec7b ChangeLog:
* infrun.c (handle_inferior_event): Handle presence of single-step
	breakpoints for TARGET_WAITKIND_FORKED and TARGET_WAITKIND_VFORKED.
	Cancel single-step breakpoints for TARGET_WAITKIND_EXITED,
	TARGET_WAITKIND_SIGNALED, and TARGET_WAITKIND_EXECD.
	* breakpoint.c (detach_single_step_breakpoints): New function.
	(detach_breakpoints): Call it.
	(cancel_single_step_breakpoints): New function.
	* breakpoint.h (cancel_single_step_breakpoints): Add prototype.

	* spu-tdep.c (spu_memory_remove_breakpoint): New function.
	(spu_gdbarch_init): Install it.

testsuite/ChangeLog:

	* gdb.cell/fork.exp: New file.
	* gdb.cell/fork.c: Likewise.
	* gdb.cell/fork-spu.c: Likewise.
2010-06-23 12:46:37 +00:00
Jan Kratochvil ee55da67fb gdb/
* breakpoint.h (owner): Extend the comment.
2010-06-07 13:39:10 +00:00
Pedro Alves 6149aea959 PR breakpoints/8554.
Implement `save-breakpoints'.

	gdb/
	* breakpoint.c (save_cmdlist): New.
	(breakpoint_set_cmdlist, breakpoint_show_cmdlist): Moved up close
	to save_cmdlist.
	(print_recreate_catch_fork): New.
	(catch_fork_breakpoint_ops): Install it.
	(print_recreate_catch_vfork): New.
	(catch_vfork_breakpoint_ops): Install it.
	(print_recreate_catch_syscall): New.
	(catch_syscall_breakpoint_ops): Install it.
	(print_recreate_catch_exec): New.
	(catch_exec_breakpoint_ops): Install it.
	(print_recreate_exception_catchpoint): New.
	(gnu_v3_exception_catchpoint_ops): Install it.
	(save_breakpoints): New, based on tracepoint_save_command, but
	handle all breakpoint types.
	(save_breakpoints_command): New.
	(tracepoint_save_command): Rename to...
	(save_tracepoints_command): ... this, and reimplement using
	save_breakpoints.
	(save_command): New.
	(_initialize_breakpoints): Install the "save" command prefix.
	Install the "save breakpoints" command.  Make "save-tracepoints" a
	deprecated alias for "save tracepoints".
	* breakpoint.h (struct breakpoint_ops): New field `print_recreate'.
	* ada-lang.c (print_recreate_exception): New.
	(print_recreate_catch_exception): New.
	(catch_exception_breakpoint_ops): Install it.
	(print_recreate_catch_exception_unhandled): New.
	(catch_exception_unhandled_breakpoint_ops): Install it.
	(print_recreate_catch_assert): New.
	(catch_assert_breakpoint_ops): Install it.

	* NEWS: Mention the new `save breakpoints' command.  Mention the
	new `save tracepoints' alias and that `save-tracepoints' is now
	deprecated.

	gdb/doc/
	* gdb.texinfo (Save Breakpoints): New node.
	(save-tracepoints): Rename to ...
	(save tracepoints): ... this.  Mention that `save-tracepoints' is
	a deprecated alias to `save tracepoints'.

	gdb/testsuite/
	* gdb.trace/save-trace.exp: Adjust.
2010-04-19 00:48:44 +00:00