This patch adds conditional tracepoints. Tracepoint conditions work by being compiled into agent expressions that actually evaluate on the spot in the target, rather than collecting blocks of trace data. As usual for tracepoints, GDB proper doesn't have to do much, and most of the code here revolves around checking for the "ConditionalTracepoints" feature, so as to maintain compatibility with the two(?) existing tracepoint implementations out there. As a bonus subpatch, I added bytecode generation for comparison operators, other boolean ops are coming later. I tested by exercising with CodeSourcery's target agent, in the absence of anything usable in the GDB testsuite. Stan 2009-06-26 Stan Shebs Conditional tracepoints. * ax-gdb.h (gen_eval_for_expr): Declare. * ax-gdb.c (gen_expr): Generate bytecodes for BINOP_EQUAL and other comparisons. (gen_eval_for_expr): New function. (agent_eval_command): New maintenance command. (_initialize_ax_gdb): Define the command. * remote.c (struct remote_state): New field cond_tracepoints. (PACKET_ConditionalTracepoints): New packet config type. (remote_cond_tracepoint_feature): New function. (remote_protocol_features): Add ConditionalTracepoints. (remote_supports_cond_tracepoints): New function. (_initialize_remote): Add ConditionalTracepoints. * tracepoint.c (download_tracepoint): Add conditional. ==> doc/ChangeLog <== 2009-06-26 Stan Shebs * gdb.texinfo (Tracepoint Conditions): New section. (General Query Packets): Describe ConditionalTracepoints. (Tracepoint Packets): Describe condition field. (Maintenance Commands): Describe maint agent-eval. ==> testsuite/ChangeLog <== 2009-06-26 Stan Shebs * gdb.trace/tracecmd.exp: Add basic test of tracepoint conditions.