From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8970 invoked by alias); 5 Mar 2012 15:51:45 -0000 Received: (qmail 8961 invoked by uid 22791); 5 Mar 2012 15:51:44 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Mar 2012 15:51:30 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q25FpOog016702; Mon, 5 Mar 2012 16:51:24 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q25FpNdL006582; Mon, 5 Mar 2012 16:51:23 +0100 (CET) Date: Mon, 05 Mar 2012 15:51:00 -0000 Message-Id: <201203051551.q25FpNdL006582@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: palves@redhat.com CC: gdb-patches@sourceware.org, hjl.tools@gmail.com In-reply-to: <4F54CE80.30204@redhat.com> (message from Pedro Alves on Mon, 05 Mar 2012 14:32:32 +0000) Subject: Re: i387-tdep.c:i387_supply_xsave: Assert the xsave section buffer, is not NULL. References: <4F21A489.2080200@redhat.com> <4F54CE80.30204@redhat.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00141.txt.bz2 > Date: Mon, 05 Mar 2012 14:32:32 +0000 > From: Pedro Alves > > On 01/26/2012 07:07 PM, Pedro Alves wrote: > > > > > 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'. > > > On 02/27/2012 06:48 PM, Pedro Alves wrote: > > I'll post a separate RFC patch proposing to remove the NULL REGS handling > > Here's what I'd like to check in, given the analysis quoted above. I agree with your analysis.