From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 705 invoked by alias); 8 Jul 2009 20:51:54 -0000 Received: (qmail 694 invoked by uid 22791); 8 Jul 2009 20:51:53 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Jul 2009 20:51:44 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 1473B10576; Wed, 8 Jul 2009 20:51:42 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id D953010554; Wed, 8 Jul 2009 20:51:41 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MOe7A-0000ow-UH; Wed, 08 Jul 2009 16:51:40 -0400 Date: Wed, 08 Jul 2009 23:46:00 -0000 From: Daniel Jacobowitz To: Pedro Alves Cc: gdb-patches@sourceware.org, Jacob Potter Subject: Re: [RFA] Use data cache for stack accesses Message-ID: <20090708205140.GA2926@caradoc.them.org> Mail-Followup-To: Pedro Alves , gdb-patches@sourceware.org, Jacob Potter References: <7e6c8d660907081308r13bff580rdcf4822c77df8403@mail.gmail.com> <200907082146.40513.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200907082146.40513.pedro@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2009-07/txt/msg00274.txt.bz2 On Wed, Jul 08, 2009 at 09:46:40PM +0100, Pedro Alves wrote: > On Wednesday 08 July 2009 21:08:00, Jacob Potter write: > > --- a/gdb/thread.c > > +++ b/gdb/thread.c > > @@ -848,6 +848,9 @@ switch_to_thread (ptid_t ptid) > >    if (ptid_equal (ptid, inferior_ptid)) > >      return; > >   > > +  if (ptid_get_pid (ptid) != ptid_get_pid (inferior_ptid)) > > +    dcache_invalidate (target_dcache); > > + > > I'm not sure this would be 100% multi-address space safe. > > Do we not have places where we switch inferior_ptid temporarily > before calling reading memory, with save_inferior_ptid, without > going through the high level switch_to_thread ? > > What if we do this within dcache itself, similarly > to get_thread_regcache? That would be probably in memory_xfer_partial. Or could we store a dcache per-inferior? Jacob's right - I thought there was an 'inferior_data' to store arbitrary data per-inferior, but there isn't. I don't like baking knowledge into other modules of GDB that they can extract the PID and use it to key per-inferior data. Or just add it to struct inferior? -- Daniel Jacobowitz CodeSourcery