Vectorize gdbserver x86 debug register accessors
authorGary Benson <gbenson@redhat.com>
Thu, 19 Jun 2014 10:55:26 +0000 (11:55 +0100)
committerGary Benson <gbenson@redhat.com>
Fri, 20 Jun 2014 12:05:50 +0000 (13:05 +0100)
commit42995dbda646ff0291a36f83a7f1a9f45e3fda8a
tree6d599720b391b49123049a2091d4cab02cfc4660
parente1d2394b50c7b174f48e38efb398034d75e67c99
Vectorize gdbserver x86 debug register accessors

This commit makes gdbserver access the x86 debug register accessor
functions via the same function vector as GDB proper.  This removes
a chunk of conditional code that was previously in i386-{nat,low}.h
and leaves a single macro as the only GDB/gdbserver difference in
nat/i386-dregs.c.

gdb/
2014-06-20  Gary Benson  <gbenson@redhat.com>

* i386-nat.h (debug_hw_points): Moved to nat/i386-dregs.c.
(i386_dr_low_type): Moved to nat/i386-dregs.h.
(i386_dr_low): Likewise.
(i386_dr_low_can_set_addr): Moved to nat/i386-dregs.c.
(i386_dr_low_set_addr): Likewise.
(i386_dr_low_get_addr): Likewise.
(i386_dr_low_can_set_control): Likewise.
(i386_dr_low_set_control): Likewise.
(i386_dr_low_get_control): Likewise.
(i386_dr_low_get_status): Likewise.
(i386_get_debug_register_length): Likewise.
* nat/i386-dregs.h (i386_dr_low_type): Moved from i386-nat.h.
(i386_dr_low): Likewise.
* nat/i386-dregs.c (i386-low.h): Remove include.
(i386-nat.h): Likewise.
(nat/i386-dregs.h): New include.
(i386_dr_low_can_set_addr): Moved from i386-nat.h.
(i386_dr_low_set_addr): Likewise.
(i386_dr_low_get_addr): Likewise.
(i386_dr_low_can_set_control): Likewise.
(i386_dr_low_set_control): Likewise.
(i386_dr_low_get_control): Likewise.
(i386_dr_low_get_status): Likewise.
(i386_get_debug_register_length): Likewise.
(debug_hw_points): Likewise.

gdb/gdbserver/
2014-06-20  Gary Benson  <gbenson@redhat.com>

* i386-low.h (i386_dr_low_can_set_addr): Removed.
(i386_dr_low_set_addr): Likewise.
(i386_dr_low_get_addr): Likewise.
(i386_dr_low_can_set_control): Likewise.
(i386_dr_low_set_control): Likewise.
(i386_dr_low_get_control): Likewise.
(i386_dr_low_get_status): Likewise.
(i386_get_debug_register_length): Likewise.
* linux-x86-low.c (i386_dr_low_set_addr):
Changed signature.  Made static.
(i386_dr_low_get_addr): Likewise.
(i386_dr_low_set_control): Likewise.
(i386_dr_low_get_control): Likewise.
(i386_dr_low_get_status): Likewise.
(i386_dr_low): New global variable.
* win32-i386-low.c (i386_dr_low_set_addr):
Changed signature.  Made static.
(i386_dr_low_get_addr): Likewise.
(i386_dr_low_set_control): Likewise.
(i386_dr_low_get_control): Likewise.
(i386_dr_low_get_status): Likewise.
(i386_dr_low): New global variable.
gdb/ChangeLog
gdb/gdbserver/ChangeLog
gdb/gdbserver/i386-low.h
gdb/gdbserver/linux-x86-low.c
gdb/gdbserver/win32-i386-low.c
gdb/i386-nat.h
gdb/nat/i386-dregs.c
gdb/nat/i386-dregs.h