summaryrefslogtreecommitdiff
path: root/gdb/i386-sol2-nat.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2009-06-07 22:33:24 +0000
committerPedro Alves <pedro@codesourcery.com>2009-06-07 22:33:24 +0000
commit312fb671d5f76672f0a0a4c674064952843b5797 (patch)
tree767c8990065e04f7dc82f8e985a120b8433e279d /gdb/i386-sol2-nat.c
parente83f4f0b6910c27e3d1e6c50dcc04ddd8f68e509 (diff)
downloadgdb-312fb671d5f76672f0a0a4c674064952843b5797.tar.gz
2009-06-07 Pedro Alves <pedro@codesourcery.com>
* procfs.h: New. * proc-utils.h (procfs_first_available): Don't declare here. * sol-thread.c: Include procfs.h instead of sys/procfs.h and proc-utils.h. * procfs.c: Include procfs.h. (procfs_target): Make it public. Don't register procfs_can_use_hw_breakpoint here. (proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS. (procfs_can_use_hw_breakpoint): Remove check of TARGET_HAS_HARDWARE_WATCHPOINTS. (procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint here. (_initialize_procfs): Don't add the procfs target here. * i386-sol2-nat.c: Include target.h and procfs.h. (_initialize_amd64_sol2_nat): Install the procfs target here, customized with watchpoints support. * irix5-nat.c: Include target.h. (_initialize_core_irix5): Rename to ... (_initialize_irix5_nat): ... this. Install the procfs target here, customized with watchpoints support. * alpha-nat.c: Include procfs.h. (_initialize_core_alpha): Rename to... (_initialize_alpha_nat): ... this. Install the procfs target here, customized with watchpoints support. * sparc-sol2-nat.c: Include target.h and procfs.h. (_initialize_sparc_sol2_nat): New. * config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete. * config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete. * config/mips/irix5.mh (NAT_FILE): Delete. * config/mips/irix6.mh (NAT_FILE): Delete. * config/mips/nm-irix5.h: Delete. 2009-06-07 Pedro Alves <pedro@codesourcery.com> * gdbint.texinfo (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete all references.
Diffstat (limited to 'gdb/i386-sol2-nat.c')
-rw-r--r--gdb/i386-sol2-nat.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/i386-sol2-nat.c b/gdb/i386-sol2-nat.c
index 7d6d07b8cf7..68be98d15b2 100644
--- a/gdb/i386-sol2-nat.c
+++ b/gdb/i386-sol2-nat.c
@@ -22,6 +22,8 @@
#include <sys/procfs.h>
#include "gregset.h"
+#include "target.h"
+#include "procfs.h"
/* This file provids the (temporary) glue between the Solaris x86
target dependent code and the machine independent SVR4 /proc
@@ -134,6 +136,15 @@ extern void _initialize_amd64_sol2_nat (void);
void
_initialize_amd64_sol2_nat (void)
{
+ struct target_ops *t;
+
+ /* Fill in the generic procfs methods. */
+ t = procfs_target ();
+
+#ifdef NEW_PROC_API /* Solaris 6 and above can do HW watchpoints */
+ procfs_use_watchpoints (t);
+#endif
+
#if defined (PR_MODEL_NATIVE) && (PR_MODEL_NATIVE == PR_MODEL_LP64)
amd64_native_gregset32_reg_offset = amd64_sol2_gregset32_reg_offset;
amd64_native_gregset32_num_regs =
@@ -142,4 +153,6 @@ _initialize_amd64_sol2_nat (void)
amd64_native_gregset64_num_regs =
ARRAY_SIZE (amd64_sol2_gregset64_reg_offset);
#endif
+
+ add_target (t);
}