summaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2000-03-30 18:54:28 +0000
committerMichael Snyder <msnyder@vmware.com>2000-03-30 18:54:28 +0000
commit57e687d9ad2a45b16a54b43edabcaa055a9244a6 (patch)
tree62173e842781b54e28c4139b69926076a63021de /gdb/infcmd.c
parent59233f88f1c34b39c2d61714fa144c8573583d55 (diff)
downloadbinutils-gdb-57e687d9ad2a45b16a54b43edabcaa055a9244a6.tar.gz
2000-03-30 Michael Snyder <msnyder@cleaver.cygnus.com>
* defs.h (struct continuation_arg): make 'data' a union, to avoid casting problems when int and pointer are not the same size. * event-top.c (command_handler): use data as a union. (command_line_handler_continuation): ditto. * infcmd.c (step_1_continuation): use data as a union. Re-indent. (step_once): ditto. (finish_command_continuation): ditto. (finish_command): ditto. * breakpoint.c (until_break_command): use data as a union. (until_break_command_continuation): ditto. * utils.c (add_intermediate_continuation): fix typo in comment.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 84bc9204bbf..06439d0248d 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -576,27 +576,27 @@ static void
step_1_continuation (arg)
struct continuation_arg *arg;
{
- int count;
- int skip_subroutines;
- int single_inst;
-
- skip_subroutines = (int) arg->data;
- single_inst = (int) (arg->next)->data;
- count = (int) ((arg->next)->next)->data;
-
- if (stop_step)
- {
- /* FIXME: On nexti, this may have already been done (when we hit the
- step resume break, I think). Probably this should be moved to
- wait_for_inferior (near the top). */
+ int count;
+ int skip_subroutines;
+ int single_inst;
+
+ skip_subroutines = arg->data.integer;
+ single_inst = arg->next->data.integer;
+ count = arg->next->next->data.integer;
+
+ if (stop_step)
+ {
+ /* FIXME: On nexti, this may have already been done (when we hit the
+ step resume break, I think). Probably this should be moved to
+ wait_for_inferior (near the top). */
#if defined (SHIFT_INST_REGS)
- SHIFT_INST_REGS ();
+ SHIFT_INST_REGS ();
#endif
- step_once (skip_subroutines, single_inst, count - 1);
- }
- else
- if (!single_inst || skip_subroutines)
- do_exec_cleanups (ALL_CLEANUPS);
+ step_once (skip_subroutines, single_inst, count - 1);
+ }
+ else
+ if (!single_inst || skip_subroutines)
+ do_exec_cleanups (ALL_CLEANUPS);
}
/* Do just one step operation. If count >1 we will have to set up a
@@ -662,11 +662,11 @@ which has no line number information.\n", name);
arg3 =
(struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
arg1->next = arg2;
- arg1->data = (PTR) skip_subroutines;
+ arg1->data.integer = skip_subroutines;
arg2->next = arg3;
- arg2->data = (PTR) single_inst;
+ arg2->data.integer = single_inst;
arg3->next = NULL;
- arg3->data = (PTR) count;
+ arg3->data.integer = count;
add_intermediate_continuation (step_1_continuation, arg1);
proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
}
@@ -1108,9 +1108,9 @@ finish_command_continuation (arg)
struct breakpoint *breakpoint;
struct cleanup *cleanups;
- breakpoint = (struct breakpoint *) arg->data;
- function = (struct symbol *) (arg->next)->data;
- cleanups = (struct cleanup *) (arg->next->next)->data;
+ breakpoint = (struct breakpoint *) arg->data.pointer;
+ function = (struct symbol *) arg->next->data.pointer;
+ cleanups = (struct cleanup *) arg->next->next->data.pointer;
if (bpstat_find_breakpoint (stop_bpstat, breakpoint) != NULL
&& function != 0)
@@ -1225,9 +1225,9 @@ finish_command (arg, from_tty)
arg1->next = arg2;
arg2->next = arg3;
arg3->next = NULL;
- arg1->data = (PTR) breakpoint;
- arg2->data = (PTR) function;
- arg3->data = (PTR) old_chain;
+ arg1->data.pointer = breakpoint;
+ arg2->data.pointer = function;
+ arg3->data.pointer = old_chain;
add_continuation (finish_command_continuation, arg1);
}