Fix PR gdb/17170.

	* maint.c (count_symtabs_and_blocks): Handle NULL
	current_program_space.
	(report_command_stats): Check global enabled flag in addition to
	recorded enabled flag.
	(make_command_stats_cleanup): Handle msg_type == 0, startup.

	testsuite/
	* gdb.base/maint.exp: Update testing of per-command stats.
PR 17170 - testcase for GDB global --statistics regression.

gdb/testsuite/
2014-07-17  Jan Kratochvil  <jan.kratochvil@redhat.com>

	PR gdb/17170
	* gdb.base/statistics.exp: New file.

Message-ID: <20140712174217.GA1478@host2.jankratochvil.net>
Automatic date update in version.in