From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11945 invoked by alias); 4 May 2006 15:15:16 -0000 Received: (qmail 11899 invoked by uid 22791); 4 May 2006 15:15:16 -0000 X-Spam-Check-By: sourceware.org Received: from nz-out-0102.google.com (HELO nz-out-0102.google.com) (64.233.162.206) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 04 May 2006 15:15:14 +0000 Received: by nz-out-0102.google.com with SMTP id 14so474078nzn for ; Thu, 04 May 2006 08:15:10 -0700 (PDT) Received: by 10.36.148.1 with SMTP id v1mr1115155nzd; Thu, 04 May 2006 08:15:10 -0700 (PDT) Received: by 10.36.227.44 with HTTP; Thu, 4 May 2006 08:15:10 -0700 (PDT) Message-ID: <7f45d9390605040815x5be2bcb8t921b2dd528335565@mail.gmail.com> Date: Thu, 04 May 2006 15:15:00 -0000 From: "Shaun Jackman" Reply-To: "Shaun Jackman" To: gdb@sources.redhat.com Subject: Re: Modifying a verboten register In-Reply-To: <20060504145211.GB32605@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline References: <7f45d9390605040745o4c332058te1e289e5d5e9620@mail.gmail.com> <20060504145211.GB32605@nevyn.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00029.txt.bz2 T24gNS80LzA2LCBEYW5pZWwgSmFjb2Jvd2l0eiA8ZHJvd0BmYWxzZS5vcmc+ IHdyb3RlOgouLi4KPiBJIHBvc3RlZCBhbiBleHBsYW5hdGlvbiBvZiB0aGlz IHByb2JsZW0gb24gZ2RiLXBhdGNoZXMgeWVzdGVyZGF5LCBhcyBpdAo+IGhh cHBlbnMsIHdpdGggYSBuYXN0eSBoYWNrLgoKV29uZGVyZnVsIG5ld3MhIFRo YW5rcywgRGFuaWVsLgoKPiBSaWdodCBoZXJlLCB1c2UgdGhlIGZsdXNocmVn cyBjb21tYW5kIGluIEdEQi4KCkdyZWF0ISBUaGFua3MgZm9yIHBvaW50aW5n IHRoaXMgY29tbWFuZCBvdXQgdG8gbWUuIEkndmUgdXNlZCB0aGlzIGhhY2sK dG8gbW9kaWZ5IHRoZSAkY3BzciBhbmQgJHBjIHRvIHNldCB0aGUgY29yZSBi YWNrIHRvIGEgZ29vZCBmcmFtZS4gR0RCCnN0aWxsIGhhcyBpdHMgb2xkIGZy YW1lIGluIGl0cyBjYWNoZSB0aG91Z2guIElzIHRoZXJlIGEgY29tbWFuZCB0 bwpyZS1yZWFkIHRoZSBmcmFtZSBmcm9tIHRoZSBuZXcgcmVnaXN0ZXIgdmFs dWVzPwoKKGdkYikgZgojMCAgMHgwMDAwMDAxMCBpbiA/PyAoKQpCREk+cm0g Y3BzciAweGZmCkJEST5ybSBwYyAweDIwMGNhOWEKKGdkYikgZmx1c2hyZWdz ClJlZ2lzdGVyIGNhY2hlIGZsdXNoZWQuCihnZGIpIHAveCAkY3BzcgokMjQg PSAweGZmCihnZGIpIHgvaSAkcGMKMHgyMDBjYTlhIDxfdmZwcmludGZfcisy NTA+OiAgICBsZHJiICAgIHIyLCBbcjcsICMwXQooZ2RiKSBmCiMwICAweDAw MDAwMDEwIGluID8/ICgpCgpUaGFua3MsClNoYXVuCg== >From gdb-return-25078-listarch-gdb=sources.redhat.com@sourceware.org Thu May 04 15:21:13 2006 Return-Path: Delivered-To: listarch-gdb@sources.redhat.com Received: (qmail 15613 invoked by alias); 4 May 2006 15:21:12 -0000 Received: (qmail 15604 invoked by uid 22791); 4 May 2006 15:21:10 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 04 May 2006 15:20:44 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FbfdB-0000T0-9H; Thu, 04 May 2006 11:20:41 -0400 Date: Thu, 04 May 2006 15:21:00 -0000 From: Daniel Jacobowitz To: Shaun Jackman Cc: gdb@sources.redhat.com Subject: Re: Modifying a verboten register Message-ID: <20060504152041.GI32605@nevyn.them.org> Mail-Followup-To: Shaun Jackman , gdb@sources.redhat.com References: <7f45d9390605040745o4c332058te1e289e5d5e9620@mail.gmail.com> <20060504145211.GB32605@nevyn.them.org> <7f45d9390605040815x5be2bcb8t921b2dd528335565@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7f45d9390605040815x5be2bcb8t921b2dd528335565@mail.gmail.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Delivered-To: mailing list gdb@sourceware.org X-SW-Source: 2006-05/txt/msg00031.txt.bz2 Content-length: 1025 On Thu, May 04, 2006 at 09:15:10AM -0600, Shaun Jackman wrote: > >Right here, use the flushregs command in GDB. > > Great! Thanks for pointing this command out to me. I've used this hack > to modify the $cpsr and $pc to set the core back to a good frame. GDB > still has its old frame in its cache though. Is there a command to > re-read the frame from the new register values? Definitely a bug. I'm not entirely sure, but if someone wants to experiment, I think that this would work: - Search for every call to registers_changed. - Replace it with observer_notify_target_changed (¤t_target); (or something more specific if the current function takes a struct target_ops *, I suppose, but that's not important at the moment). - Delete any flush_cached_frames calls right before the former calls to registers_changed, since they are now unnecessary. I can't think of any situation where the registers may have changed without invalidating the frame cache. -- Daniel Jacobowitz CodeSourcery