This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Conditional tracepoints
- From: Tom Tromey <tromey at redhat dot com>
- To: Stan Shebs <stan at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 29 Jun 2009 10:36:38 -0600
- Subject: Re: [PATCH] Conditional tracepoints
- References: <4A45AE9B.9020400@codesourcery.com>
- Reply-to: tromey at redhat dot com
>>>>> "Stan" == Stan Shebs <stan@codesourcery.com> writes:
Stan> This patch adds conditional tracepoints. Tracepoint conditions work
Stan> by being compiled into agent expressions that actually evaluate on the
Stan> spot in the target, rather than collecting blocks of trace data.
Very cool.
Now I'm wondering if we could use agent expressions for conditional
breakpoints somehow :-)
Stan> As usual for tracepoints, GDB proper doesn't have to do much,
Stan> and most of the code here revolves around checking for the
Stan> "ConditionalTracepoints" feature, so as to maintain
Stan> compatibility with the two(?) existing tracepoint
Stan> implementations out there.
Are either of these free software?
Stan> +
Stan> + struct agent_expr *
Stan> + gen_eval_for_expr (CORE_ADDR scope, struct expression *expr)
Could use a header comment.
Stan> Index: tracepoint.c
[...]
Stan> + extern int remote_supports_cond_tracepoints (void);
This seems fishy to me.
At the very least I think this should be in a header, not in the .c
file. But... other cases like this seem to be expressed via target
methods, not as direct calls into remote.c.
(I thought maybe remote.o was not always compiled in; there are
comments to that effect, but they appear to be stale.)
Tom