forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user