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.c | |
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.c')
-rw-r--r-- | gdb/gdbserver/ax.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/gdbserver/ax.c b/gdb/gdbserver/ax.c index 94035e4..386df3d 100644 --- a/gdb/gdbserver/ax.c +++ b/gdb/gdbserver/ax.c @@ -912,8 +912,7 @@ ax_printf (CORE_ADDR fn, CORE_ADDR chan, char *format, otherwise. */ enum eval_result_type -gdb_eval_agent_expr (struct regcache *regcache, - struct traceframe *tframe, +gdb_eval_agent_expr (struct eval_agent_expr_context *ctx, struct agent_expr *aexpr, ULONGEST *rslt) { @@ -1032,15 +1031,15 @@ gdb_eval_agent_expr (struct regcache *regcache, break; case gdb_agent_op_trace: - agent_mem_read (tframe, - NULL, (CORE_ADDR) stack[--sp], (ULONGEST) top); + agent_mem_read (ctx, NULL, (CORE_ADDR) stack[--sp], + (ULONGEST) top); if (--sp >= 0) top = stack[sp]; break; case gdb_agent_op_trace_quick: arg = aexpr->bytes[pc++]; - agent_mem_read (tframe, NULL, (CORE_ADDR) top, (ULONGEST) arg); + agent_mem_read (ctx, NULL, (CORE_ADDR) top, (ULONGEST) arg); break; case gdb_agent_op_log_not: @@ -1086,22 +1085,22 @@ gdb_eval_agent_expr (struct regcache *regcache, break; case gdb_agent_op_ref8: - agent_mem_read (tframe, cnv.u8.bytes, (CORE_ADDR) top, 1); + agent_mem_read (ctx, cnv.u8.bytes, (CORE_ADDR) top, 1); top = cnv.u8.val; break; case gdb_agent_op_ref16: - agent_mem_read (tframe, cnv.u16.bytes, (CORE_ADDR) top, 2); + agent_mem_read (ctx, cnv.u16.bytes, (CORE_ADDR) top, 2); top = cnv.u16.val; break; case gdb_agent_op_ref32: - agent_mem_read (tframe, cnv.u32.bytes, (CORE_ADDR) top, 4); + agent_mem_read (ctx, cnv.u32.bytes, (CORE_ADDR) top, 4); top = cnv.u32.val; break; case gdb_agent_op_ref64: - agent_mem_read (tframe, cnv.u64.bytes, (CORE_ADDR) top, 8); + agent_mem_read (ctx, cnv.u64.bytes, (CORE_ADDR) top, 8); top = cnv.u64.val; break; @@ -1160,6 +1159,7 @@ gdb_eval_agent_expr (struct regcache *regcache, arg = (arg << 8) + aexpr->bytes[pc++]; { int regnum = arg; + struct regcache *regcache = ctx->regcache; switch (register_size (regnum)) { @@ -1260,11 +1260,11 @@ gdb_eval_agent_expr (struct regcache *regcache, case gdb_agent_op_tracev: arg = aexpr->bytes[pc++]; arg = (arg << 8) + aexpr->bytes[pc++]; - agent_tsv_read (tframe, arg); + agent_tsv_read (ctx, arg); break; case gdb_agent_op_tracenz: - agent_mem_read_string (tframe, NULL, (CORE_ADDR) stack[--sp], + agent_mem_read_string (ctx, NULL, (CORE_ADDR) stack[--sp], (ULONGEST) top); if (--sp >= 0) top = stack[sp]; |