From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 756 invoked by alias); 17 May 2002 09:07:39 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 730 invoked from network); 17 May 2002 09:07:37 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 17 May 2002 09:07:37 -0000 Received: by fw-cam.cambridge.arm.com; id KAA04335; Fri, 17 May 2002 10:07:35 +0100 (BST) Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma003794; Fri, 17 May 02 10:06:59 +0100 Received: from cam-mail2.cambridge.arm.com (cam-mail2.cambridge.arm.com [172.16.1.91]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id KAA09922; Fri, 17 May 2002 10:06:58 +0100 (BST) Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id KAA28644; Fri, 17 May 2002 10:06:58 +0100 (BST) Message-Id: <200205170906.KAA28644@cam-mail2.cambridge.arm.com> To: Michael Snyder cc: Richard.Earnshaw@arm.com, Andrew Cagney , gdb-patches@sources.redhat.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: [patch/rfc] Revise REGISTER_SIM_REGNO() In-reply-to: Your message of "Thu, 16 May 2002 16:21:06 PDT." <3CE43EE2.59DD49E3@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 17 May 2002 02:07:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-05/txt/msg00699.txt.bz2 > > I'd like to see a target have a way to report that it is permanently > > unable to recover a register -- because there's nothing in the protocol to > > allow its recovery. > > > > For example, I've added the privileged mode registers to my ARM target > > code; when the target is using a ptrace() interface for debugging a user > > program, then these registers are never available and it's pointless > > having gdb report them. > > How about having target_fetch_register set them to -1 in the cache? > See remote.c:remote_fetch_registers: > > set_register_cached (i, -1); > > This tells the rest of GDB that the value of the register is > "not available". You could unconditionally mark certain regs > as unavailable whenever target_fetch_registers is called. Already tried that idea. It doesn't work. set_register_cached (-1) means that the register is "temporarily unavailable" at this time (due to the way we gathered the registers). Each time registers_changed() is called the value is reset to zero. I need a way the target vector to let REGISTER_NAME() know that the register is "unavailable this session", so that it can return an empty string for the register; so that gdb won't think it exists at all. R.