diff options
author | Pedro Alves <palves@redhat.com> | 2014-05-20 18:24:27 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2014-05-20 18:41:41 +0100 |
commit | 932539e3ab93db990ef61c80bbf78a4f2fdcc60b (patch) | |
tree | e6ae7628cb76dc852319d2c552a2465202006c83 /gdb/gdbserver/win32-i386-low.c | |
parent | 4ff0d3d82d37a57507c147886ce9f9bfb7495b99 (diff) | |
download | gdb-932539e3ab93db990ef61c80bbf78a4f2fdcc60b.zip gdb-932539e3ab93db990ef61c80bbf78a4f2fdcc60b.tar.gz gdb-932539e3ab93db990ef61c80bbf78a4f2fdcc60b.tar.bz2 |
[GDBserver] Move Z packet defines and type convertion routines to shared code.
The Aarch64, MIPS and x86 Linux backends all have Z packet number
defines and corresponding protocol number to internal type convertion
routines. Factor them all out to gdbserver's core code, so we only
have one shared copy.
Tested on x86_64 Fedora 20, and also cross built for aarch64-linux-gnu
and mips-linux-gnu.
gdb/gdbserver/
2014-05-20 Pedro Alves <palves@redhat.com>
* mem-break.h: Include break-common.h.
(Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
(Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
(Z_packet_to_target_hw_bp_type): New declaration.
* mem-break.c (Z_packet_to_target_hw_bp_type): New function.
* i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
(Z_PACKET_ACCESS_WP): Delete macros.
(Z_packet_to_hw_type): Delete function.
* i386-low.h: Don't include break-common.h here.
(Z_packet_to_hw_type): Delete declaration.
* linux-x86-low.c (x86_insert_point, x86_insert_point): Call
Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
* win32-i386-low.c (i386_insert_point, i386_remove_point): Call
Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
* linux-aarch64-low.c: Don't include break-common.h here.
(Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
(Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
(Z_packet_to_target_hw_bp_type): Delete function.
* linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
function.
(mips_insert_point, mips_remove_point): Use
Z_packet_to_target_hw_bp_type.
Diffstat (limited to 'gdb/gdbserver/win32-i386-low.c')
-rw-r--r-- | gdb/gdbserver/win32-i386-low.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbserver/win32-i386-low.c b/gdb/gdbserver/win32-i386-low.c index ce9b303..e70ca71 100644 --- a/gdb/gdbserver/win32-i386-low.c +++ b/gdb/gdbserver/win32-i386-low.c @@ -106,7 +106,7 @@ i386_insert_point (char type, CORE_ADDR addr, int len) case '3': case '4': { - enum target_hw_bp_type hw_type = Z_packet_to_hw_type (type); + enum target_hw_bp_type hw_type = Z_packet_to_target_hw_bp_type (type); return i386_low_insert_watchpoint (&debug_reg_state, hw_type, addr, len); @@ -126,7 +126,7 @@ i386_remove_point (char type, CORE_ADDR addr, int len) case '3': case '4': { - enum target_hw_bp_type hw_type = Z_packet_to_hw_type (type); + enum target_hw_bp_type hw_type = Z_packet_to_target_hw_bp_type (type); return i386_low_remove_watchpoint (&debug_reg_state, hw_type, addr, len); |