This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: [PATCH/RFA] Fix busted logic in find_saved_register()


> Ok, I will commit the fix.
> 
>  > You mention that the alpha is calling that function.  Is that directly 
>  > or indirectly?  I'm going to eliminate the MIPS direct call.
> 
> Directly.  The alpha_get_saved_register() is nearly identical to the
> mips_get_saved_register().

If you've implemented INIT_SAVED_REGS() do you need a custom 
get_saved_register()?

> How are you changing the MIPS target?

Things will affect the MIPS at two levels.

Ref:
Andrew Cagney - [rfc] Frame based register cache / frame->unwind
http://sources.redhat.com/ml/gdb/2002-04/msg00245.html

I'm looking to change the way frames are unwound.  I'd ignore that patch 
as posted - I've managed to greatly simplify things.  Main thing to note 
that the new code doesn't use find_saved_register().  Instead it uses a 
recursive frame->register_unwind() method.

If/when this change goes through, any code using the existing 
find_saved_register() would be handed a local copy.

--

At a more theoretical [sp] level, I'm looking to rewrite the entire 
function.  Much of the MIPS complexity comes about because its REGNUM's 
are overloaded.  For instance, the hardware fp0 register might be 64 
bits but when a program (via debug info) refers to it, it is only 32 bits.

I think the way to handle this is to map debug info REGNUMs onto the 
pseudo address space and then use register_{read,write} to map them onto 
the corresponding hardware register.

This one is more theoretical as the SH5 is the first port to try to get 
this working and (apparently) it flushed out a few teething problems.

enjoy,
Andrew


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