Explicit locations: introduce probe locations

This patch adds support for probe locations and converts existing
probe linespec locations to the new location type.

gdb/ChangeLog:

	* break-catch-throw.c (re_set_exception_catchpoint): Convert
	linespec for stap probe to probe location.
	* breakpoint.c (create_longjmp_master_breakpoint)
	(create_exception_master_breakpoint): Likewise.
	(break_command_1): Remove local variable `arg_cp'.
	Check location type to set appropriate breakpoint ops methods.
	(trace_command): Likewise.
	* linespec.c (event_location_to_sals): Assert on probe locations.
	* location.c (EL_PROBE): Add macro definition.
	(new_probe_location, get_probe_location): New functions.
	(copy_event_location, delete_event_location, event_location_to_string)
	(string_to_event_location, event_location_empty_p): Handle probe
	locations.
	* location.h (enum event_location_type): Add PROBE_LOCATION.
	(new_probe_location, get_probe_location): Declare.
	* probe.c (parse_probes): Assert that LOCATION is a probe location.
	Convert linespec into probe location.
This commit is contained in:
Keith Seitz
2015-08-11 17:09:35 -07:00
parent a06efdd6ef
commit 5b56227bdc
7 changed files with 108 additions and 18 deletions

View File

@@ -2479,6 +2479,11 @@ event_location_to_sals (linespec_parser *parser,
get_address_location (location));
break;
case PROBE_LOCATION:
/* Probes are handled by their own decoders. */
gdb_assert_not_reached ("attempt to decode probe location");
break;
default:
gdb_assert_not_reached ("unhandled event location type");
}