summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-01-16 17:27:00 -0700
committerTom Tromey <tom@tromey.com>2022-04-29 16:14:32 -0600
commit8d89123dc22188d5560f452bc52baba50d154a91 (patch)
treedc43eaf85a23e6d178423ba8c95847277e072439
parent5d926615e9684d1f9a95801106300ade64548dcc (diff)
Merge probe and ordinary tracepoints
Right now, probe tracepoints are handled by a separate ops object. However, they differ only in a small way from ordinary tracepoints, and furthermore can be distinguished by their event location. This patch merges the two cases, just as was done for breakpoints.
-rw-r--r--gdb/breakpoint.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index c7fa53c53e..ecea702462 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -12273,6 +12273,9 @@ std::vector<symtab_and_line>
tracepoint::decode_location (struct event_location *location,
struct program_space *search_pspace)
{
+ if (event_location_type (location) == PROBE_LOCATION)
+ return bkpt_probe_decode_location (this, location, search_pspace);
+
return decode_location_default (this, location, search_pspace);
}
@@ -12288,15 +12291,6 @@ tracepoint_probe_create_sals_from_location
bkpt_probe_create_sals_from_location (location, canonical, type_wanted);
}
-static std::vector<symtab_and_line>
-tracepoint_probe_decode_location (struct breakpoint *b,
- struct event_location *location,
- struct program_space *search_pspace)
-{
- /* We use the same method for breakpoint on probes. */
- return bkpt_probe_decode_location (b, location, search_pspace);
-}
-
void
dprintf_breakpoint::re_set ()
{
@@ -14582,7 +14576,6 @@ initialize_breakpoint_ops (void)
ops = &tracepoint_probe_breakpoint_ops;
*ops = vtable_breakpoint_ops;
ops->create_sals_from_location = tracepoint_probe_create_sals_from_location;
- ops->decode_location = tracepoint_probe_decode_location;
/* Static tracepoints with marker (`-m'). */
ops = &strace_marker_breakpoint_ops;