This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Making target layers into a real stack
- To: "John S. Kallal" <jskallal at home dot com>
- Subject: Re: [RFC] Making target layers into a real stack
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 29 Jun 2001 01:12:14 -0400
- Cc: gdb-patches at sources dot redhat dot com,Michael Snyder <msnyder at cygnus dot com>,Mark Kettenis <kettenis at science dot uva dot nl>
- References: <01062017044600.01102@CyberMax>
> 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.