This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/commit 1/3] minor ravenscar-thread cleanup
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 14 Dec 2012 17:02:32 +0000
- Subject: Re: [RFA/commit 1/3] minor ravenscar-thread cleanup
- References: <1355497356-13922-1-git-send-email-brobecker@adacore.com>
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