From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21113 invoked by alias); 4 Sep 2003 21:31:39 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21103 invoked from network); 4 Sep 2003 21:31:37 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 4 Sep 2003 21:31:37 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p2/8.12.5) with ESMTP id h84LTwdG008277; Thu, 4 Sep 2003 23:29:58 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p2/8.12.6) with ESMTP id h84LTwWQ034296; Thu, 4 Sep 2003 23:29:58 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p2/8.12.6/Submit) id h84LTvdt034293; Thu, 4 Sep 2003 23:29:57 +0200 (CEST) Date: Thu, 04 Sep 2003 21:31:00 -0000 Message-Id: <200309042129.h84LTvdt034293@elgar.kettenis.dyndns.org> From: Mark Kettenis To: ac131313@redhat.com CC: drow@mvista.com, gdb@sources.redhat.com In-reply-to: <3F54E41C.9040304@redhat.com> (message from Andrew Cagney on Tue, 02 Sep 2003 14:40:28 -0400) Subject: Re: [RFC] Register sets References: <200308232249.h7NMnvhh090154@elgar.kettenis.dyndns.org> <20030824164347.GA17520@nevyn.them.org> <200308252234.h7PMYqFu001245@elgar.kettenis.dyndns.org> <3F4B8173.1000302@redhat.com> <20030826165547.GA22836@nevyn.them.org> <86he3xrkjb.fsf@elgar.kettenis.dyndns.org> <3F54E41C.9040304@redhat.com> X-SW-Source: 2003-09/txt/msg00064.txt.bz2 Date: Tue, 02 Sep 2003 14:40:28 -0400 From: Andrew Cagney > The read_regset function is necessary to support the `gcore' command. > It should use regcache_raw_read to fetch all relevant registers from > the running target, such that we don't need target_fetch_registers(-1) > first. GDB currently has a conflict here. GCORE should definitly use regcache_raw_read, but that still leaves the ptrace code writing back register values - it uses regcache_collect. Hmm, perhaphs it two should be using a regcache_raw_read anyway - might even make it possible to eliminate "target_prepare_to_store"? We've said in the past that we the register cache is a write-through cache. Not all of our targets treat it exactly like that, however, for the ones that do (and all of them really should), it shouldn't make a difference whether we use regcache_raw_collect or regcache_raw_read. If we're storing a single register, that register must be valid, and therefore won't trigger fetching any registers. If we're storing all registers, we must have fetched them all before, and they should all be valid too. That said, we should be able to eliminate regcache_raw_collect in the future. Mark