Re: [PATCH v2 09/10] Switch local native code to gdb/nat shared functions

Simon Marchi
2020-09-07T19:24:38Z

On 2020-09-03 8:29 p.m., Kamil Rytarowski wrote:
> No functional change as the same functionality inlined in nbsd-nat.c
> is offered in gdb/nat/netbsd-nat.c.
>
> gdb/ChangeLog:
>
> * nbsd-nat.c: Include "nat/netbsd-nat.h".
> * (nbsd_nat_target::pid_to_exec_file)
> (nbsd_nat_target::thread_alive, nbsd_nat_target::thread_name)
> (nbsd_nat_target::post_startup_inferior)
> (nbsd_nat_target::post_attach, nbsd_nat_target::xfer_partial)
> (nbsd_add_threads): Switch local code to common gdb/nat functions.
> * (nbsd_pid_to_cmdline): Call sysctl from the global namespace.
> * (nbsd_thread_lister): Remove.

Just a though for next time: I think you could have done the changes here
progressively. For example, move netbsd_thread_lister to nat, adjust the
code here at the same time. Move the thread_alive function, adjust the
code here, etc. It would have been easier to see that it was mostly just
functionality moved from one place to the other, up to this patch I thought
it was all new code.

Simon