diff options
author | Tom de Vries <tdevries@suse.de> | 2019-06-21 23:56:18 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2019-06-21 23:56:18 +0200 |
commit | c596f180a130c85faf8942d161be9ecf71c6791c (patch) | |
tree | 4645c18fb7642c957d7863b3c45807730fce4649 | |
parent | ad692897c12247d1f8fe4e6a2f6e6d9f22703170 (diff) | |
download | gdb-c596f180a130c85faf8942d161be9ecf71c6791c.zip gdb-c596f180a130c85faf8942d161be9ecf71c6791c.tar.gz gdb-c596f180a130c85faf8942d161be9ecf71c6791c.tar.bz2 |
[gdb/testsuite] Compile index-cache.c with -Wl,--build-id
When testing gdb.base/index-cache.exp using a gcc build without
--enable-linker-build-id we get:
...
FAIL: gdb.base/index-cache.exp: \
test_cache_enabled_miss: at least one file was created
FAIL: gdb.base/index-cache.exp: \
test_cache_enabled_miss: couldn't get executable build id
FAIL: gdb.base/index-cache.exp: \
test_cache_enabled_hit: check index-cache stats
...
With "set debug index-cache on" we find:
...
(gdb) file index-cache
Reading symbols from index-cache...
index cache: objfile index-cache has no build id
...
The problem is that a build-id is required for the index-cache functionality.
Fix this by compiling index-cache.c with -Wl,--build-id.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-06-21 Tom de Vries <tdevries@suse.de>
* gdb.base/index-cache.exp: Add additional_flags=-Wl,--build-id.
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/index-cache.exp | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d4e7d8b..8cd3c51 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2019-06-21 Tom de Vries <tdevries@suse.de> + * gdb.base/index-cache.exp: Add additional_flags=-Wl,--build-id. + +2019-06-21 Tom de Vries <tdevries@suse.de> + PR testsuite/24518 PR ada/24713 * gdb.ada/ptype_union.exp: Mark as unsupported if executable contains diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp index 075dffe..6f1488e 100644 --- a/gdb/testsuite/gdb.base/index-cache.exp +++ b/gdb/testsuite/gdb.base/index-cache.exp @@ -18,7 +18,8 @@ standard_testfile -if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { +if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ + {additional_flags=-Wl,--build-id}] } { return } |