public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Merge probe and ordinary tracepoints Date: Fri, 29 Apr 2022 22:24:11 +0000 (GMT) [thread overview] Message-ID: <20220429222411.7AD6A385842B@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8d89123dc22188d5560f452bc52baba50d154a91 commit 8d89123dc22188d5560f452bc52baba50d154a91 Author: Tom Tromey <tom@tromey.com> Date: Sun Jan 16 17:27:00 2022 -0700 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. Diff: --- gdb/breakpoint.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index c7fa53c53e2..ecea7024624 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;
reply other threads:[~2022-04-29 22:24 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220429222411.7AD6A385842B@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).