summaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorWei-cheng Wang <cole945@gmail.com>2015-09-16 16:20:51 +0100
committerYao Qi <yao.qi@linaro.org>2015-09-16 17:17:50 +0100
commitd78908cff50f281dab6390646fb1b7c58236d83e (patch)
treeec0632444f5315d915af22b6716f357576fd9413 /gdb/gdbserver
parent1ed415e2b9b985aac087c35949d0e1e489ab496d (diff)
downloadbinutils-gdb-d78908cff50f281dab6390646fb1b7c58236d83e.tar.gz
Fix argument to compiled_cond, and add cases for compiled-condition.
This patch fixes the argument passed to compiled_cond. It should be regs buffer instead of tracepoint_hit_ctx. Test case is added as well for testing compiled-cond. gdb/gdbserver/ChangeLog 2015-09-16 Wei-cheng Wang <cole945@gmail.com> * tracepoint.c (eval_result_type): Change prototype. (condition_true_at_tracepoint): Fix argument to compiled_cond. gdb/testsuite/ChangeLog 2015-09-16 Wei-cheng Wang <cole945@gmail.com> * gdb.trace/ftrace.exp: (test_ftrace_condition) New function for testing bytecode compilation.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/tracepoint.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 5c0cbce18fd..c018f284724 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-16 Wei-cheng Wang <cole945@gmail.com>
+
+ * tracepoint.c (eval_result_type): Change prototype.
+ (condition_true_at_tracepoint): Fix argument to compiled_cond.
+
2015-09-15 Pedro Alves <palves@redhat.com>
* remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index fd010aed7fb..5e34ebaf8e8 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -695,7 +695,7 @@ enum tracepoint_type
struct tracepoint_hit_ctx;
-typedef enum eval_result_type (*condfn) (struct tracepoint_hit_ctx *,
+typedef enum eval_result_type (*condfn) (unsigned char *,
ULONGEST *);
/* The definition of a tracepoint. */
@@ -4907,7 +4907,10 @@ condition_true_at_tracepoint (struct tracepoint_hit_ctx *ctx,
used. */
#ifdef IN_PROCESS_AGENT
if (tpoint->compiled_cond)
- err = ((condfn) (uintptr_t) (tpoint->compiled_cond)) (ctx, &value);
+ {
+ struct fast_tracepoint_ctx *fctx = (struct fast_tracepoint_ctx *) ctx;
+ err = ((condfn) (uintptr_t) (tpoint->compiled_cond)) (fctx->regs, &value);
+ }
else
#endif
{