Add x86_debug_reg_state to gdbserver
authorGary Benson <gbenson@redhat.com>
Tue, 24 Mar 2015 14:05:43 +0000 (14:05 +0000)
committerGary Benson <gbenson@redhat.com>
Tue, 24 Mar 2015 14:05:43 +0000 (14:05 +0000)
commit70a0bb6b590bcfe304fe082d421feb52e0a0d4dc
tree37aa654b17be58f52482f8c8c99092201478f690
parent7b6690874fa3a8afacd731b70a461d55a5b1311c
Add x86_debug_reg_state to gdbserver

This commit introduces a new function, x86_debug_reg_state, that
shared x86 code can use to access the local mirror of a process's
debug registers.  This function already existed in GDB and was
in use by GDB's x86_linux_prepare_to_resume.  An equivalent was
written for gdbserver and gdbserver's x86_linux_prepare_to_resume
was modified to use it.

gdb/ChangeLog:

* x86-nat.h (x86_debug_reg_state): Move declaration to...
* nat/x86-dregs.h (x86_debug_reg_state): New declaration.

gdb/gdbserver/ChangeLog:

* linux-x86-low.c (x86_debug_reg_state): New function.
(x86_linux_prepare_to_resume): Use the above.
gdb/ChangeLog
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-x86-low.c
gdb/nat/x86-dregs.h
gdb/x86-nat.h