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: [RFA/commit 1/3] minor ravenscar-thread cleanup


On 12/14/2012 03:02 PM, Joel Brobecker wrote:
> Hello,
> 
> Before attacking the gdbarch-ification of ravenscar-thread
> proper, I noticed that ravenscar-thread uses a number of
> global variables, which annoyed me quite a bit. There was
> one that seems like an easy target, so I dealt with it now.
> 
> For the remaining ones, I will take care of them after the patch
> series is in, and I have reconciled the FSF tree and AdaCore's
> tree.
> 
> The use of the ravenscar_open static global is unnecessary.
> This patch removes it. It also removes some routines that
> were created in association with the management of this global.
> 

I question the pushing of this target from the inferior_created observer.
Detecting the ravenscar runtime is based on looking for some symbols,
so it would seem to me that doing that from a new_objfile observer
(which is what e.g., linux-thread-db.c, another thread_stratum target,
does) would be more correct (e.g., it'd work to attach to a target,
notice missing symbols, and point GDB at symbols, at which point GDB
would load a new objfile and detect ravenscar).

But if I ignore that issue, the patch looks fine to me.

-- 
Pedro Alves


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