diff options
author | Doug Evans <dje@google.com> | 2013-05-17 18:09:06 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-05-17 18:09:06 +0000 |
commit | 7d0c9981dc1753663969b47221164504e71676a6 (patch) | |
tree | 7b96437bee3ee6847a00c8cf6a8488cc901766ef /gdb/testsuite/gdb.base/maint.exp | |
parent | 8d324e832969c4334524c77df4f94fe54f45ad18 (diff) | |
download | gdb-7d0c9981dc1753663969b47221164504e71676a6.zip gdb-7d0c9981dc1753663969b47221164504e71676a6.tar.gz gdb-7d0c9981dc1753663969b47221164504e71676a6.tar.bz2 |
* NEWS: Mention new maintenance commands check-symtabs, and
expand-symtabs, and renamed check-psymtabs.
* psymtab.c (maintenance_check_psymtabs): Renamed from
maintenance_check_symtabs. Only process already-expanded symbol
tables.
(_initialize_psymtab): Update.
* symmisc.c (maintenance_check_symtabs): New function.
(maintenance_expand_name_matcher): New function
(maintenance_expand_file_matcher): New function
(maintenance_expand_symtabs): New function.
(_initialize_symmisc): Add "mt check-symtabs" and "mt expand-symtabs"
commands.
doc/
* gdb.texinfo (Maintenance Commands): Update doc for
"maint check-psymtabs". Add doc for "maint check-symtabs",
"maint expand-symtabs".
testsuite/
* gdb.base/maint.exp: Update test for "maint check-psymtabs".
Add tests for "maint check-symtabs", "maint expand-symtabs".
Diffstat (limited to 'gdb/testsuite/gdb.base/maint.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/maint.exp | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index dc59b72..9609038 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -20,7 +20,9 @@ # source file used is break.c -#maintenance check-symtabs -- Check consistency of psymtabs and symtabs +#maintenance check-psymtabs -- Check consistency of psymtabs vs symtabs +#maintenance check-symtabs -- Check consistency of symtabs +#maintenance expand-symtabs -- Expand symtabs matching a file regexp #maintenance set -- Set GDB internal variables used by the GDB maintainer #maintenance show -- Show GDB internal variables used by the GDB maintainer #maintenance demangle -- Demangle a C++ mangled name @@ -82,6 +84,18 @@ gdb_file_cmd ${binfile} # program wasn't running. gdb_test "maint print registers" "Name.*Nr.*Rel.*Offset.*Size.*Type.*" +# Test "mt expand-symtabs" here as it's easier to verify before we +# run the program. +gdb_test_no_output "mt set per on" "mt set per on for expand-symtabs" +gdb_test_multiple "mt expand-symtabs $subdir/break\[.\]c$" \ + "mt expand-symtabs" { + -re "#primary symtabs: 1 \\(\[+\]1\\),.*$gdb_prompt $" { + # This should expand exactly one (primary) symtab. + pass "mt expand-symtabs" + } + } +gdb_test "mt set per off" ".*" "mt set per off for expand-symtabs" + # Tests that can or should be done with a running program gdb_load ${binfile} @@ -110,20 +124,25 @@ gdb_test_multiple "maint info sections .gdb_index" "check for .gdb_index" { # guo: on linux this command output is huge. for some reason splitting up # the regexp checks works. # -send_gdb "maint check-symtabs\n" +send_gdb "maint check-psymtabs\n" gdb_expect { - -re "^maint check-symtabs" { + -re "^maint check-psymtabs" { gdb_expect { -re "$gdb_prompt $" { - pass "maint check-symtabs" + pass "maint check-psymtabs" } - timeout { fail "(timeout) maint check-symtabs" } + timeout { fail "(timeout) maint check-psymtabs" } } } - -re ".*$gdb_prompt $" { fail "maint check-symtabs" } - timeout { fail "(timeout) maint check-symtabs" } + -re ".*$gdb_prompt $" { fail "maint check-psymtabs" } + timeout { fail "(timeout) maint check-psymtabs" } } +# This command does not produce any output unless there is some problem +# with the symtabs, so that branch will really never be covered in the +# tests here!! +gdb_test_no_output "maint check-symtabs" + gdb_test_no_output "maint set per-command on" gdb_test "maint set per-command off" \ |