diff options
author | Doug Evans <xdje42@gmail.com> | 2015-02-22 09:11:55 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2015-02-22 09:11:55 -0800 |
commit | 85c3a371b327377ba1014e8962ba41554599d3e6 (patch) | |
tree | 710f46042d9cc4a0905426092528d800bd04b9a5 /gdb/testsuite/gdb.ada | |
parent | 96553a0cffb30d2ac6068eb71bed38ea7432073b (diff) | |
download | gdb-85c3a371b327377ba1014e8962ba41554599d3e6.zip gdb-85c3a371b327377ba1014e8962ba41554599d3e6.tar.gz gdb-85c3a371b327377ba1014e8962ba41554599d3e6.tar.bz2 |
testcase for PR symtab/17855
gdb/testsuite/ChangeLog:
PR symtab/17855
* gdb.ada/exec_changed.exp: Add second test where symbol lookup cache
is read after symbols have been re-read.
* gdb.ada/exec_changed/first.adb (First): New procedure Break_Me.
* gdb.ada/exec_changed/second.adb (Second): Ditto.
Diffstat (limited to 'gdb/testsuite/gdb.ada')
-rw-r--r-- | gdb/testsuite/gdb.ada/exec_changed.exp | 27 | ||||
-rw-r--r-- | gdb/testsuite/gdb.ada/exec_changed/first.adb | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.ada/exec_changed/second.adb | 8 |
3 files changed, 41 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp index 5708558..3f439eb 100644 --- a/gdb/testsuite/gdb.ada/exec_changed.exp +++ b/gdb/testsuite/gdb.ada/exec_changed.exp @@ -81,3 +81,30 @@ if { [gdb_start_cmd] < 0 } { "second \\(\\) at .*second.adb.*" \ "start second" } + +# Try again, this time with just changing the file time of first. + +clean_restart "${binfile}$EXEEXT" + +# Ensure we don't accidently use the main symbol cache. +gdb_test_no_output "mt set symbol-cache-size 0" + +# Put something in the symbol lookup cache that will get looked up when +# starting after having re-read symbols. PR 17855. +gdb_breakpoint break_me + +gdb_test "shell touch ${binfile}$EXEEXT" ".*" "" +gdb_test "shell sleep 1" ".*" "" + +if { [gdb_start_cmd] < 0 } { + # PR 17855: At this point gdb may have crashed or gotten an internal + # error, but we still need to detect this. Just issue any simple command + # to verify gdb is still running. This will establish in gdb.log whether + # gdb is still running. + gdb_test_no_output "set \$check_gdb_running = 0" "check gdb running" + fail "start just first" +} else { + gdb_test "" \ + "first \\(\\) at .*first.adb.*" \ + "start just first" +} diff --git a/gdb/testsuite/gdb.ada/exec_changed/first.adb b/gdb/testsuite/gdb.ada/exec_changed/first.adb index 459a65e..184ef61 100644 --- a/gdb/testsuite/gdb.ada/exec_changed/first.adb +++ b/gdb/testsuite/gdb.ada/exec_changed/first.adb @@ -14,6 +14,12 @@ -- along with this program. If not, see <http://www.gnu.org/licenses/>. procedure First is + + procedure Break_Me is + begin + null; + end Break_Me; + begin - null; + Break_Me; end First; diff --git a/gdb/testsuite/gdb.ada/exec_changed/second.adb b/gdb/testsuite/gdb.ada/exec_changed/second.adb index 73fa342..36f9471 100644 --- a/gdb/testsuite/gdb.ada/exec_changed/second.adb +++ b/gdb/testsuite/gdb.ada/exec_changed/second.adb @@ -14,6 +14,12 @@ -- along with this program. If not, see <http://www.gnu.org/licenses/>. procedure Second is + + procedure Break_Me is + begin + null; + end Break_Me; + begin - null; + Break_Me; end Second; |