aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-02-18 20:55:45 +0000
committerTom Tromey <tromey@redhat.com>2011-02-18 20:55:45 +0000
commitc7f96d2b95d916a17453df2df3bff1b382420bc8 (patch)
tree3d92959b148d78f2ca28eb68ce00316d56c8f98a /gdb/gdbserver
parent66694b75a4d54ce3228aab59ac09585f576dcc16 (diff)
downloadgdb-c7f96d2b95d916a17453df2df3bff1b382420bc8.zip
gdb-c7f96d2b95d916a17453df2df3bff1b382420bc8.tar.gz
gdb-c7f96d2b95d916a17453df2df3bff1b382420bc8.tar.bz2
gdb
* ax-general.c (aop_map): Add pick and rot. * dwarf2loc.c (compile_dwarf_to_ax) <DW_OP_over>: Reimplement. <DW_OP_rot>: Implement. * ax.h (enum agent_op) <aop_pick, aop_rot>: New constants. (ax_pick): Declare. * ax-general.c (ax_pick): New function. doc * agentexpr.texi (Bytecode Descriptions): Document pick and rot. gdbserver * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick, gdb_agent_op_rot>: New constants. (gdb_agent_op_names): Add pick and roll. (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New cases.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog8
-rw-r--r--gdb/gdbserver/tracepoint.c22
2 files changed, 30 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 55e7ad1..e5caba5 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,11 @@
+2011-02-18 Tom Tromey <tromey@redhat.com>
+
+ * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
+ gdb_agent_op_rot>: New constants.
+ (gdb_agent_op_names): Add pick and roll.
+ (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
+ cases.
+
2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
* aclocal.m4: Regenerated with aclocal-1.11.1.
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index fb5f522..36a92b2 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -517,6 +517,8 @@ enum gdb_agent_op
gdb_agent_op_setv = 0x2d,
gdb_agent_op_tracev = 0x2e,
gdb_agent_op_trace16 = 0x30,
+ gdb_agent_op_pick = 0x32,
+ gdb_agent_op_rot = 0x33,
gdb_agent_op_last
};
@@ -571,6 +573,9 @@ static const char *gdb_agent_op_names [gdb_agent_op_last] =
"tracev",
"?undef?",
"trace16",
+ "?undef?",
+ "pick",
+ "rot"
};
struct agent_expr
@@ -4598,6 +4603,23 @@ eval_agent_expr (struct tracepoint_hit_ctx *ctx,
top = stack[sp];
break;
+ case gdb_agent_op_pick:
+ arg = aexpr->bytes[pc++];
+ stack[sp] = top;
+ top = stack[sp - arg];
+ ++sp;
+ break;
+
+ case gdb_agent_op_rot:
+ {
+ ULONGEST tem = stack[sp - 1];
+
+ stack[sp - 1] = stack[sp - 2];
+ stack[sp - 2] = top;
+ top = tem;
+ }
+ break;
+
case gdb_agent_op_zero_ext:
arg = aexpr->bytes[pc++];
if (arg < (sizeof (LONGEST) * 8))