This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb.trace: Add a testcase for tdesc in tfile.
- From: Antoine Tremblay <antoine dot tremblay at ericsson dot com>
- To: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- Cc: Antoine Tremblay <antoine dot tremblay at ericsson dot com>, Pedro Alves <palves at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Fri, 12 Feb 2016 13:57:08 -0500
- Subject: Re: [PATCH] gdb.trace: Add a testcase for tdesc in tfile.
- Authentication-results: sourceware.org; auth=none
- References: <56BB4004 dot 1090708 at redhat dot com> <1455185675-27574-1-git-send-email-koriakin at 0x04 dot net> <56BC85E8 dot 6010409 at redhat dot com> <56BC97F1 dot 3020108 at 0x04 dot net> <wwokk2m9srtx dot fsf at ericsson dot com> <56BE26FC dot 8030400 at 0x04 dot net> <wwokio1tsr0p dot fsf at ericsson dot com> <56BE2A32 dot 4060908 at 0x04 dot net>
Marcin KoÅcielnicki writes:
> On 12/02/16 19:49, Antoine Tremblay wrote:
>>
>> Marcin KoÅcielnicki writes:
>>
>>> On 12/02/16 19:31, Antoine Tremblay wrote:
>>>>
>>>> Marcin KoÅcielnicki writes:
>>>>
>>>>> On 11/02/16 14:00, Pedro Alves wrote:
>>>>>> On 02/11/2016 10:14 AM, Marcin KoÅcielnicki wrote:
>>>>>>> This tests whether $ymm15 can be correctly collected and printed from
>>>>>>> tfile. It covers:
>>>>>>>
>>>>>>> - storing tdesc in tfile (without that, $ymm15 doesn't exist)
>>>>>>> - ax_pseudo_register_collect for x86 (without that, $ymm15 cannot be
>>>>>>> collected)
>>>>>>> - register order in tfile_fetch_registers (without that, $ymm15h is
>>>>>>> fetched from wrong position)
>>>>>>> - off-by-one in tfile_fetch_registers (without that, $ymm15h is
>>>>>>> incorrectly considered to be out of bounds)
>>>>>>> - using proper tdesc in encoding tracepoint actions (without that,
>>>>>>> internal error happens due to $ymm15h being
>>>>>>
>>>>>> OK once prereqs are in.
>>>>>>
>>>>>> Thanks,
>>>>>> Pedro Alves
>>>>>>
>>>>>
>>>>> Thanks, pushed.
>>>>
>>>> Hi,
>>>> I've been trying to run this test on x86 but I get the following error
>>>> while compiling tfile-avx.c :
>>>>
>>>> binutils-gdb/build-x86/gdb/testsuite/../../../gdb/testsuite/gdb.trace/tfile-avx.c:38:19: error: invalid register name for 'a'
>>>> register __v8si a asm("ymm15") = {
>>>> ^
>>>>
>>>> I've also noticed the same error on the buildbot results see:
>>>> http://gdb-build.sergiodj.net/builders/Debian-x86_64-m64/builds/2928/steps/test%20gdb/logs/stdio
>>>>
>>>> My cpu (Intel(R) Core(TM) i7-4600M ) supports avx, cat /proc/cpuinfo
>>>> shows avx and a gdb print $ymm15 returns something...
>>>>
>>>> This is with gcc 4.8.4...
>>>>
>>>> Am I missing something?
>>>>
>>>> Regards,
>>>> Antoine
>>>>
>>>
>>> Ugh. It seems you need a newer gcc to recognize "ymm15" as a register
>>> name - 4.8.2 seems to want it called "xmm15" - sort of incorrect, but
>>> close enough. gcc 5.3 still accepts that, so perhaps we should change
>>> it to xmm15 for the sake of older compilers, even if it harms readability?
>>
>> Would xmm15 still work on newer gccs ? If so I would guess it's a good
>> idea to change it given that our own buildbot test machines seem to test
>> with an older gcc...?
>
> Both xmm15 and ymm15 work just fine on gcc 4.9.3 and 5.3.0, which are
> the only ones I have around right now. So, let's do it.
Great, sorry I had missed that in your original mail.
>>
>> Maybe adding a note of it in the test... or if there's a way to check
>> for the gcc version ?
>
> I'll throw in a comment.
>>
>> I actually can't find the gcc doc where those names are defined at the
>> moment would you have that handy by any chance?
>
> gcc/config/i386/i386.h, ADDITIONAL_REGISTER_NAMES.
>>
Thanks!
Antoine