This is the mail archive of the gdb-testers@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]

[binutils-gdb] Change command stats reporting to use class


*** TEST RESULTS FOR COMMIT 1e3b796d58ac3c4396e1739f44a0a41de6335eef ***

Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 1e3b796d58ac3c4396e1739f44a0a41de6335eef

Change command stats reporting to use class

This removes make_command_stats_cleanup in favor of an RAII class.
The patch is reasonably straightforward, but keeping the same
semantics without excessive reindentation required splitting
captured_main in two.

2016-10-21  Tom Tromey  <tom@tromey.com>

	* maint.h (scoped_command_stats): New class.
	(make_command_stats_cleanup): Don't declare.
	* maint.c (struct cmd_stats): Remove.
	(~scoped_command_stats): Rename from report_command_stats.  Now a
	destructor.
	(scoped_command_stats): Rename from make_command_stats_cleanup.
	Now a constructor.
	* main.c (captured_main_1): New function.  Use
	scoped_command_stats.
	(captured_main): Call captured_main_1.
	* event-top.c (command_handler): Use scoped_command_stats.


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