aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2011-02-24 07:38:42 +0000
committerJoel Brobecker <brobecker@gnat.com>2011-02-24 07:38:42 +0000
commit633ff500c5d9c76c0097985c4f6d83acdaaf08cb (patch)
treefde80cde409ff89c748b2bb153341f64de213fdc /gdb/gdbserver
parent4ec7539c2682054fcdd42632158234e80e15c850 (diff)
downloadgdb-633ff500c5d9c76c0097985c4f6d83acdaaf08cb.zip
gdb-633ff500c5d9c76c0097985c4f6d83acdaaf08cb.tar.gz
gdb-633ff500c5d9c76c0097985c4f6d83acdaaf08cb.tar.bz2
Revert the following patch (printf tracepoint op) (not approved yet)
2011-02-21 Hui Zhu <teawater@gmail.com> * tracepoint.c (tp_printf): New function. (eval_agent_expr): Handle gdb_agent_op_printf.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog7
-rw-r--r--gdb/gdbserver/tracepoint.c44
2 files changed, 7 insertions, 44 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 0f7655f..1f42a8e 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-24 Joel Brobecker <brobecker@adacore.com>
+
+ Revert the following patch (not approved yet):
+ 2011-02-21 Hui Zhu <teawater@gmail.com>
+ * tracepoint.c (tp_printf): New function.
+ (eval_agent_expr): Handle gdb_agent_op_printf.
+
2011-02-21 Hui Zhu <teawater@gmail.com>
* tracepoint.c (tp_printf): New function.
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index d897728..8d99c94 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -4214,16 +4214,6 @@ gdb_agent_op_name (int op)
return gdb_agent_op_names[op];
}
-int
-tp_printf (const char *format, ...)
-{
- va_list ap;
- va_start (ap, format);
- vprintf (format, ap);
- va_end (ap);
- return 0;
-}
-
/* The agent expression evaluator, as specified by the GDB docs. It
returns 0 if everything went OK, and a nonzero error code
otherwise. */
@@ -4583,40 +4573,6 @@ eval_agent_expr (struct tracepoint_hit_ctx *ctx,
agent_tsv_read (tframe, arg);
break;
- case gdb_agent_op_printf:
- {
- void *argv;
- arg = aexpr->bytes[pc++];
- argv = (void *) (unsigned long) top;
- if (--sp >= 0)
- top = stack[sp];
-
- if (arg)
- {
- if (strstr ((char *) (aexpr->bytes + pc), "%s"))
- {
- int i;
- unsigned char buf[100];
-
- for (i = 0; i < 100; i++)
- {
- agent_mem_read (tframe, buf + i,
- (CORE_ADDR) ((unsigned long)argv + i),
- 1);
- if (!buf[i])
- break;
- }
- tp_printf ((char *) (aexpr->bytes + pc), buf);
- }
- else
- tp_printf ((char *) (aexpr->bytes + pc), argv);
- }
- else
- tp_printf ((char *) (aexpr->bytes + pc));
- pc += strlen ((char *) aexpr->bytes + pc) + 1;
- }
- break;
-
/* GDB never (currently) generates any of these ops. */
case gdb_agent_op_float:
case gdb_agent_op_ref_float: