From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26329 invoked by alias); 14 Feb 2002 15:39:06 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 26225 invoked from network); 14 Feb 2002 15:39:03 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.135.44) by sources.redhat.com with SMTP; 14 Feb 2002 15:39:03 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id D74F03CC5; Thu, 14 Feb 2002 10:39:01 -0500 (EST) Message-ID: <3C6BDA15.2030803@cygnus.com> Date: Thu, 14 Feb 2002 07:39:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: duane_ellis@franklin.com Cc: insight@sources.redhat.com Subject: Re: Adding Registers References: <3c948824.1980.0@esatclear.ie> <200202141503.KAA18618@mercury.franklin.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-q1/txt/msg00131.txt.bz2 > david> Andrew refers to the internal number of each register. I am > dealing with a memory mapped register and as such it has no > number, how is this dealt with in the functions. > > You are thinking like "r0" "r1" and such. > > What number would you then apply to the PC, or the STACK pointer? > > Numbers are some what arbitrary. Think of it as "register id" ID > numbers 0..15 mean registers 0..15, id 16 is PC, 17 is stack, 18 is > flags register, 19 is this, and 20 is that, and 21 is _other_ > > david> I have gotten as far as > > Good, next step is to fire up the debugger, and set a break point at > that specific function. Run GDB, and use the GDB commands to modify or > change a register. > > BANG - you hit the break point, and you step into the function keep > stepping till you find the function you need tomodify. Exit GDB, and > hack away. > > This method sure beats digging through source... and un-winding macros. A word of caution. You should also be looking over new targets such as the xstormy16. Otherwise you may find that the techniques you've been borrowing are deprecated and not accepted in new targets. enjoy, Andrew