From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16462 invoked by alias); 21 Aug 2012 19:39:45 -0000 Received: (qmail 16427 invoked by uid 22791); 21 Aug 2012 19:39:44 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_EG X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 21 Aug 2012 19:39:27 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7LJdPX5000642 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 21 Aug 2012 15:39:25 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7LJdNjS006021; Tue, 21 Aug 2012 15:39:24 -0400 Message-ID: <5033E3EB.60004@redhat.com> Date: Tue, 21 Aug 2012 19:39:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org, Mark Kettenis Subject: Re: [PATCH] Don't attach to 'target_changed' observer in regcache References: <1343891847-16554-1-git-send-email-yao@codesourcery.com> <5527210.MOXy64knkR@qiyao.dyndns.org> <201208090811.q798Bbeq000405@glazunov.sibelius.xs4all.nl> <1488047.W4eyA0a8U4@qiyao.dyndns.org> In-Reply-To: <1488047.W4eyA0a8U4@qiyao.dyndns.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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-08/txt/msg00594.txt.bz2 On 08/09/2012 09:36 AM, Yao Qi wrote: > I am thinking that we may add a new gdbarch hook function 'register_changed > (int regnum)'. In default, it invalidates all regcaches, and backend can > override it to do something optimally. At least, we don't have to invalidate > all regcache on some ports, such as x86, tic6x. gdbarch is only useful for the cases gdb can hardcode. it is not sufficient in the cases the target feeds gdb a target description with more registers than gdb knows the core architecture of the running target has. -- Pedro Alves