aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.gdb/index-file.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.gdb/index-file.exp')
-rw-r--r--gdb/testsuite/gdb.gdb/index-file.exp16
1 files changed, 12 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.gdb/index-file.exp b/gdb/testsuite/gdb.gdb/index-file.exp
index 2252b79..5229446 100644
--- a/gdb/testsuite/gdb.gdb/index-file.exp
+++ b/gdb/testsuite/gdb.gdb/index-file.exp
@@ -30,9 +30,17 @@ if { $filename eq "" } {
return -1
}
+# If FILENAME is a libtool wrapper, then we need to get the path of the real
+# executable.
+set filename [selftest_libtool_get_real_gdb_executable $filename]
+if { $filename eq "" } {
+ return -1
+}
+
with_timeout_factor $timeout_factor {
# Start GDB, load FILENAME.
- clean_restart $filename
+ clean_restart
+ gdb_load $filename
}
# Record how many worker threads GDB is using.
@@ -99,7 +107,7 @@ proc check_symbol_table_usage { filename } {
_ _ _ symbol_table_offset shortcut_offset
# The length of the symbol hash table (in entries).
- set len [expr ($shortcut_offset - $symbol_table_offset) / 8]
+ set len [expr {($shortcut_offset - $symbol_table_offset) / 8}]
# Now walk the hash table and count how many entries are in use.
set offset $symbol_table_offset
@@ -119,7 +127,7 @@ proc check_symbol_table_usage { filename } {
close $fp
# Calculate how full the cache is.
- set pct [expr (100 * double($count)) / $len]
+ set pct [expr {(100 * double($count)) / $len}]
# Write our results out to the gdb.log.
verbose -log "Hash table size: $len"
@@ -145,7 +153,7 @@ if { $worker_threads > 1 } {
clean_restart
# Adjust the number of threads to use.
- set reduced_threads [expr $worker_threads / 2]
+ set reduced_threads [expr {$worker_threads / 2}]
gdb_test_no_output "maint set worker-threads $reduced_threads"
with_timeout_factor $timeout_factor {