diff options
author | Gary Benson <gbenson@redhat.com> | 2014-06-16 15:19:21 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2014-06-18 11:46:51 +0100 |
commit | 5171def394398d2a3cc6583747e2f19602f0e1da (patch) | |
tree | 4700f6439c043b8c81bebc1a972c7a51e9fbd5ba /gdb/gdbserver | |
parent | b9228891286aec649c0c53d9b2eff0d5bea7f642 (diff) | |
download | gdb-5171def394398d2a3cc6583747e2f19602f0e1da.zip gdb-5171def394398d2a3cc6583747e2f19602f0e1da.tar.gz gdb-5171def394398d2a3cc6583747e2f19602f0e1da.tar.bz2 |
Move macros from i386-{nat,low}.c to i386-{nat,low}.h
This commit moves macros required by the soon-to-be-created
nat/i386-dregs.c into i386-{nat,low}.h.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/gdbserver/i386-low.c | 7 | ||||
-rw-r--r-- | gdb/gdbserver/i386-low.h | 10 |
3 files changed, 19 insertions, 7 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index a21dc7d..6e5f07f 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,14 @@ 2014-06-18 Gary Benson <gbenson@redhat.com> + * i386-low.h (i386_dr_low_can_set_addr): New macro. + (i386_dr_low_can_set_control): Likewise. + (i386_get_debug_register_length): Likewise. + * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h. + (i386_dr_low_can_set_control): Likewise. + (i386_get_debug_register_length): Likewise. + +2014-06-17 Gary Benson <gbenson@redhat.com> + * i386-low.h (i386-dregs.h): New include. (DR_FIRSTADDR): Now in i386-dregs.h. (DR_LASTADDR): Likewise. diff --git a/gdb/gdbserver/i386-low.c b/gdb/gdbserver/i386-low.c index bd25694..5333819 100644 --- a/gdb/gdbserver/i386-low.c +++ b/gdb/gdbserver/i386-low.c @@ -32,13 +32,6 @@ The functions below implement debug registers sharing by reference counts, and allow to watch regions up to 16 bytes long. */ -#define i386_dr_low_can_set_addr() 1 -#define i386_dr_low_can_set_control() 1 - -/* Debug register size, in bytes. */ -/* NOTE: sizeof (long) == 4 on win64. */ -#define i386_get_debug_register_length() (sizeof (void *)) - /* Support for 8-byte wide hw watchpoints. */ #define TARGET_HAS_DR_LEN_8 (i386_get_debug_register_length () == 8) diff --git a/gdb/gdbserver/i386-low.h b/gdb/gdbserver/i386-low.h index 71f7c32..bad03b9 100644 --- a/gdb/gdbserver/i386-low.h +++ b/gdb/gdbserver/i386-low.h @@ -38,6 +38,9 @@ extern void i386_low_init_dregs (struct i386_debug_reg_state *state); status (DR6) register. */ +/* Can we update the inferior's debug registers? */ +#define i386_dr_low_can_set_addr() 1 + /* Update the inferior's debug register REGNUM from STATE. */ extern void i386_dr_low_set_addr (const struct i386_debug_reg_state *state, int regnum); @@ -45,6 +48,9 @@ extern void i386_dr_low_set_addr (const struct i386_debug_reg_state *state, /* Return the inferior's debug register REGNUM. */ extern CORE_ADDR i386_dr_low_get_addr (int regnum); +/* Can we update the inferior's DR7 control register? */ +#define i386_dr_low_can_set_control() 1 + /* Update the inferior's DR7 debug control register from STATE. */ extern void i386_dr_low_set_control (const struct i386_debug_reg_state *state); @@ -53,3 +59,7 @@ extern unsigned i386_dr_low_get_control (void); /* Return the value of the inferior's DR6 debug status register. */ extern unsigned i386_dr_low_get_status (void); + +/* Return the debug register size, in bytes. */ +/* Note that sizeof (long) == 4 on win64. */ +#define i386_get_debug_register_length() (sizeof (void *)) |