From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18467 invoked by alias); 4 May 2006 14:52:17 -0000 Received: (qmail 18459 invoked by uid 22791); 4 May 2006 14:52:17 -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 14:52:16 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FbfBb-0000Ef-LO; Thu, 04 May 2006 10:52:11 -0400 Date: Thu, 04 May 2006 14:52:00 -0000 From: Daniel Jacobowitz To: Shaun Jackman Cc: gdb@sources.redhat.com Subject: Re: Modifying a verboten register Message-ID: <20060504145211.GB32605@nevyn.them.org> Mail-Followup-To: Shaun Jackman , gdb@sources.redhat.com References: <7f45d9390605040745o4c332058te1e289e5d5e9620@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7f45d9390605040745o4c332058te1e289e5d5e9620@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 X-SW-Source: 2006-05/txt/msg00021.txt.bz2 On Thu, May 04, 2006 at 08:45:44AM -0600, Shaun Jackman wrote: > Targetted for arm-elf, gdb does not let me modify the cpsr register > outside of a "normal" frame. > > (gdb) p/x $cpsr=0x3f > Value being assigned to is no longer active. I posted an explanation of this problem on gdb-patches yesterday, as it happens, with a nasty hack. > Parties aside, the JTAG interface I use (BDI2000) has a command mode > (Telnet interface) that I can use to modify the register. GDB seems to > cache its view of the registers though. Correct. > (gdb) p/x $cpsr > $1 = 0xd7 > > [in a galaxy far, far away] > BDI>rm cpsr 0x3f > BDI>rd cpsr > cpsr: 0x0000003f 63 Right here, use the flushregs command in GDB. > (gdb) p/x $cpsr > $2 = 0xd7 -- Daniel Jacobowitz CodeSourcery