aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-nat.h
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2012-05-04 18:36:30 +0000
committerJoel Brobecker <brobecker@gnat.com>2012-05-04 18:36:30 +0000
commitd40dc7a8d850464cac07725c257f662e81f894a4 (patch)
treeff7318456968c7e10a38a0782539d8e4063f563c /gdb/windows-nat.h
parentae5c1c7b1d58e52f5526facbb7dac5567a665874 (diff)
downloadfsf-binutils-gdb-d40dc7a8d850464cac07725c257f662e81f894a4.zip
fsf-binutils-gdb-d40dc7a8d850464cac07725c257f662e81f894a4.tar.gz
fsf-binutils-gdb-d40dc7a8d850464cac07725c257f662e81f894a4.tar.bz2
Segment register reading on Windows targets.
This patch makes sure that the value of segment registers are read properly as 16bit values on Windows. gdb/ChangeLog: * windows-nat.h (segment_register_p_ftype): New typedef. (windows_set_segment_register_p): Add declaration. * windows-nat.c (segment_register_p): New static global. (windows_set_segment_register_p): New function. (do_windows_fetch_inferior_registers): Add special handling for segment registers. * amd64-windows-nat.c: #include "amd64-tdep.h". (amd64_windows_segment_register_p): New function. (_initialize_amd64_windows_nat): Call windows_set_segment_register_p. * i386-windows-nat.c: #include "i386-tdep.h". (i386_windows_segment_register_p): New function. (_initialize_i386_windows_nat): Call windows_set_segment_register_p.
Diffstat (limited to 'gdb/windows-nat.h')
-rw-r--r--gdb/windows-nat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/windows-nat.h b/gdb/windows-nat.h
index 08200b9..a6cc5ec 100644
--- a/gdb/windows-nat.h
+++ b/gdb/windows-nat.h
@@ -20,5 +20,13 @@
extern void windows_set_context_register_offsets (const int *offsets);
+/* A pointer to a function that should return non-zero iff REGNUM
+ corresponds to one of the segment registers. */
+typedef int (segment_register_p_ftype) (int regnum);
+
+/* Set the function that should be used by this module to determine
+ whether a given register is a segment register or not. */
+extern void windows_set_segment_register_p (segment_register_p_ftype *fun);
+
#endif