From: Tom de Vries <tdevries@suse.de>
To: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: Re: [PATCH][gdb/testsuite] Compile index-cache.c with -Wl,--build-id
Date: Fri, 21 Jun 2019 16:51:00 -0000 [thread overview]
Message-ID: <9b311104-070a-552d-c66c-dcc199909fa2@suse.de> (raw)
In-Reply-To: <e3c1ae7a-66e3-f587-8633-1147e7c5cc2b@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]
[ENOPATCH]
On 21-06-19 18:50, Tom de Vries wrote:
> On 21-06-19 18:32, Pedro Alves wrote:
>> On 6/21/19 4:54 PM, Tom de Vries wrote:
>>> On 21-06-19 17:47, Pedro Alves wrote:
>>>> On 6/21/19 4:27 PM, Tom de Vries wrote:
>>>>> Hi,
>>>>>
>>>>> When building gdb using a combined gcc/binutils-gdb build and running
>>>>> gdb.base/index-cache.exp 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 get:
>>>>> ...
>>>>> (gdb) file index-cache
>>>>> Reading symbols from index-cache...
>>>>> index cache: objfile index-cache has no build id
>>>>> ...
>>>>>
>>>>> The problem is that the vanilla toolchain does not add a build-id, which is
>>>>> required for the index-cache functionality.
>>>>
>>>> What is "vanilla" here? A non-combined gcc/build-gdb build?
>>>> Or is "combined gcc/build-gdb build" irrelevant here, and
>>>> "vanilla" means "no-distro-patches build"?
>>>
>>> The latter.
>>
>> OK. Please tweak the commit log in that direction then.
>>
>> The fix LGTM too.
>
> Thanks for the review, I've updated the rationale.
>
> I'll commit in a bit unless there are further comments.
>
[-- Attachment #2: 0001-gdb-testsuite-Compile-index-cache.c-with-Wl-build-id.patch --]
[-- Type: text/x-patch, Size: 1451 bytes --]
[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.
---
gdb/testsuite/gdb.base/index-cache.exp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp
index 075dffe3f5..6f1488e037 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
}
next prev parent reply other threads:[~2019-06-21 16:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 15:27 Tom de Vries
2019-06-21 15:47 ` Pedro Alves
2019-06-21 15:53 ` Simon Marchi
2019-06-21 15:54 ` Tom de Vries
2019-06-21 16:32 ` Pedro Alves
2019-06-21 16:51 ` Tom de Vries
2019-06-21 16:51 ` Tom de Vries [this message]
2019-06-25 19:06 ` Testcase regression (gdb.base/index-cache.exp) on x86_64 (was: Re: [PATCH][gdb/testsuite] Compile index-cache.c with -Wl,--build-id) Sergio Durigan Junior
2019-06-26 3:55 ` [committed][gdb/testsuite] Add back missing debug for index-cache.exp Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9b311104-070a-552d-c66c-dcc199909fa2@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=simon.marchi@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox