aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-05-22 09:02:23 +0000
committerAndrew Cagney <cagney@redhat.com>2000-05-22 09:02:23 +0000
commit74b7792f0fcae41f7c7da524527b7261a3fd68c4 (patch)
treeb88a9a20c59780f3b51c4819b6dea5acce3ec446 /gdb/tracepoint.c
parent2000-05-22 H.J. Lu <hjl@gnu.org> (diff)
downloadbinutils-gdb-74b7792f0fcae41f7c7da524527b7261a3fd68c4.tar.gz
binutils-gdb-74b7792f0fcae41f7c7da524527b7261a3fd68c4.tar.bz2
binutils-gdb-74b7792f0fcae41f7c7da524527b7261a3fd68c4.zip
Purge (almost) make_cleanup_func.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index eefd556fba5..4c11f44022f 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -156,6 +156,7 @@ static void add_aexpr PARAMS ((struct collection_list *, struct agent_expr *));
static unsigned char *mem2hex (unsigned char *, unsigned char *, int);
static void add_register PARAMS ((struct collection_list * collection,
unsigned int regno));
+static struct cleanup *make_cleanup_free_actions (struct tracepoint *t);
static void free_actions_list PARAMS ((char **actions_list));
static void free_actions_list_cleanup_wrapper PARAMS ((void *));
@@ -854,7 +855,7 @@ read_actions (t)
signal (STOP_SIGNAL, stop_sig);
}
#endif
- old_chain = make_cleanup ((make_cleanup_func) free_actions, (void *) t);
+ old_chain = make_cleanup_free_actions (t);
while (1)
{
/* Make sure that all output has been output. Some machines may let
@@ -1063,6 +1064,18 @@ free_actions (t)
t->actions = NULL;
}
+static void
+do_free_actions_cleanup (void *t)
+{
+ free_actions (t);
+}
+
+static struct cleanup *
+make_cleanup_free_actions (struct tracepoint *t)
+{
+ return make_cleanup (do_free_actions_cleanup, t);
+}
+
struct memrange
{
int type; /* 0 for absolute memory range, else basereg number */
@@ -1587,8 +1600,7 @@ encode_actions (t, tdp_actions, stepping_actions)
struct agent_reqs areqs;
exp = parse_exp_1 (&action_exp, block_for_pc (t->address), 1);
- old_chain = make_cleanup ((make_cleanup_func)
- free_current_contents, &exp);
+ old_chain = make_cleanup (free_current_contents, &exp);
switch (exp->elts[0].opcode)
{