From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31257 invoked by alias); 10 Jun 2005 09:02:11 -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 29047 invoked by uid 22791); 10 Jun 2005 09:02:00 -0000 Received: from viefep14-int.chello.at (HELO viefep14-int.chello.at) (213.46.255.13) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 10 Jun 2005 09:02:00 +0000 Received: from lexx.office.loytec.com ([213.47.75.31]) by viefep14-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050610090157.ETDV7053.viefep14-int.chello.at@lexx.office.loytec.com> for ; Fri, 10 Jun 2005 11:01:57 +0200 Received: from exchange.office.loytec.com (exchange.office.loytec.com [192.168.1.10]) by lexx.office.loytec.com (8.12.3/8.12.3/Some OS 1.2.3-4.5) with ESMTP id j5A91uPh002761 for ; Fri, 10 Jun 2005 11:01:56 +0200 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: ARM register pages Date: Fri, 10 Jun 2005 09:02:00 -0000 Message-ID: From: "Thomas Rauscher" To: X-SW-Source: 2005-06/txt/msg00090.txt.bz2 =20=20 > -----Original Message----- > From: Richard Earnshaw [mailto:rearnsha@gcc.gnu.org]=20 > Sent: Friday, June 10, 2005 10:14 AM > To: Shaun Jackman > Cc: gdb@sources.redhat.com > Subject: Re: ARM register pages >=20 > On Thu, 2005-06-09 at 22:14, Shaun Jackman wrote: > > On 6/9/05, Daniel Jacobowitz wrote: > > > The easiest solution will be to do this instead: > > > abt: [copy the banked address to lr, which is not=20 > useful at this > > > point] > > > 1: b 1b > >=20 > > If it's possible, I'd prefer to accomplish a backtrace without > > altering the target's code. I was hoping that "set $cpsr=3D0x1f" would > > make $lr_usr visible in $lr to gdb, but the value of $lr=20 > displayed by > > "i reg" remains the same. Does gdb cache the value of the=20 > register? Is > > there a way to force gdb to reload the value of the=20 > register from the > > remote target? >=20 > Be careful. If you set the CPSR to user mode in this way,=20 > the only way > back out again will be to take another trap, thus destroying=20 > any machine > state you might have. That is, reading the user mode=20 > registers in this > way will be destructive to your debugging session. >=20 > R. >=20 >=20 A quite simple way to do this is to find the exception handler and use set $pc =3D ... to set the PC to the 'movs' instruction at the end of the exception handler. Then issue a single instruction step si to return to user mode.=20 This however skips the exception handler entirely so that the program would crash most likely when continuing. Regards, Thomas Rauscher -- Thomas Rauscher LOYTEC electronics GmbH Stolzenthalergasse 24/3 A-1080 Wien Austria/Europe trauscher@loytec.com www.loytec.com Phone: +43-1-4020805-15 FAX: +43-1-4020805-99