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]

Re: [RFC] Making target layers into a real stack


> Andrew Cagney,
> 	
> In message http://sources.redhat.com/ml/gdb/2001-06/msg00015.html you
> indicated interest in changes that start converting the target layers 
> into a real stack.
> 
> How about the following patch that use a mix of macros and subroutines 
> in files target.h and target.c.  How to use the macros in shown by 
> changing the files lin-lwp.c and thread-db.c to using the macros.
> 
> If you think that this is the way to make the target layers into 
> something more stack-like you can apply the patch.  If you think
> that another way should be used, can you please give me some 
> pointer as to how to stack should be redesigned?


I need to think about this and come up with a decent description as to 
how I think it should be done, sorry.  The change I have in mind is more 
fundamental than this.  Very briefly, each layer of the stack (if it is 
called that) would have its own local context (no global variables) and 
each layer would communicate with the layer above/below asynchronously. 
  Each layer would be directly coupled to the event loop.

This is a long way from what we have now :-/

I suspect that the best thing to do is to address the immediate problems 
in lin-lwp.c and then, later the more fundamental change can follow.

	Andrew

PS: In general macro's are bad and make the developers life hard.  This 
is why gdbarch.[hc] was generated from gdbarch.sh.



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