Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Unified Diff: gdb/gdbserver/mem-break.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/gdbserver/mem-break.h ('k') | gdb/gdbserver/notif.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « gdb/gdbserver/mem-break.h ('k') | gdb/gdbserver/notif.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698