[PATCH v2 0/2] Initial support for FreeBSD/aarch64
John Baldwin
jhb@FreeBSD.org
Tue Sep 5 02:51:00 GMT 2017
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
More information about the Gdb-patches
mailing list