This is the mail archive of the gdb@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: [rfc] frame->frame => frame->addr && frame->base()


> Rather than worrying in detail about what should be held in the "frame" 
> structure, shouldn't we be more concerned with the methods that need to 
> access the frame?  Once we have that, what needs to be stored should 
> become obvious.
> 
> R.

I'm not too worried by the methods used to access a frame (once 
created).  I'm trying to focus in on just the frame creation phase.  In 
theory, the code should look like:

	create_frame (frame_addr, frame_pc /*I'm loosing that one :-)*/,
		frame_next);

The reality - get_prev_frame() - is unfortunatly, very very different. 
To appreciate ``the quality'' of the current situtation, grep for '->pc 
= ' and '->frame = ' in the tdep.c code, and look at how SP_REGNUM is 
special cased in frame->saved_regs[].

Still, I've had some success.  The code I've got is starting to look 
like the above while still keeping the existing code working - even has 
a cache :-)

enjoy,
Andrew


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