This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][CRISv32] Add support for threaded debugging
- From: Pedro Alves <palves at redhat dot com>
- To: Ricard Wanderlof <ricard dot wanderlof at axis dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 03 Sep 2013 16:02:09 +0100
- Subject: Re: [PATCH][CRISv32] Add support for threaded debugging
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 00 dot 1308301528420 dot 10770 at lnxricardw dot se dot axis dot com> <5224D319 dot 1000704 at redhat dot com> <alpine dot DEB dot 2 dot 00 dot 1309031249310 dot 10770 at lnxricardw dot se dot axis dot com> <5225F303 dot 4050901 at redhat dot com> <alpine dot DEB dot 2 dot 00 dot 1309031653360 dot 10770 at lnxricardw dot se dot axis dot com>
On 09/03/2013 03:57 PM, Ricard Wanderlof wrote:
>
> On Tue, 3 Sep 2013, Pedro Alves wrote:
>
>>>> This part looks OK, though it did raise some eyebrows to have
>>>> GNU/Linux-specific code in cris-tdep.c, rather than in a cris-linux-tdep.c
>>>> file. It seems there's no real support for cris bare-metal debugging?
>> ...
>>> I don't really see the need for it. It doesn't seem like it would be a
>>> huge effort (essentially the call to
>>> set_gdbarch_fetch_tls_load_module_address and also
>>> set_solib_svr4_fetch_link_map_offsets would be put in cris-linux-tdep.c),
>>> on the other hand I can't really test that it works as expected,
>> ...
>> It's mostly about code/design/maintenance sanity. I won't really mind if the
>> split isn't done, but note how the fact that there's a Linux port here
>> is being missed often in regular maintenance (because people will look
>> for *linux-tdep.*) files. cris-tdep.c doesn't call linux_init_abi anywhere
>> AFAICT, for example, so the cris port lost the adjustment between v1
>> and v2 of the gdbarch_gdb_signal_{to,from}_target
>> patches, just a few weeks back:
>>
>> http://sourceware.org/ml/gdb-patches/2013-07/msg00002.html
>> http://sourceware.org/ml/gdb-patches/2013-07/msg00651.html
>>
>> Probably other across-the-board changes have been missed.
>
> That's a good point. I'll see if I find some time to make a rudimentary
> split.
>
> Regarding the specific case above, it's a bit odd though that the CRIS
> port was included in the first patch set but not the second, considering
> they were supplied by the same person. Still, it still makes your point.
It's not odd at all. linux-tdep.c is supposed to be built by all
Linux ports, and it was assumed that all Linux ports are calling
linux-tdep.c:linux_init_abi. In v2 you see:
"- linux-tdep.c now registers the generic converters itself, thus
eliminating the need for every target to do so."
Since cris is missing linux-tdep.c, it was left out by accident.
--
Pedro Alves