aboutsummaryrefslogtreecommitdiff
path: root/gdb/location.h
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2015-08-11 17:09:35 -0700
committerKeith Seitz <keiths@redhat.com>2015-08-11 17:09:35 -0700
commit5b56227bdc000d129d393772f1e4544b5ea0fd46 (patch)
treefdc2dc4b0a2d0a2581a066d9e87f802504728536 /gdb/location.h
parenta06efdd6effd149a1d392df8d62824e44872003a (diff)
downloadgdb-5b56227bdc000d129d393772f1e4544b5ea0fd46.zip
gdb-5b56227bdc000d129d393772f1e4544b5ea0fd46.tar.gz
gdb-5b56227bdc000d129d393772f1e4544b5ea0fd46.tar.bz2
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.
Diffstat (limited to 'gdb/location.h')
-rw-r--r--gdb/location.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/gdb/location.h b/gdb/location.h
index 7b9741b..63318ba 100644
--- a/gdb/location.h
+++ b/gdb/location.h
@@ -31,7 +31,10 @@ enum event_location_type
LINESPEC_LOCATION,
/* An address in the inferior. */
- ADDRESS_LOCATION
+ ADDRESS_LOCATION,
+
+ /* A probe location. */
+ PROBE_LOCATION
};
/* Return the type of the given event location. */
@@ -72,6 +75,18 @@ extern struct event_location *
extern CORE_ADDR
get_address_location (const struct event_location *location);
+/* Create a new probe location. The return result is malloc'd
+ and should be freed with delete_event_location. */
+
+extern struct event_location *
+ new_probe_location (const char *probe);
+
+/* Return the probe location (a string) of the given event_location
+ (which must be of type PROBE_LOCATION). */
+
+extern const char *
+ get_probe_location (const struct event_location *location);
+
/* Free an event location and any associated data. */
extern void delete_event_location (struct event_location *location);