This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 0/2] Initial support for FreeBSD/aarch64
- From: John Baldwin <jhb at FreeBSD dot org>
- To: Pedro Alves <palves at redhat dot com>, gdb-patches at sourceware dot org
- Date: Mon, 4 Sep 2017 19:51:23 -0700
- Subject: Re: [PATCH v2 0/2] Initial support for FreeBSD/aarch64
- Authentication-results: sourceware.org; auth=none
- References: <20170816135756.34736-1-jhb@FreeBSD.org> <139217af-944c-f074-4d51-db8beb05802b@redhat.com>
On 9/4/17 6:52 AM, Pedro Alves wrote:
> On 08/16/2017 02:57 PM, John Baldwin wrote:
>> This series adds initial support for FreeBSD/aarch64. It does not
>> yet include support for hardware breakpoints/watchpoints as that is
>> not currently supported by FreeBSD's kernel.
>>
>> I realized yesterday that I had forgotton to 'git add' the
>> aarch64-fbsd-nat.c file for the second patch, so this series adds
>> the missing file.
>
> I skimmed this and it looks good to me.
>
> One tiny comment:
>
> > +/* Provide a prototype to silence -Wmissing-prototypes. */
> > +extern initialize_file_ftype _initialize_aarch64_fbsd_tdep;
>
> ...
>
> > +/* Provide a prototype to silence -Wmissing-prototypes. */
> > +void _initialize_aarch64_fbsd_nat (void);
>
> These prototypes no longer make sense in C++ [1], and we
> could/should remove all the existing ones to avoid confusion.
I assumed it was more for the warning per the comment. I wonder if
we shouldn't think about replacing init.c with something more C++y
anyway? We could perhaps do it incrementally by adding a global
container of function pointers and a wrapper class whose constructor
accepts a function pointer and adds it to the container. Then we
would do a for-each over the container at the same place as
initialize_all_files(). If the ordering doesn't matter then this
could be rolled out over time (i.e. adding the new container and
wrapper class and then individual _init* functions could be converted
to the new scheme).
--
John Baldwin