2009-12-28 Stan Shebs <stan@codesourcery.com>
Add trace state variables. * ax.h (enum agent_op): Add getv, setv, and tracev. (ax_tsv): Declare. * ax-gdb.c: Include tracepoint.h. (gen_expr): Handle BINOP_ASSIGN, BINOP_ASSIGN_MODIFY, and OP_INTERNALVAR. (gen_expr_binop_rest): New function, split from gen_expr. * ax-general.c (ax_tsv): New function. (aop_map): Add new bytecodes. * tracepoint.h (struct trace_state_variable): New struct. (tsv_s): New typedef. (find_trace_state_variable): Declare. * tracepoint.c (tvariables): New global. (next_tsv_number): New global. (create_trace_state_variable): New function. (find_trace_state_variable): New function. (delete_trace_state_variable): New function. (trace_variable_command): New function. (delete_trace_variable_command): New function. (tvariables_info): New function. (trace_start_command): Download tsvs with initial values. (_initialize_tracepoint): Add new commands. * NEWS: Mention the addition of trace state variables. ==> doc/ChangeLog <== 2009-12-28 Stan Shebs <stan@codesourcery.com> * gdb.texinfo (Trace State Variables): New section. (Tracepoint Packets): Describe trace state variable packets. * agentexpr.texi (Bytecode Descriptions): Describe trace state variable bytecodes. ==> testsuite/ChangeLog <== 2009-12-28 Stan Shebs <stan@codesourcery.com> * gdb.trace/tsv.exp: New file. * gdb.base/completion.exp: Update ambiguous info output.
This commit is contained in:
parent
ae77ee9a7f
commit
f61e138d9a
13 changed files with 792 additions and 120 deletions
|
@ -35,6 +35,34 @@ enum actionline_type
|
|||
STEPPING = 2
|
||||
};
|
||||
|
||||
/* A trace state variable is a value managed by a target being
|
||||
traced. A trace state variable (or tsv for short) can be accessed
|
||||
and assigned to by tracepoint actions and conditionals, but is not
|
||||
part of the program being traced, and it doesn't have to be
|
||||
collected. Effectively the variables are scratch space for
|
||||
tracepoints. */
|
||||
|
||||
struct trace_state_variable
|
||||
{
|
||||
/* The variable's name. The user has to prefix with a dollar sign,
|
||||
but we don't store that internally. */
|
||||
const char *name;
|
||||
|
||||
/* An id number assigned by GDB, and transmitted to targets. */
|
||||
int number;
|
||||
|
||||
/* The initial value of a variable is a 64-bit signed integer. */
|
||||
LONGEST initial_value;
|
||||
|
||||
/* 1 if the value is known, else 0. The value is known during a
|
||||
trace run, or in tfind mode if the variable was collected into
|
||||
the current trace frame. */
|
||||
int value_known;
|
||||
|
||||
/* The value of a variable is a 64-bit signed integer. */
|
||||
LONGEST value;
|
||||
};
|
||||
|
||||
extern unsigned long trace_running_p;
|
||||
|
||||
/* A hook used to notify the UI of tracepoint operations. */
|
||||
|
@ -49,4 +77,6 @@ enum actionline_type validate_actionline (char **, struct breakpoint *);
|
|||
extern void end_actions_pseudocommand (char *args, int from_tty);
|
||||
extern void while_stepping_pseudocommand (char *args, int from_tty);
|
||||
|
||||
extern struct trace_state_variable *find_trace_state_variable (const char *name);
|
||||
|
||||
#endif /* TRACEPOINT_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue