diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-05-05 09:47:47 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-05-05 09:47:47 +0000 |
commit | e2b7ddeae30ddeb4056206b07d075e65bdf286ba (patch) | |
tree | e8b41eb2ce8f772af4e0d360a88e2cdf9193d23d | |
parent | ccd2d1c8798f98e34d5d32ed7a32f83c25740aa8 (diff) | |
download | gdb-e2b7ddeae30ddeb4056206b07d075e65bdf286ba.zip gdb-e2b7ddeae30ddeb4056206b07d075e65bdf286ba.tar.gz gdb-e2b7ddeae30ddeb4056206b07d075e65bdf286ba.tar.bz2 |
* top.c (command_line_handler_continuation): Remove.
(execute_command): Do not install the above.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 4 | ||||
-rw-r--r-- | gdb/top.c | 55 |
4 files changed, 14 insertions, 55 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 42155fc..0302842 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2008-05-05 Vladimir Prus <vladimir@codesourcery.com> + * top.c (command_line_handler_continuation): Remove. + (execute_command): Do not install the above. + +2008-05-05 Vladimir Prus <vladimir@codesourcery.com> + * inf-loop.c (inferior_event_handler): Call bpstat_do_action, and catch all exceptions from it. * top.c (command_line_handler_continuation): Don't diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 75fb3ce..f371b21 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2008-05-05 Vladimir Prus <vladimir@codesourcery.com> + + * gdb.texinfo (Maintenance Commands): Clarify that "maint time" + will not report the time of commands that run the target. + 2008-05-03 Vladimir Prus <vladimir@codesourcery.com> * gdb.texinfo (GDB/MI Output Records): Add diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 957962c..f4b9417 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -23437,6 +23437,10 @@ switch (@pxref{Mode Options}). Control whether to display the execution time for each command. If set to a nonzero value, @value{GDBN} will display how much time it took to execute each command, following the command's own output. +The time is not printed for the commands that run the target, since +there's no mechanism currently to compute how much time was spend +by @value{GDBN} and how much time was spend by the program been debugged. +it's not possibly currently This can also be requested by invoking @value{GDBN} with the @option{--statistics} command-line switch (@pxref{Mode Options}). @@ -364,43 +364,6 @@ do_chdir_cleanup (void *old_dir) } #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. */ -static void -command_line_handler_continuation (struct continuation_arg *arg, int error) -{ - extern int display_time; - extern int display_space; - - long time_at_cmd_start = arg->data.longint; - long space_at_cmd_start = arg->next->data.longint; - - if (error) - return; - - 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 - char *lim = (char *) sbrk (0); - long space_now = lim - lim_at_start; - 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 - } -} - /* Execute the line P as a command. Pass FROM_TTY as second argument to the defining function. */ @@ -534,24 +497,6 @@ execute_command (char *p, int from_tty) warned = 1; } } - - /* Set things up for this function to be compete later, once the - execution has completed, if we are doing an execution command, - otherwise, just go ahead and finish. */ - if (target_can_async_p () && 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.longint = time_at_cmd_start; -#ifdef HAVE_SBRK - arg2->data.longint = space_at_cmd_start; -#endif - add_continuation (command_line_handler_continuation, arg1); - } } /* Read commands from `instream' and execute them |