Refactor the NetBSD amd64 gdbserver support
authorKamil Rytarowski <n54@gmx.com>
Wed, 23 Sep 2020 02:26:37 +0000 (04:26 +0200)
committerKamil Rytarowski <n54@gmx.com>
Thu, 1 Oct 2020 22:39:20 +0000 (00:39 +0200)
commit15397b0e058a84afcc2b6f4af383514e32f99a3d
treee5c4cf8c479d501fa645bb58158b4ce3b7a28a12
parente2a2a24a8e78427ff8667d625f5befbe88c328bb
Refactor the NetBSD amd64 gdbserver support

Replace the pre-C++ construct of netbsd_target_ops, netbsd_regset_info
and netbsd_tdesc with C++ inheritance approach found in the Linux
gdbserver code. Add netbsd_amd64_target, that inherits from the
netbsd_process_target class and add proper singleton object for
the_netbsd_target, initialized from netbsd_amd64_target.

Call low_arch_setup () on post process creation, which sets machine
specific properties of the traced process.

Remove global singleton the_netbsd_target object from the generic
gdbserver code.

This refactoring introduces no functional change from the end-user
point of view.

gdbserver/ChangeLog:

* netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
(netbsd_target_regsets): Now const.
(the_low_target): Remove.
(class netbsd_amd64_target, the_netbsd_amd64_target)
(the_netbsd_target): Add.
* netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
low_arch_setup ().
(netbsd_process_target::fetch_registers)
(netbsd_process_target::store_registers, initialize_low): Update.
(the_netbsd_target): Remove.
* netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
(the_low_target, netbsd_tdesc): Remove.
(netbsd_process_target::get_regs_info)
(netbsd_process_target::low_arch_setup): Add.
gdbserver/ChangeLog
gdbserver/netbsd-amd64-low.cc
gdbserver/netbsd-low.cc
gdbserver/netbsd-low.h
This page took 0.024049 seconds and 4 git commands to generate.