summaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-02-23 20:12:13 +0000
committerAndrew Cagney <cagney@redhat.com>2002-02-23 20:12:13 +0000
commitc917c448616b73da20dce126b70cec3e6619f919 (patch)
tree19102bfb24580a962643c8ef03386c43d10e92e6 /gdb/tracepoint.c
parent9785f58c48b53ca9a23831a0bcf9e1b0134238da (diff)
downloadgdb-c917c448616b73da20dce126b70cec3e6619f919.tar.gz
* cli/cli-decode.c (cmd_cfunc_eq): New function.
* command.h (cmd_cfunc_eq): Declare. * cli/cli-decode.h (cmd_cfunc_eq): Ditto. * cli/cli-cmds.h (is_complete_command): Change parameter to a ``struct cmd_list_element *''. * cli/cli-cmds.c (is_complete_command): Update. Use cmd_cfunc_eq. * top.c (execute_command): Pass the command to is_complete_command. * tracepoint.c: Replace function.cfunc with cmd_cfunc_eq.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 1eb01ccb542..860b483ac43 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -939,7 +939,7 @@ validate_actionline (char **line, struct tracepoint *t)
return BADLINE;
}
- if (c->function.cfunc == collect_pseudocommand)
+ if (cmd_cfunc_eq (c, collect_pseudocommand))
{
struct agent_expr *aexpr;
struct agent_reqs areqs;
@@ -1006,7 +1006,7 @@ validate_actionline (char **line, struct tracepoint *t)
while (p && *p++ == ',');
return GENERIC;
}
- else if (c->function.cfunc == while_stepping_pseudocommand)
+ else if (cmd_cfunc_eq (c, while_stepping_pseudocommand))
{
char *steparg; /* in case warning is necessary */
@@ -1022,7 +1022,7 @@ validate_actionline (char **line, struct tracepoint *t)
}
return STEPPING;
}
- else if (c->function.cfunc == end_actions_pseudocommand)
+ else if (cmd_cfunc_eq (c, end_actions_pseudocommand))
return END;
else
{
@@ -1520,7 +1520,7 @@ encode_actions (struct tracepoint *t, char ***tdp_actions,
if (cmd == 0)
error ("Bad action list item: %s", action_exp);
- if (cmd->function.cfunc == collect_pseudocommand)
+ if (cmd_cfunc_eq (cmd, collect_pseudocommand))
{
do
{ /* repeat over a comma-separated list */
@@ -1630,11 +1630,11 @@ encode_actions (struct tracepoint *t, char ***tdp_actions,
}
while (action_exp && *action_exp++ == ',');
} /* if */
- else if (cmd->function.cfunc == while_stepping_pseudocommand)
+ else if (cmd_cfunc_eq (cmd, while_stepping_pseudocommand))
{
collect = &stepping_list;
}
- else if (cmd->function.cfunc == end_actions_pseudocommand)
+ else if (cmd_cfunc_eq (cmd, end_actions_pseudocommand))
{
if (collect == &stepping_list) /* end stepping actions */
collect = &tracepoint_list;
@@ -2315,9 +2315,9 @@ tracepoint_save_command (char *args, int from_tty)
cmd = lookup_cmd (&actionline, cmdlist, "", -1, 1);
if (cmd == 0)
error ("Bad action list item: %s", actionline);
- if (cmd->function.cfunc == while_stepping_pseudocommand)
+ if (cmd_cfunc_eq (cmd, while_stepping_pseudocommand))
indent = i2;
- else if (cmd->function.cfunc == end_actions_pseudocommand)
+ else if (cmd_cfunc_eq (cmd, end_actions_pseudocommand))
indent = i1;
}
}
@@ -2534,11 +2534,11 @@ trace_dump_command (char *args, int from_tty)
if (cmd == 0)
error ("Bad action list item: %s", action_exp);
- if (cmd->function.cfunc == while_stepping_pseudocommand)
+ if (cmd_cfunc_eq (cmd, while_stepping_pseudocommand))
stepping_actions = 1;
- else if (cmd->function.cfunc == end_actions_pseudocommand)
+ else if (cmd_cfunc_eq (cmd, end_actions_pseudocommand))
stepping_actions = 0;
- else if (cmd->function.cfunc == collect_pseudocommand)
+ else if (cmd_cfunc_eq (cmd, collect_pseudocommand))
{
/* Display the collected data.
For the trap frame, display only what was collected at the trap.