This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Adding Registers


> 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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]