aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-08-04 15:05:57 +0200
committerTom de Vries <tdevries@suse.de>2023-08-04 15:05:57 +0200
commitbabce214ecb2a093606186a3f82d579cb026a925 (patch)
treecdc67b37da3d6158513944adc12f866c050a0979
parent1f83e2cd3f512f68751b76d1cb5dd1e38a5a2fbf (diff)
downloadgdb-babce214ecb2a093606186a3f82d579cb026a925.zip
gdb-babce214ecb2a093606186a3f82d579cb026a925.tar.gz
gdb-babce214ecb2a093606186a3f82d579cb026a925.tar.bz2
[gdb/testsuite] Extend gdb.base/index-cache.exp further
Add lookup of a non-existing symbol to test-case gdb.base/index-cache.exp. This serves as regression test for PR symtab/30718. PR symtab/30718 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30718
-rw-r--r--gdb/testsuite/gdb.base/index-cache.exp9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp
index 1379a04..22f7a54 100644
--- a/gdb/testsuite/gdb.base/index-cache.exp
+++ b/gdb/testsuite/gdb.base/index-cache.exp
@@ -152,6 +152,9 @@ proc_with_prefix test_cache_disabled { cache_dir test_prefix } {
# Trigger expansion of symtab not containing main.
gdb_test "ptype foo" "^type = int \\(void\\)"
+ # Look for non-existent function.
+ gdb_test "ptype foobar" "^No symbol \"foobar\" in current context\\."
+
check_cache_stats 0 0
}
}
@@ -199,6 +202,9 @@ proc_with_prefix test_cache_enabled_miss { cache_dir } {
# Trigger expansion of symtab not containing main.
gdb_test "ptype foo" "^type = int \\(void\\)"
+ # Look for non-existent function.
+ gdb_test "ptype foobar" "^No symbol \"foobar\" in current context\\."
+
if { $expecting_index_cache_use } {
check_cache_stats 0 1
} else {
@@ -234,6 +240,9 @@ proc_with_prefix test_cache_enabled_hit { cache_dir } {
# Trigger expansion of symtab not containing main.
gdb_test "ptype foo" "^type = int \\(void\\)"
+ # Look for non-existent function.
+ gdb_test "ptype foobar" "^No symbol \"foobar\" in current context\\."
+
if { $expecting_index_cache_use } {
check_cache_stats 1 0
} else {