This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

src/gdb ChangeLog defs.h event-top.c main.c ma ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	hilfingr@sourceware.org	2010-06-26 06:44:47

Modified files:
	gdb            : ChangeLog defs.h event-top.c main.c maint.c 
	                 top.c utils.c 
	gdb/testsuite  : ChangeLog 
	gdb/testsuite/gdb.gdb: selftest.exp 

Log message:
	Refactor 'maint time' command statistics.
	
	Consolidate code for displaying per-command time and space statistics to avoid
	duplication.  Piggyback on cleanups so that statistics get printed even when
	commands terminate as a result of an error.
	
	Changelog
	
	* gdb/defs.h (make_command_stats_cleanup): Declare.
	(set_display_time): Declare.
	(set_display_space): Declare.
	* gdb/event-top.c (command_handler): Use make_command_stats_cleanup.
	* gdb/main.c (display_time, display_space): Move definitions to utils.c.
	(captured_main): Use make_command_stats_cleanup to get start-up
	statistics.
	Use set_display_time and set_display_space for processing OPT_STATISTICS
	case.
	* gdb/maint.c (maintenance_time_display): Use set_display_time.
	(maintenance_space_display): Use set_display_space.
	* gdb/top.c (execute_command): Remove obsolete 'maint time' code.
	(command_loop): Use make_command_stats_cleanup.
	* gdb/utils.c (struct cmd_stats): Structure for storing initial time
	and space usage.
	(display_time, display_space): Move definitions here from utils.c.
	(set_display_time): New function.
	(set_display_space): New function.
	(make_command_stats_cleanup): New function.
	(report_command_stats): New auxiliary function for
	make_command_stats_cleanup.
	* gdb/testsuite/gdb.gdb/selftest.exp: Adjust expected message for
	capturing start-up runtime.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11933&r2=1.11934
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/defs.h.diff?cvsroot=src&r1=1.274&r2=1.275
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/event-top.c.diff?cvsroot=src&r1=1.71&r2=1.72
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/main.c.diff?cvsroot=src&r1=1.85&r2=1.86
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/maint.c.diff?cvsroot=src&r1=1.77&r2=1.78
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/top.c.diff?cvsroot=src&r1=1.180&r2=1.181
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/utils.c.diff?cvsroot=src&r1=1.235&r2=1.236
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.2353&r2=1.2354
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.gdb/selftest.exp.diff?cvsroot=src&r1=1.23&r2=1.24


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]