Index: gdb/gdbserver/mem-break.c |
diff --git a/gdb/gdbserver/mem-break.c b/gdb/gdbserver/mem-break.c |
index 39dcb865966626103be2fdab65fc79b58ba5b2cb..aca77408a175f5b8f68e01edaebd29ee8df247ea 100644 |
--- a/gdb/gdbserver/mem-break.c |
+++ b/gdb/gdbserver/mem-break.c |
@@ -1,6 +1,5 @@ |
/* Memory breakpoint operations for the remote server for GDB. |
- Copyright (C) 2002-2003, 2005, 2007-2012 Free Software Foundation, |
- Inc. |
+ Copyright (C) 2002-2013 Free Software Foundation, Inc. |
Contributed by MontaVista Software. |
@@ -841,8 +840,7 @@ gdb_condition_true_at_breakpoint (CORE_ADDR where) |
ULONGEST value = 0; |
struct point_cond_list *cl; |
int err = 0; |
- |
- struct regcache *regcache = get_thread_regcache (current_inferior, 1); |
+ struct eval_agent_expr_context ctx; |
if (bp == NULL) |
return 0; |
@@ -852,6 +850,10 @@ gdb_condition_true_at_breakpoint (CORE_ADDR where) |
if (bp->cond_list == NULL) |
return 1; |
+ ctx.regcache = get_thread_regcache (current_inferior, 1); |
+ ctx.tframe = NULL; |
+ ctx.tpoint = NULL; |
+ |
/* Evaluate each condition in the breakpoint's list of conditions. |
Return true if any of the conditions evaluates to TRUE. |
@@ -861,7 +863,7 @@ gdb_condition_true_at_breakpoint (CORE_ADDR where) |
cl && !value && !err; cl = cl->next) |
{ |
/* Evaluate the condition. */ |
- err = gdb_eval_agent_expr (regcache, NULL, cl->cond, &value); |
+ err = gdb_eval_agent_expr (&ctx, cl->cond, &value); |
} |
if (err) |
@@ -944,17 +946,20 @@ run_breakpoint_commands (CORE_ADDR where) |
ULONGEST value = 0; |
struct point_command_list *cl; |
int err = 0; |
- |
- struct regcache *regcache = get_thread_regcache (current_inferior, 1); |
+ struct eval_agent_expr_context ctx; |
if (bp == NULL) |
return; |
+ ctx.regcache = get_thread_regcache (current_inferior, 1); |
+ ctx.tframe = NULL; |
+ ctx.tpoint = NULL; |
+ |
for (cl = bp->command_list; |
cl && !value && !err; cl = cl->next) |
{ |
/* Run the command. */ |
- err = gdb_eval_agent_expr (regcache, NULL, cl->cmd, &value); |
+ err = gdb_eval_agent_expr (&ctx, cl->cmd, &value); |
/* If one command has a problem, stop digging the hole deeper. */ |
if (err) |