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/i386-nat.h | |
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/i386-nat.h')
-rw-r--r-- | gdb/i386-nat.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gdb/i386-nat.h b/gdb/i386-nat.h index 1f4130c..f20b013 100644 --- a/gdb/i386-nat.h +++ b/gdb/i386-nat.h @@ -73,6 +73,33 @@ struct i386_dr_low_type extern struct i386_dr_low_type i386_dr_low; +/* Can we update the inferior's debug registers? */ +#define i386_dr_low_can_set_addr() (i386_dr_low.set_addr != NULL) + +/* Update the inferior's debug register REGNUM from STATE. */ +#define i386_dr_low_set_addr(new_state, i) \ + (i386_dr_low.set_addr ((i), (new_state)->dr_mirror[(i)])) + +/* Return the inferior's debug register REGNUM. */ +#define i386_dr_low_get_addr(i) (i386_dr_low.get_addr ((i))) + +/* Can we update the inferior's DR7 control register? */ +#define i386_dr_low_can_set_control() (i386_dr_low.set_control != NULL) + +/* Update the inferior's DR7 debug control register from STATE. */ +#define i386_dr_low_set_control(new_state) \ + (i386_dr_low.set_control ((new_state)->dr_control_mirror)) + +/* Return the value of the inferior's DR7 debug control register. */ +#define i386_dr_low_get_control() (i386_dr_low.get_control ()) + +/* Return the value of the inferior's DR6 debug status register. */ +#define i386_dr_low_get_status() (i386_dr_low.get_status ()) + +/* Return the debug register size, in bytes. */ +#define i386_get_debug_register_length() \ + (i386_dr_low.debug_register_length) + /* Use this function to set i386_dr_low debug_register_length field rather than setting it directly to check that the length is only set once. It also enables the 'maint set/show show-debug-regs' |