This is the mail archive of the gdb-patches@sourceware.org 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]

RFA: _initialize_sol_thread fixme (was: sol-thread.c core_ops oddity)


[carried over from gdb@sourceware list]

On Thu, Aug 7, 2008 at 1:05 PM, Daniel Jacobowitz <drow@false.org> wrote:
> On Thu, Aug 07, 2008 at 12:44:07PM -0700, Doug Evans wrote:
>> Thanks.  I don't see any sorting beyond
>> INIT_FILES = $(COMMON_OBS) $(TSOBS) $(CONFIG_SRCS)
>> and the hack for gdbtypes.
>
> Right you are.  Well, it's the order of that then.

[from earlier message]
>> I'd like to fix the misleading comments but it's not clear what better
>> wording should be.

How about this then?

2008-08-07  Doug Evans  <dje@google.com>

        * sol-thread.c (_initialize_sol_thread): Add FIXME regarding
        order of _initialize_* fns.

Index: sol-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/sol-thread.c,v
retrieving revision 1.65
diff -u -p -u -p -r1.65 sol-thread.c
--- sol-thread.c        9 Jul 2008 22:49:56 -0000       1.65
+++ sol-thread.c        8 Aug 2008 03:00:11 -0000
@@ -1660,6 +1660,10 @@ _initialize_sol_thread (void)
   add_cmd ("sol-threads", class_maintenance, info_solthreads,
           _("Show info on Solaris user threads."), &maintenanceinfolist);

+  /* FIXME: This code takes errant advantage of the order in which
+     initialization routines are run.  _initialize_corelow must run before
+     this one otherwise orig_core_ops will still contain zeros and the work
+     of init_sol_core_ops will be undone.  */
   memcpy (&orig_core_ops, &core_ops, sizeof (struct target_ops));
   memcpy (&core_ops, &sol_core_ops, sizeof (struct target_ops));
   add_target (&core_ops);


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