[08/13,v2] Rename gdbserver's low-level Linux x86 debug register accessors
Commit Message
This commit renames gdbserver's low-level Linux x86 debug register
accessors to the same names used by GDB.
gdb/gdbserver/ChangeLog:
* linux-x86-low.c (x86_dr_low_set_addr): Renamed as...
(x86_linux_dr_set_addr): New function.
(x86_dr_low_get_addr): Renamed as...
(x86_linux_dr_get_addr): New function.
(x86_dr_low_set_control): Renamed as...
(x86_linux_dr_set_control): New function.
(x86_dr_low_get_control): Renamed as...
(x86_linux_dr_get_control): New function.
(x86_dr_low_get_status): Renamed as...
(x86_linux_dr_get_status): New function.
(x86_dr_low): Updated with new function names.
---
gdb/gdbserver/ChangeLog | 14 ++++++++++++++
gdb/gdbserver/linux-x86-low.c | 20 ++++++++++----------
2 files changed, 24 insertions(+), 10 deletions(-)
Comments
On 10/09/2014 10:52 AM, Gary Benson wrote:
> This commit renames gdbserver's low-level Linux x86 debug register
> accessors to the same names used by GDB.
>
> gdb/gdbserver/ChangeLog:
>
> * linux-x86-low.c (x86_dr_low_set_addr): Renamed as...
> (x86_linux_dr_set_addr): New function.
> (x86_dr_low_get_addr): Renamed as...
> (x86_linux_dr_get_addr): New function.
> (x86_dr_low_set_control): Renamed as...
> (x86_linux_dr_set_control): New function.
> (x86_dr_low_get_control): Renamed as...
> (x86_linux_dr_get_control): New function.
> (x86_dr_low_get_status): Renamed as...
> (x86_linux_dr_get_status): New function.
> (x86_dr_low): Updated with new function names.
This "New function" confuses me, as these are not new functions.
Would you mind changing this to (I think) the usual way to write
a rename:
* linux-x86-low.c (x86_dr_low_set_addr): Rename to ...
(x86_linux_dr_set_addr): ... this.
Also please s/renamed/rename/, s/updated/update/, etc., in this
and other patches.
Otherwise OK.
Thanks,
Pedro Alves
@@ -572,7 +572,7 @@ update_debug_registers_callback (struct lwp_info *lwp, void *arg)
/* Update the inferior's debug register REGNUM from STATE. */
static void
-x86_dr_low_set_addr (int regnum, CORE_ADDR addr)
+x86_linux_dr_set_addr (int regnum, CORE_ADDR addr)
{
/* Only update the threads of this process. */
ptid_t pid_ptid = pid_to_ptid (ptid_get_pid (current_lwp_ptid ()));
@@ -585,7 +585,7 @@ x86_dr_low_set_addr (int regnum, CORE_ADDR addr)
/* Return the inferior's debug register REGNUM. */
static CORE_ADDR
-x86_dr_low_get_addr (int regnum)
+x86_linux_dr_get_addr (int regnum)
{
gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
@@ -595,7 +595,7 @@ x86_dr_low_get_addr (int regnum)
/* Update the inferior's DR7 debug control register from STATE. */
static void
-x86_dr_low_set_control (unsigned long control)
+x86_linux_dr_set_control (unsigned long control)
{
/* Only update the threads of this process. */
ptid_t pid_ptid = pid_to_ptid (ptid_get_pid (current_lwp_ptid ()));
@@ -606,7 +606,7 @@ x86_dr_low_set_control (unsigned long control)
/* Return the inferior's DR7 debug control register. */
static unsigned long
-x86_dr_low_get_control (void)
+x86_linux_dr_get_control (void)
{
return x86_linux_dr_get (current_lwp_ptid (), DR_CONTROL);
}
@@ -615,7 +615,7 @@ x86_dr_low_get_control (void)
and record it in STATE. */
static unsigned long
-x86_dr_low_get_status (void)
+x86_linux_dr_get_status (void)
{
return x86_linux_dr_get (current_lwp_ptid (), DR_STATUS);
}
@@ -623,11 +623,11 @@ x86_dr_low_get_status (void)
/* Low-level function vector. */
struct x86_dr_low_type x86_dr_low =
{
- x86_dr_low_set_control,
- x86_dr_low_set_addr,
- x86_dr_low_get_addr,
- x86_dr_low_get_status,
- x86_dr_low_get_control,
+ x86_linux_dr_set_control,
+ x86_linux_dr_set_addr,
+ x86_linux_dr_get_addr,
+ x86_linux_dr_get_status,
+ x86_linux_dr_get_control,
sizeof (void *),
};