Commit Graph

5 Commits

Author SHA1 Message Date
Tom Tromey cc16e6c915 PR c++/13588:
* NEWS: Update.
	* break-catch-throw.c (struct exception_catchpoint)
	<exception_rx, pattern>: New fields.
	(fetch_probe_arguments, dtor_exception_catchpoint)
	(check_status_exception_catchpoint)
	(print_one_detail_exception_catchpoint): New functions.
	(handle_gnu_v3_exceptions): Add "except_rx" argument.
	Compile regular expression if needed.
	(extract_exception_regexp): New function.
	(catch_exception_command_1): Use extract_exception_regexp.
	(compute_exception): Use fetch_probe_arguments.
	(initialize_throw_catchpoint_ops): Set dtor, print_one_detail,
	and check_status fields.
	* cp-abi.c (cplus_typename_from_type_info): New function.
	* cp-abi.h (cplus_typename_from_type_info): Declare.
	(struct cp_abi_ops) <get_typename_from_type_info>: New field.
	* gdb_regex.h (compile_rx_or_error): Declare.
	* gnu-v3-abi.c (gnuv3_get_typename_from_type_info): Update
	comment.
	(init_gnuv3_ops): Set get_type_from_type_info field.
	* probe.c (compile_rx_or_error): Move...
	* utils.c (compile_rx_or_error): ... here.
gdb/doc
	* gdb.texinfo (Set Catchpoints): Document regexp syntax for
	exception catchpoints.
gdb/testsuite
	* gdb.cp/exceptprint.exp: Add regexp catchpoint tests.
2013-04-15 18:13:01 +00:00
Tom Tromey 72f1fe8a88 PR c++/15176:
* NEWS: Update.
	* break-catch-throw.c (compute_exception): New function.
	(exception_funcs): New global.
	(_initialize_break_catch_throw): Create $_exception.
	* cp-abi.c (cplus_type_from_type_info): New function.
	* cp-abi.h (cplus_type_from_type_info): Declare.
	(struct cp_abi_ops) <get_type_from_type_info>: New field.
	* gnu-v3-abi.c (gnuv3_get_typename_from_type_info)
	(gnuv3_get_type_from_type_info): New functions.
	(init_gnuv3_ops): Set get_type_from_type_info ABI field.
gdb/doc
	* gdb.texinfo (Set Catchpoints): Document $_exception.
	(Convenience Vars): Mention $_exception.
gdb/testsuite
	* gdb.base/default.exp: Update for $_exception.
	* gdb.cp/exceptprint.cc: New file.
	* gdb.cp/exceptprint.exp: New file.
	* lib/gdb.exp (skip_libstdcxx_probe_tests): New proc.
2013-04-15 18:09:02 +00:00
Tom Tromey fc4746a2bd * break-catch-throw.c (struct exception_names): New.
(exception_functions): Change type.
	(re_set_exception_catchpoint): Look for SDT probes.
2013-04-15 18:06:42 +00:00
Tom Tromey 15a73f5615 PR c++/10119:
* break-catch-throw.c (exception_functions): New global.
	(gnu_v3_exception_catchpoint_ops): Move earlier.
	(struct exception_catchpoint): New.
	(classify_exception_breakpoint): Rewrite.
	(re_set_exception_catchpoint): New function.
	(handle_gnu_v3_exceptions): Return void.  Use init_catchpoint.
	Allocate a struct exception_catchpoint.
	(catch_exception_command_1): Update.
	(initialize_throw_catchpoint_ops): Set 're_set' method.
2013-04-15 18:05:48 +00:00
Tom Tromey 916703c090 * Makefile.in (SFILES): Add break-catch-throw.c
(COMMON_OBS): Add break-catch-throw.o.
	* break-catch-throw.c: New file.
	* breakpoint.c: Move exception-catching code to new file.
	(ep_parse_optional_if_clause): No longer static.
	* breakpoint.h (ep_parse_optional_if_clause): Declare.
2013-04-15 18:04:53 +00:00