aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2011-02-24 07:39:48 +0000
committerJoel Brobecker <brobecker@gnat.com>2011-02-24 07:39:48 +0000
commita04b0428abc8564638c910f80b68a1cc7f14d3b2 (patch)
treebd34ea0a6e12ba8af1f16dcafebda64166737547 /gdb/tracepoint.c
parent633ff500c5d9c76c0097985c4f6d83acdaaf08cb (diff)
downloadgdb-a04b0428abc8564638c910f80b68a1cc7f14d3b2.zip
gdb-a04b0428abc8564638c910f80b68a1cc7f14d3b2.tar.gz
gdb-a04b0428abc8564638c910f80b68a1cc7f14d3b2.tar.bz2
Revert the following change (not approved yet):
2011-02-21 Hui Zhu <teawater@gmail.com> * Makefile.in (HFILES_NO_SRCDIR): Add printcmd.h. * ax-gdb.c (gen_printf_expr_callback): New function. * ax-gdb.h (gen_printf_expr_callback): Forward declare. * ax-general.c (ax_memcpy): New function. (ax_print): Handle "printf". (ax_reqs): Ditto. * ax.h (ax_memcpy): Forward declare. * common/ax.def (invalid2): Removed. (printf): New entry. * printcmd.c (printcmd.h): New include. (string_printf): New function. (ui_printf): Removed. (printf_command): Remove static. Call string_printf. (eval_command): Call string_printf. * printcmd.h: New file. * tracepoint.c (validate_actionline, encode_actions_1): handle printf_command.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 987edcc..2d675ce 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -51,7 +51,6 @@
#include "ax.h"
#include "ax-gdb.h"
#include "memrange.h"
-#include "printcmd.h"
/* readline include files */
#include "readline/readline.h"
@@ -764,28 +763,6 @@ validate_actionline (char **line, struct breakpoint *t)
error (_("while-stepping step count `%s' is malformed."), *line);
}
- else if (cmd_cfunc_eq (c, printf_command))
- {
- char fbuf[101];
-
- for (loc = t->loc; loc; loc = loc->next)
- {
- int nargs;
- aexpr = new_agent_expr (loc->gdbarch, loc->address);
- old_chain = make_cleanup_free_agent_expr (aexpr);
- string_printf (p, NULL, gen_printf_expr_callback,
- loc, aexpr);
- ax_simple (aexpr, aop_end);
- /* The agent expr include expr for arguments, format string, 1 byte
- for aop_printf, 1 byte for the number of arguments, 1 byte for
- size of format string, 1 byte for blank after format string
- and 1 byte for aop_end. */
- if (aexpr->len > MAX_AGENT_EXPR_LEN)
- error (_("Expression is too complicated."));
- do_cleanups (old_chain);
- }
- }
-
else if (cmd_cfunc_eq (c, end_actions_pseudocommand))
;
@@ -1497,22 +1474,6 @@ encode_actions_1 (struct command_line *action,
encode_actions_1 (action->body_list[0], t, tloc, frame_reg,
frame_offset, stepping_list, NULL);
}
- else if (cmd_cfunc_eq (cmd, printf_command))
- {
- char fbuf[101];
- struct cleanup *old_chain = NULL;
-
- aexpr = new_agent_expr (tloc->gdbarch, tloc->address);
- old_chain = make_cleanup_free_agent_expr (aexpr);
- string_printf (action_exp, NULL, gen_printf_expr_callback,
- tloc, aexpr);
- ax_simple (aexpr, aop_end);
-
- ax_reqs (aexpr);
- report_agent_reqs_errors (aexpr);
- discard_cleanups (old_chain);
- add_aexpr (collect, aexpr);
- }
else
error (_("Invalid tracepoint command '%s'"), action->line);
} /* for */