[PATCH] Please define thread_info as struct thread_info (and other stuff)
John Baldwin
jhb@FreeBSD.org
Fri Dec 21 18:17:00 GMT 2018
On 12/20/18 2:34 PM, Tom Tromey wrote:
>>>>>> "Svante" == Svante Signell <svante.signell@gmail.com> writes:
>
> Svante> Seems like nothing is happening so far. Did you expect me to
> Svante> take action on this issue? Or is this a low-prio problem for
> Svante> you, Hurd being a second class citizen?
>
> It's not so much second-class as that the usual way gdb development
> works is that ports need maintainers, and the current contributors are
> pretty busy and/or have other interests.
>
> I took a quick look at it and one question I have is whether
> nm-i386gnu.h really needs to include any of the headers it does. defs.h
> already includes unistd.h, and regcache.h should probably not be needed;
> and removing the mach includes would at least reduce the number of spots
> needing the "struct". Could you try removing these lines?
>
> Also I happened to notice that file declares gnu_target_pid_to_str --
> but I didn't see a definition. So perhaps that could be removed as
> well.
I think this entire file can probably be removed. The only useful content
it has that I can see are the THREAD_STATE_* macros, and those are only
used in one file: gnu-nat.c. You could just move those there. If in your
pending out-of-tree patches you need them in multiple files, you could
move the macros to gnu-nat.h. If you have different versions (64-bit
vs 32-bit), then I think it would be fine to use #ifdef's to define the
appropriate version in whatever file you move the macros to. That is
probably the simplest and quickest solution as moving everything into a
gdb namespace is probably a fairly large (and tedious) patch.
--
John Baldwin
                                                                           Â
More information about the Gdb-patches
mailing list