Add timestamps to "maint time" output
Currently "maint time" will print the amount of time a command took. Sometimes, though, it's useful to have a timestamp as well -- for example if one is correlating a gdb log with some other log. This patch adds a timestamp to the start and end of each command when this setting is in effect. This also removes a "//" comment and changes scoped_command_stats to use DISABLE_COPY_AND_ASSIGN; two minor things I noticed while working on the patch. Tested on x86-64 Fedora 29. gdb/ChangeLog 2019-06-06 Tom Tromey <tromey@adacore.com> * maint.h (class scoped_command_stats): Use DISABLE_COPY_AND_ASSIGN. <print_time>: New method. * maint.c (scoped_command_stats, ~scoped_command_stats): Call print_time. (scoped_command_stats::print_time): New method. gdb/testsuite/ChangeLog 2019-06-06 Tom Tromey <tromey@adacore.com> * gdb.base/maint.exp: Expect command started/finished output.
Showing
- gdb/ChangeLog 9 additions, 0 deletionsgdb/ChangeLog
- gdb/maint.c 25 additions, 0 deletionsgdb/maint.c
- gdb/maint.h 4 additions, 3 deletionsgdb/maint.h
- gdb/testsuite/ChangeLog 4 additions, 0 deletionsgdb/testsuite/ChangeLog
- gdb/testsuite/gdb.base/maint.exp 5 additions, 2 deletionsgdb/testsuite/gdb.base/maint.exp
Loading
Please register or sign in to comment