|
16 | 16 | # This test checks that the index-cache feature generates the expected files at
|
17 | 17 | # the expected location.
|
18 | 18 |
|
19 |
| -standard_testfile |
| 19 | +standard_testfile .c -2.c |
20 | 20 |
|
21 |
| -if { [build_executable "failed to prepare" $testfile $srcfile \ |
| 21 | +if { [build_executable "failed to prepare" $testfile [list $srcfile $srcfile2] \ |
22 | 22 | {debug ldflags=-Wl,--build-id}] } {
|
23 | 23 | return
|
24 | 24 | }
|
@@ -147,6 +147,12 @@ proc_with_prefix test_cache_disabled { cache_dir test_prefix } {
|
147 | 147 | gdb_assert "$nfiles_created == 0" "no files were created"
|
148 | 148 |
|
149 | 149 | check_cache_stats 0 0
|
| 150 | + |
| 151 | + # Trigger expansion of symtab containing main, if not already done. |
| 152 | + gdb_test "ptype main" "^type = int \\(void\\)" |
| 153 | + |
| 154 | + # Trigger expansion of symtab not containing main. |
| 155 | + gdb_test "ptype foo" "^type = int \\(void\\)" |
150 | 156 | }
|
151 | 157 | }
|
152 | 158 | }
|
@@ -192,6 +198,12 @@ proc_with_prefix test_cache_enabled_miss { cache_dir } {
|
192 | 198 | } else {
|
193 | 199 | check_cache_stats 0 0
|
194 | 200 | }
|
| 201 | + |
| 202 | + # Trigger expansion of symtab containing main, if not already done. |
| 203 | + gdb_test "ptype main" "^type = int \\(void\\)" |
| 204 | + |
| 205 | + # Trigger expansion of symtab not containing main. |
| 206 | + gdb_test "ptype foo" "^type = int \\(void\\)" |
195 | 207 | }
|
196 | 208 | }
|
197 | 209 |
|
@@ -221,6 +233,12 @@ proc_with_prefix test_cache_enabled_hit { cache_dir } {
|
221 | 233 | } else {
|
222 | 234 | check_cache_stats 0 0
|
223 | 235 | }
|
| 236 | + |
| 237 | + # Trigger expansion of symtab containing main, if not already done. |
| 238 | + gdb_test "ptype main" "^type = int \\(void\\)" |
| 239 | + |
| 240 | + # Trigger expansion of symtab not containing main. |
| 241 | + gdb_test "ptype foo" "^type = int \\(void\\)" |
224 | 242 | }
|
225 | 243 | }
|
226 | 244 |
|
|
0 commit comments