diff options
author | Pedro Alves <pedro@codesourcery.com> | 2012-02-09 16:06:37 +0000 |
---|---|---|
committer | Pedro Alves <pedro@codesourcery.com> | 2012-02-09 16:06:37 +0000 |
commit | 710e918da204728eb92510537032260a982f1c04 (patch) | |
tree | 0adbcb9470ad4e485f601df506b736d827b64254 /gdb/amd64fbsd-nat.c | |
parent | d1b75579ce98a53b2d28875ce6dbd3a9dd7a3e6a (diff) | |
download | gdb-710e918da204728eb92510537032260a982f1c04.tar.gz |
2012-02-09 Valery Khromov <valery.khromov@gmail.com>
PR gdb/12953
* Makefile.in (HFILES_NO_SRCDIR): Add amd64bsd-nat.h.
* amd64bsd-nat.c: Add support for debug registers (adapted from
i386bsd-nat.c).
[HAVE_PT_GETDBREGS] (amd64bsd_dr_get, amd64bsd_dr_set)
(amd64bsd_dr_set_control, amd64bsd_dr_set_addr)
(amd64bsd_dr_get_addr, amd64bsd_dr_get_status)
(amd64bsd_dr_get_control): New functions.
* amd64bsd-nat.h: New file (adapted from i386bsd-nat.h).
* amd64fbsd-nat.c: Include "amd64bsd-nat.h", "i386-nat.h".
[HAVE_PT_GETDBREGS] (_initialize_amd64fbsd_nat): Add hardware
watchpoints initialization.
* config/i386/fbsd64.mh (NATDEPFILES): Add i386-nat.o.
Diffstat (limited to 'gdb/amd64fbsd-nat.c')
-rw-r--r-- | gdb/amd64fbsd-nat.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/amd64fbsd-nat.c b/gdb/amd64fbsd-nat.c index 79c52956fd5..ab2431cf7fa 100644 --- a/gdb/amd64fbsd-nat.c +++ b/gdb/amd64fbsd-nat.c @@ -33,6 +33,8 @@ #include "fbsd-nat.h" #include "amd64-tdep.h" #include "amd64-nat.h" +#include "amd64bsd-nat.h" +#include "i386-nat.h" /* Offset in `struct reg' where MEMBER is stored. */ @@ -154,6 +156,20 @@ _initialize_amd64fbsd_nat (void) /* Add some extra features to the common *BSD/i386 target. */ t = amd64bsd_target (); + +#ifdef HAVE_PT_GETDBREGS + + i386_use_watchpoints (t); + + i386_dr_low.set_control = amd64bsd_dr_set_control; + i386_dr_low.set_addr = amd64bsd_dr_set_addr; + i386_dr_low.get_addr = amd64bsd_dr_get_addr; + i386_dr_low.get_status = amd64bsd_dr_get_status; + i386_dr_low.get_control = amd64bsd_dr_get_control; + i386_set_debug_register_length (8); + +#endif /* HAVE_PT_GETDBREGS */ + t->to_pid_to_exec_file = fbsd_pid_to_exec_file; t->to_find_memory_regions = fbsd_find_memory_regions; t->to_make_corefile_notes = fbsd_make_corefile_notes; |