- /* Set things up for this function to be compete later, once the
- executin has completed, if we are doing an execution command,
- otherwise, just go ahead and finish. */
- if (target_has_async && target_executing)
- {
- arg1 =
- (struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
- arg2 =
- (struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
- arg1->next = arg2;
- arg2->next = NULL;
- arg1->data = (PTR) time_at_cmd_start;
- arg2->data = (PTR) space_at_cmd_start;
- add_continuation (command_line_handler_continuation, arg1);
- }
-
- /* Do any commands attached to breakpoint we stopped at. Only if we
- are always running synchronously. Or if we have just executed a
- command that doesn't start the target. */
- if (!target_has_async || !target_executing)
- {
- bpstat_do_actions (&stop_bpstat);
- do_cleanups (old_chain);
-
- if (display_time)
- {
- long cmd_time = get_run_time () - time_at_cmd_start;
-
- printf_unfiltered ("Command execution time: %ld.%06ld\n",
- cmd_time / 1000000, cmd_time % 1000000);
- }
-
- if (display_space)
- {
-#ifdef HAVE_SBRK
- extern char **environ;
- char *lim = (char *) sbrk (0);
- long space_now = lim - (char *) &environ;
- long space_diff = space_now - space_at_cmd_start;
-
- printf_unfiltered ("Space used: %ld (%c%ld for this command)\n",
- space_now,
- (space_diff >= 0 ? '+' : '-'),
- space_diff);
-#endif
- }
- }
-}
-
-/* Do any commands attached to breakpoint we stopped at. Only if we
- are always running synchronously. Or if we have just executed a
- command that doesn't start the target. */
-void
-command_line_handler_continuation (arg)
- struct continuation_arg *arg;
-{
- extern int display_time;
- extern int display_space;
-
- long time_at_cmd_start = (long) arg->data;
- long space_at_cmd_start = (long) arg->next->data;
-
- bpstat_do_actions (&stop_bpstat);
- /*do_cleanups (old_chain); *//*?????FIXME????? */