diff options
author | Yao Qi <yao@codesourcery.com> | 2013-01-18 06:40:58 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-01-18 06:40:58 +0000 |
commit | 5ae4861a11c9487e991607689ebabc2e0008a670 (patch) | |
tree | bf5e32a7baa077facd26ccb53b5f59f6996b65af /gdb/gdbserver/ax.h | |
parent | 257e7a09728bb1b846ff4e1a7587832b050d38b9 (diff) | |
download | gdb-5ae4861a11c9487e991607689ebabc2e0008a670.zip gdb-5ae4861a11c9487e991607689ebabc2e0008a670.tar.gz gdb-5ae4861a11c9487e991607689ebabc2e0008a670.tar.bz2 |
gdb/gdbserver:
* ax.h (struct eval_agent_expr_context): New.
(gdb_eval_agent_expr): Update declaration.
* ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
TFRAME. Add new argument CTX.
* server.h (struct eval_agent_expr_context): Declare.
(agent_mem_read, agent_tsv_read): Update declaration.
(agent_mem_read_string): Likewise.
* tracepoint.c (eval_tracepoint_agent_expr): Remove.
(add_traceframe_block): Add new argument TPOINT.
Increase TPOINT->traceframe_usage.
(do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
eval_tracepoint_agent_expr.
(condition_true_at_tracepoint): Likewise.
(agent_mem_read): Remove argument TFRAME. Add argument CTX.
(agent_mem_read_string, agent_tsv_read): Likewise.
Callers update.
gdb/testsuite:
* gdb.trace/infotrace.exp: Check 'traceframe usage' in the
output of 'info tracepoints'.
* gdb.trace/disconnected-tracing.exp (disconnected_tracing):
Likewise.
* gdb.trace/tstatus.exp (run_trace_experiment): Likewise.
* gdb.trace/disconnected-tracing.c (struct foo): New.
Diffstat (limited to 'gdb/gdbserver/ax.h')
-rw-r--r-- | gdb/gdbserver/ax.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gdb/gdbserver/ax.h b/gdb/gdbserver/ax.h index f87123b..b2b4e3a 100644 --- a/gdb/gdbserver/ax.h +++ b/gdb/gdbserver/ax.h @@ -67,8 +67,20 @@ void emit_epilogue (void); enum eval_result_type compile_bytecodes (struct agent_expr *aexpr); #endif -enum eval_result_type gdb_eval_agent_expr (struct regcache *regcache, - struct traceframe *tframe, - struct agent_expr *aexpr, - ULONGEST *rslt); +/* The context when evaluating agent expression. */ + +struct eval_agent_expr_context +{ + /* The registers when evaluating agent expression. */ + struct regcache *regcache; + /* The traceframe, if any, when evaluating agent expression. */ + struct traceframe *tframe; + /* The tracepoint, if any, when evaluating agent expression. */ + struct tracepoint *tpoint; +}; + +enum eval_result_type + gdb_eval_agent_expr (struct eval_agent_expr_context *ctx, + struct agent_expr *aexpr, + ULONGEST *rslt); #endif /* AX_H */ |