aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2014-07-17 02:38:32 -0700
committerDoug Evans <dje@google.com>2014-07-17 02:38:32 -0700
commitb8b8facf90dda8363c989c263715d46125b2c301 (patch)
tree89cfec6a855c82538236af8d1a6fc3df8542c875 /gdb/testsuite
parent93c3fd0ec85cf35c87917a0ac48f10bfc3e6cc9f (diff)
downloadgdb-b8b8facf90dda8363c989c263715d46125b2c301.zip
gdb-b8b8facf90dda8363c989c263715d46125b2c301.tar.gz
gdb-b8b8facf90dda8363c989c263715d46125b2c301.tar.bz2
Fix 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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/maint.exp5
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0d0c9a9..59af12f 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-17 Doug Evans <dje@google.com>
+
+ * gdb.base/maint.exp: Update testing of per-command stats.
+
2014-07-16 Pedro Alves <palves@redhat.com>
* gdb.trace/tfile.c: Include unistd.h and stdint.h.
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 64753b7..21d0a31 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -130,10 +130,11 @@ gdb_expect {
# tests here!!
gdb_test_no_output "maint check-symtabs"
+# Test per-command stats.
gdb_test_no_output "maint set per-command on"
-
-gdb_test "maint set per-command off" \
+gdb_test "pwd" \
"Command execution time: \[0-9.\]+ \\(cpu\\), \[0-9.\]+ \\(wall\\)\[\r\n\]+Space used: $decimal \\(\\+$decimal for this command\\)\[\r\n\]+#symtabs: $decimal \\(\\+$decimal\\), #primary symtabs: $decimal \\(\\+$decimal\\), #blocks: $decimal \\(\\+$decimal\\)"
+gdb_test_no_output "maint set per-command off"
gdb_test "maint demangle" \
"\"maintenance demangle\" takes an argument to demangle\\."