[GDBserver][AArch64] Make watchpoint support use target_hw_bp_type.
authorPedro Alves <palves@redhat.com>
Tue, 20 May 2014 17:24:27 +0000 (18:24 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 20 May 2014 17:24:27 +0000 (18:24 +0100)
commit4ff0d3d82d37a57507c147886ce9f9bfb7495b99
tree63384df4fc3c9a1c566421f2248e167fde0abba9
parent786dc51990a8d593a8d727735910ccf97752d928
[GDBserver][AArch64] Make watchpoint support use target_hw_bp_type.

This makes linux-aarch64-low.c use target_hw_bp_type, like gdb's
aarch64-linux-nat.c.  The original motivation is decoupling
insert_point/remove_point from Z packet numbers, but I think making
the files a little bit more similar is a good thing on its own right.
Ideally we'd merge these files even...  The
aarch64_point_encode_ctrl_reg change is taken straight from GDB's
copy.

I confirmed with a cross compiler that this builds, but it's otherwise
untested.

gdb/gdbserver/
2014-05-20  Pedro Alves  <palves@redhat.com>

* linux-aarch64-low.c: Include break-common.h.
(enum target_point_type): Delete.
(Z_packet_to_point_type): Rename to ...
(Z_packet_to_target_hw_bp_type): ... this, and return a
target_hw_bp_type instead.
(aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
instead of an enum target_point_type.
(aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
breakpoint type.
(aarch64_dr_state_insert_one_point)
(aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
(aarch64_handle_aligned_watchpoint)
(aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
Take an enum target_hw_bp_type instead of an enum
target_point_type.
(aarch64_supports_z_point_type): New function.
(aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
use Z_packet_to_target_hw_bp_type.
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-aarch64-low.c