From: Pedro Alves <palves@redhat.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GDB Patches <gdb-patches@sourceware.org>,
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: Re: AVX and unavailable registers, fix system-gcore.exp
Date: Mon, 27 Feb 2012 19:23:00 -0000 [thread overview]
Message-ID: <4F4BD008.1060909@redhat.com> (raw)
In-Reply-To: <CAMe9rOp2x+pEJ5fcu5ipdQ=V-WwzQZp3zzZ83nCLiDQmihxMcA@mail.gmail.com>
On 02/27/2012 06:04 PM, H.J. Lu wrote:
> On Thu, Jan 26, 2012 at 11:07 AM, Pedro Alves <palves@redhat.com> wrote:
>> 2012-01-26 Pedro Alves <palves@redhat.com>
>>
>> * i387-tdep.c (i387_supply_xsave): If we have an xsave buffer, and
>> the register state is clear, supply explicit zero, instead of
>> marking the register unavailable.
>
> This fixes 7.3/7.4 regression:
>
> http://www.sourceware.org/bugzilla/show_bug.cgi?id=13766
Thanks for confirming. Since you agree with the patch, I'll check it in in
a few days unless I hear otherwise. I'll post a separate RFC patch proposing
to remove the NULL REGS handling:
>> I have a doubt in the xsave-in-corefile support bits. There's code in place to
>> handle a NULL regs (as in no xsave contents to work with), so I'm handling it
>> as presently:
>>
>>
>> +
>> + Note however, the case when REGS is NULL is a different case.
>> + That case means we do not have access to the x87 states, so we
>> + should mark the registers as unavailable (by supplying NULL). */
>> +
>> but I can't figure out how would we ever get a NULL REGS there. Is there a
>> convoluted path I missed? amd64-linux-tdep.c unconditionally installs
>> amd64_linux_regset_sections as gdbarch_core_regset_sections
>> callback, and this includes the .reg-xstate section.
>> However, corelow.c:get_core_register_section bails early if
>> a section is not found in the core, never reaching regset->supply_regset
>> with a NULL `contents'.
>> + const gdb_byte zero[MAX_REGISTER_SIZE] = { 0 };
>
> Shouldn't it be static since it is never modified?
I'll do that change.
--
Pedro Alves
next prev parent reply other threads:[~2012-02-27 18:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 19:16 Pedro Alves
2012-02-27 18:49 ` H.J. Lu
2012-02-27 19:23 ` Pedro Alves [this message]
2012-03-02 21:49 ` H.J. Lu
2012-03-05 14:24 ` Pedro Alves
2012-03-06 13:22 ` Pedro Alves
2012-03-05 14:32 ` i387-tdep.c:i387_supply_xsave: Assert the xsave section buffer, is not NULL Pedro Alves
2012-03-05 15:51 ` Mark Kettenis
2012-03-05 16:19 ` Pedro Alves
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=4F4BD008.1060909@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=mark.kettenis@xs4all.nl \
/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