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]

Re: [SH] regs command


> >   /* Initialize this lazily, to avoid an initialization order
> >      dependency on solib-svr4.c's _initialize routine.  */
> >   if (mips_svr4_so_ops.in_dynsym_resolve_code == NULL)
> >     {
> >       mips_svr4_so_ops = svr4_so_ops;
> >       mips_svr4_so_ops.in_dynsym_resolve_code
> >         = mips_linux_in_dynsym_resolve_code;
> >     }
> >   set_solib_ops (gdbarch, &mips_svr4_so_ops);
> solib-svr4.c is as much target dependent as mips-linux-tdep.c though.
> The split on file name is a bit arbitrary.  It'd make a bit more sense
> to split around something like COMMON_OBS and TARGET_OBJS, but you'd
> still bump into such issues.  A "don't depend on order" rule appears
> simpler to understand and maintain than having to worry about
> hierarchies.

And I *think* we solved that problem elsewhere, right? Basically,
we call functions to get the ops vector. That way, no matter the
init order, we always access initialized data... See the inf-*
files IIRC.

-- 
Joel


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