From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26698 invoked by alias); 11 Oct 2011 10:45:35 -0000 Received: (qmail 26690 invoked by uid 22791); 11 Oct 2011 10:45:34 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_EG X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Oct 2011 10:44:54 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RDZpN-0001uB-9x from pedro_alves@mentor.com ; Tue, 11 Oct 2011 03:44:53 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 11 Oct 2011 11:44:51 +0100 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix regcache_restore() handling of unavailable regs. Date: Tue, 11 Oct 2011 10:45:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.1; x86_64; ; ) Cc: David Miller References: <20111011.024027.2269565520682513251.davem@davemloft.net> In-Reply-To: <20111011.024027.2269565520682513251.davem@davemloft.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201110111144.49959.pedro@codesourcery.com> X-IsSubscribed: yes 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: 2011-10/txt/msg00300.txt.bz2 On Tuesday 11 October 2011 07:40:27, David Miller wrote: > > Across inferior dummy calls, regcache entries which were "unavailable" > were restored incorrectly after such dummy calls. The problem is > incorrect interpretation of cooked_read()'s return value in > regcache_restore(). > > Ok to commit? Okay. I don't think the problem is fully solved though. If it happens that the same set of registers are unavailable in src/dst, then things work. If if not, nothing is marking the dst register as unavailable. And that's tricky, due to pseudo registers, and partially available registers. I think this will need a bit more surgery to fix properly. Until then, please apply your patch. I'll add a TODO to think about this. OOC, what register are you seeing as unavailable? Is this a case of ptrace not exposing all the machine's registers? A context where the kernel hasn't saved all registers (a signal frame, or something like that). Something else? Thanks. -- Pedro Alves