diff options
author | Pedro Alves <palves@redhat.com> | 2008-07-12 19:07:38 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-07-12 19:07:38 +0000 |
commit | bfec99b27cdfd81789214ba9e7b648c9d0dccb77 (patch) | |
tree | 6c9770b500b23109a20f2605099ab27f311e5c2a /gdb/utils.c | |
parent | 2afb61aa0b5671f860be9d5185ae1c53abb2aa07 (diff) | |
download | gdb-bfec99b27cdfd81789214ba9e7b648c9d0dccb77.zip gdb-bfec99b27cdfd81789214ba9e7b648c9d0dccb77.tar.gz gdb-bfec99b27cdfd81789214ba9e7b648c9d0dccb77.tar.bz2 |
Replace struct continuation_args by void* and per command structs.
* top.c (execute_command): Remove unused arg1 and arg2 locals.
* breakpoint.c (struct until_break_command_continuation_args):
New.
(until_break_command_continuation): Take a void* instead of a
continuations_arg. Adjust.
(until_break_command): Adjust to use struct
until_break_command_continuation_args instead of struct
continuation_arg.
* infcmd.c (struct step_1_continuation_args): New.
(step_1_continuation): Take a void* instead of a
continuations_arg. Adjust to use struct step_1_continuation_args.
(step_once): Adjust to use struct step_1_continuation_args.
(struct finish_command_continuation_args): New.
(finish_command_continuation): Take a void* instead of a
continuations_arg. Adjust to use struct
finish_command_continuation_args.
(finish_command): Adjust to use struct
finish_command_continuation_args.
(struct attach_command_continuation_args): New.
(attach_command_continuation): Take a void* instead of a
continuations_arg. Adjust to use struct
attach_command_continuation_args.
(attach_command): Adjust to use struct
attach_command_continuation_args.
* defs.h (struct continuation_arg): Delete.
(struct continuation): Replace the struct continuation_arg*
parameter of continuation_hook by a void*. Replace "arg_list"
member by a new "args" member with void* type.
(add_continuation, add_intermediate_continuation): Replace struct
continuation_arg type usages by void* usages.
* utils.c (add_continuation, do_all_continuations)
(add_intermediate_continuation)
(do_all_intermediate_continuations): Replace struct
continuation_arg type usages by void* usages. Pass "args" instead
of "arg_list".
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index e1901d1..7f8446b 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -473,15 +473,14 @@ null_cleanup (void *arg) /* Add a continuation to the continuation list, the global list cmd_continuation. The new continuation will be added at the front.*/ void -add_continuation (void (*continuation_hook) (struct continuation_arg *, int), - struct continuation_arg *arg_list) +add_continuation (void (*continuation_hook) (void *, int), void *args) { struct continuation *continuation_ptr; continuation_ptr = (struct continuation *) xmalloc (sizeof (struct continuation)); continuation_ptr->continuation_hook = continuation_hook; - continuation_ptr->arg_list = arg_list; + continuation_ptr->args = args; continuation_ptr->next = cmd_continuation; cmd_continuation = continuation_ptr; } @@ -510,7 +509,7 @@ do_all_continuations (int error) /* Work now on the list we have set aside. */ while (continuation_ptr) { - (continuation_ptr->continuation_hook) (continuation_ptr->arg_list, error); + (continuation_ptr->continuation_hook) (continuation_ptr->args, error); saved_continuation = continuation_ptr; continuation_ptr = continuation_ptr->next; xfree (saved_continuation); @@ -537,15 +536,14 @@ discard_all_continuations (void) the front. */ void add_intermediate_continuation (void (*continuation_hook) - (struct continuation_arg *, int), - struct continuation_arg *arg_list) + (void *, int), void *args) { struct continuation *continuation_ptr; continuation_ptr = (struct continuation *) xmalloc (sizeof (struct continuation)); continuation_ptr->continuation_hook = continuation_hook; - continuation_ptr->arg_list = arg_list; + continuation_ptr->args = args; continuation_ptr->next = intermediate_continuation; intermediate_continuation = continuation_ptr; } @@ -574,7 +572,7 @@ do_all_intermediate_continuations (int error) /* Work now on the list we have set aside. */ while (continuation_ptr) { - (continuation_ptr->continuation_hook) (continuation_ptr->arg_list, error); + (continuation_ptr->continuation_hook) (continuation_ptr->args, error); saved_continuation = continuation_ptr; continuation_ptr = continuation_ptr->next; xfree (saved_continuation); |