From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: gdb-patches@cygnus.com, Andris Pavenis Subject: Re: libgdb.a Date: Wed, 10 Mar 1999 16:31:00 -0000 Message-id: <36E70EE3.3D0937F1@cygnus.com> References: <99030817102600.14026@hal> <99031011141900.03735.cygnus.patches.gdb@hal> X-SW-Source: 1999-03/msg00026.html Andris Pavenis wrote: > Maybe it would be usefull to implement init functions of higher priority that > are executed before ones which names begins with _initialize_. > So we would be able to avoid gcc related extensions such as > __attribute__((constructor)). > > For that we should use a different name prefix (eg. _preinit_ or something like) > and require that these functions are independent one from another one (should > not use results of other similar init functions). This has been discussed before (but on another list) and on the last occasion it was actually me suggested something along similar lines to your proposal. I lost the the discussion :-) The consensus was that if GDB started down the path of having two initialization levels it could quickly find itself heading for a situtation where there were N initialization levels and a really confused startup sequence. It was thought that, if anything, we should be trying to discourage additional complexity being introduced during startup. As an example, consider the idea (that was recently floated) of GDB suporting several target-architectures. Instead of fully initializing the code for all the target-architectures during startup, it would probably be more prudent to leave most of that task until the point where GDB knew exactly which architecture was being debugged. enjoy, Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: gdb-patches@cygnus.com, Andris Pavenis Subject: Re: libgdb.a Date: Thu, 01 Apr 1999 00:00:00 -0000 Message-ID: <36E70EE3.3D0937F1@cygnus.com> References: <99030817102600.14026@hal> <99031011141900.03735.cygnus.patches.gdb@hal> X-SW-Source: 1999-q1/msg00080.html Message-ID: <19990401000000.acatOFlDxHMmf2hnjGN-XPare68Ndjfvq4-sNGoQhk4@z> Andris Pavenis wrote: > Maybe it would be usefull to implement init functions of higher priority that > are executed before ones which names begins with _initialize_. > So we would be able to avoid gcc related extensions such as > __attribute__((constructor)). > > For that we should use a different name prefix (eg. _preinit_ or something like) > and require that these functions are independent one from another one (should > not use results of other similar init functions). This has been discussed before (but on another list) and on the last occasion it was actually me suggested something along similar lines to your proposal. I lost the the discussion :-) The consensus was that if GDB started down the path of having two initialization levels it could quickly find itself heading for a situtation where there were N initialization levels and a really confused startup sequence. It was thought that, if anything, we should be trying to discourage additional complexity being introduced during startup. As an example, consider the idea (that was recently floated) of GDB suporting several target-architectures. Instead of fully initializing the code for all the target-architectures during startup, it would probably be more prudent to leave most of that task until the point where GDB knew exactly which architecture was being debugged. enjoy, Andrew